-
Notifications
You must be signed in to change notification settings - Fork 127
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 expample in experiment API docs #1433
Add minimal working code expample in experiment API docs #1433
Conversation
local/main is updated
local/main is updated
local/main is updated
local/main is updated
local/main is updated
local/main is updated
local/main is updated
local/main is updated
loal/main is updated.
local/main is updated
…periments into main local/main is updated
…nts into issue-#1238 local/issue-#1238 update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Naohnakazawa for your great contribution. The examples look good overall. Because these are meant to be minimal examples for users to get started quickly, there is no need to set the number of shots or print the circuits before running the experiment. I also suggest that we display the analysis results in the new dataframe format by adding exp_data.analysis_results(dataframe=True)
at the end of each experiment.
I've made suggestions for the examples following this format. Let me know what you think.
releasenotes/notes/add-examples-to-characterization-experiments-e77d4d26c6b49694.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/add-examples-to-characterization-experiments-e77d4d26c6b49694.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @Naohnakazawa . The PR is almost ready to merge, I just have two last comments.
qiskit_experiments/library/characterization/local_readout_error.py
Outdated
Show resolved
Hide resolved
@coruscating, thank you for your review and suggestion, . The branch issue-#1238 has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you @Naohnakazawa for your great work!
Summary
This change adds minimal working code examples to the API pages for each experiment,especially in characterizaion experiments. The minimal working code example is a code snippet which users can copy and paste to run the experiment.
Details and comments
issue#1238
(See also theissue#1221
).GenericBackendV2(num_qubits=27)
.CorrelatedReadoutError
ResonatorSpectroscopy
CrossResonanceHamiltonian
andEchoedCrossResonanceHamiltonian
,the backend is an IBM Quantum real device due to the
backend.defaults()
dependence of the code example.In these cases, the code example explicitly imports the module
qiskit-ibm-provider
in order to retrieve the job on IBM Quantum real devices.Therefore,
requirements-dev.txt
has been updated to add the dependency onqiskit-ibm-provider
for running tests and building documentation.PR checklist (template)
CONTRIBUTING.md
.reno
if this change needs to be documented in the release notes.PR checklist (additional in CONTRIBUTING.md)
to be merged without delay (e.g. for a high priority fix), open an issue for updating
or adding the documentation later.
etc.), you've added or updated a reno release note for that change and tagged the PR
for the changelog.
requirements file:
requirements.txt
for core dependencies,requirements-extras.txt
for dependencies for optional features, andrequirements-dev.txt
for dependencies required for running tests and building documentation.