Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal working code examples in Experiment API docs #1494

Open
wants to merge 139 commits into
base: main
Choose a base branch
from

Conversation

Naohnakazawa
Copy link
Contributor

Summary

This change adds minimal working code examples to the API pages for Experiments,
EFSpectroscopy,
EFRabi,
StarkRamseyXYAmpScan,
FineAmplitudeCal,
FineXAmplitudeCal,
FineSXAmplitudeCal,
FineDragCal,
FineXDragCal,
FineSXDragCal,
FineFrequencyCal,
FrequencyCal,
HalfAngleCal,
RoughAmplitudeCal,
RoughXSXAmplitudeCal,
EFRoughXSXAmplitudeCal,
RoughDragCal,
RoughFrequencyCal,
QuantumVolume,
InterleavedRB,
LayerFidelity,
StandardRB,
MitigatedProcessTomography,
MitigatedStateTomography,
ProcessTomography,
StateTomography and
TomographyExperiment.

Details and comments

  • This PR covers many remaining experiments in issue#1238 and issue#1221.
  • In the API pages, the documentation for each experiment has been updated with its code example. Users are required to specify a backend in the code example. By default, backends used in the code examples, are simulators such as, SingleTransmonTestBackend() and AerSimulator(FakePerth()).

PR checklist (delete when all criteria are met)

  • I have added the tests to cover my changes.

Naohnakazawa and others added 30 commits September 15, 2023 09:17
…periments into main

local/main updated (Qiskit-Extensions#1238)
@wshanks
Copy link
Collaborator

wshanks commented Nov 20, 2024

Thanks for working on the documentation, @Naohnakazawa! A couple comments on your changes:

  • A number of these experiments were deprecated recently and we plan to remove them soon because they rely on Qiskit Pulse which is deprecated in Qiskit and which IBM plans to remove support for in a few months (announced here). We could still add the examples for now if you address the warnings that are causing the docs build to fail currently (any warning in jupyter-sphinx execution causes the overall job to be treated as a failure), but it might be better remove them from the PR to help with the second point.
  • I am concerned about the run time of the docs build. For the run here it was over 16 minutes. On the main branch it is around 8 minutes, which I already think is a little too long. The tests take only 3-6 minutes to run for comparison. Could you check the execution times? Perhaps some examples could use different parameters that are faster to execute. Parallelization could help the docs but it seems like jupyter-sphinx does not support it (enable parallel execution jupyter/jupyter-sphinx#38). I don't think we are tied to jupyter-sphinx if something else works better (Qiskit uses the matplotlib plot_directive Sphinx extension for example).

@Naohnakazawa
Copy link
Contributor Author

Thank you for your comment, @wshanks.

I know the deprecation policy of the Qiskit 2.0.
The main reason why I add those experiments which are deprecated is that, codes examples in Qiskit Experiments API docs for

EFSpectroscopy, EFRabi, EFRoughXSXAmplitudeCal,

must be improved. These examples run well, but target frequencies are wrong. Those are my previous mistakes. I would like to improve these examples if possible.

  • I am concerned about the run time of the docs build. For the run here it was over 16 minutes. On the main branch it is around 8 minutes, which I already think is a little too long. The tests take only 3-6 minutes to run for comparison. Could you check the execution times?

As for the execution time, the main part of it is StarkRamseyXYAmpScan. I have already deleted a code example of StarkP1Spectroscopy. Without the example of StarkRamseyXYAmpScan, the run time of docs build will be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants