Environment
- Qiskit version: 2.4.1
- Python version: 3.12.3
- Operating system: Windows 11 Home
What is happening?
I am getting an error when running the "Close a Batch" sample code in "Run jobs in a batch" (https://quantum.cloud.ibm.com/docs/en/guides/run-jobs-batch) because "estimator_pub" and "sampler_pub" are not defined.
How can we reproduce the issue?
Run the following code in a Jupyter Notebook:
with Batch(backend=backend) as batch:
estimator = Estimator()
sampler = Sampler()
job1 = estimator.run([estimator_pub])
job2 = sampler.run([sampler_pub])
The batch is no longer accepting jobs but the submitted job will run to completion.
result = job1.result()
result2 = job2.result()
What should happen?
You get an error saying "NameError: name 'estimator_pub' is not defined."
Any suggestions?
No response
Environment
What is happening?
I am getting an error when running the "Close a Batch" sample code in "Run jobs in a batch" (https://quantum.cloud.ibm.com/docs/en/guides/run-jobs-batch) because "estimator_pub" and "sampler_pub" are not defined.
How can we reproduce the issue?
Run the following code in a Jupyter Notebook:
with Batch(backend=backend) as batch:
estimator = Estimator()
sampler = Sampler()
job1 = estimator.run([estimator_pub])
job2 = sampler.run([sampler_pub])
The batch is no longer accepting jobs but the submitted job will run to completion.
result = job1.result()
result2 = job2.result()
What should happen?
You get an error saying "NameError: name 'estimator_pub' is not defined."
Any suggestions?
No response