Closed joeharrisuk closed 1 year ago
If this is still occurring after you've updated your version of qiskit_ibm_provider
(and even if not), it would potentially be a bug on their side, not Terra's - the error message should have been raised by that package. I suspect the most likely is that your version of qiskit_ibm_provider
was a bit old, and you still needed to pass dynamic=True
to backend.run
if you wanted to run a dynamic circuit.
Either way, I'm going to close this here because the problem isn't in Terra. You might want to ask in Qiskit Slack or at the GitHub page for qiskit-ibm-provider
, but this stuff does work in general.
Fwiw, I was able to run your code verbatim (except for providing a name for the provider) with qiskit_ibm_provider==0.6.2
on Sherbooke.
Environment
What is happening?
Basic circuits containing an
if_test
statement incur aTypeError
upon execution onibm_sherbrooke
and other backends with dynamic circuit support. The specific error message is:TypeError: Type is not JSON serializable: QuantumCircuit
I mention
ibm_sherbrooke
since it was used in the recent IBM Quantum Challenge whereif_test
circuits were run extensively.How can we reproduce the issue?
Run the following (with your own provider inserted):
Once the job has run on the device,
job.status()
returns<JobStatus.ERROR: 'job incurred error'>
andjob.error_message()
returns'TypeError: Type is not JSON serializable: QuantumCircuit'
.Using, for example, the
aer_simulator_statevector
backend instead, the job executes successfully.What should happen?
The job should execute successfully.
Any suggestions?
No response