-
Notifications
You must be signed in to change notification settings - Fork 126
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
Usage of StateTomography in IBMQ Runtime environment #1226
Comments
Thanks for reporting this. Better Runtime integration is definitely in our plans, see also #1181. In the meantime, you can run experiments with sessions with workaround code like this:
|
fyi But we are also planning to change |
Just want to mention how easy the workaround now is, thanks to @jyu00's comment that from qiskit_ibm_provider import IBMProvider
from qiskit_experiments.library.tomography import ProcessTomography
provider = IBMProvider()
backend = provider.get_backend("ibm_nairobi")
qc = QuantumCircuit(1)
qc.x(0)
with backend.open_session() as session:
tomography = ProcessTomography(qc)
tomography_result = tomography.run(backend)
tomography_result.block_for_results()
session.close() |
### Summary This PR adds a sessions how-to based on the discussions in #1226. It also updates some outdated documentation, such as the links to the Qiskit Textbook which were all broken. --------- Co-authored-by: Will Shanks <[email protected]>
Note that |
### Summary This PR adds a sessions how-to based on the discussions in qiskit-community#1226. It also updates some outdated documentation, such as the links to the Qiskit Textbook which were all broken. --------- Co-authored-by: Will Shanks <[email protected]>
Informations
What is the current behavior?
When I try to obtain results from StateTomography instance by
run()
function, I'm obtaining the errorSteps to reproduce the problem
Run the StateTomography.run() in a Session.
MWE:
What is the expected behavior?
The expected behavior would be to be able to run Qiskit experiments also under IBMQ Runtime environment.
Suggested solutions
The problem arises in BaseExperiment class, specifically in its
_run_jobs()
method:It can be seen, that
run()
is being directly called from IBMBackend instance, as Estimator or Sampler instances are not being used by the class. My suggestion would be to make it possible for them to be provided to a constructor and subsequently to use them during expectation value estimation.The text was updated successfully, but these errors were encountered: