Qiskit 1.1 added a feature to add typed classical variables to a qiskit.QuantumCircuit. However, trying to compile a circuit containing such variables using qiskit-superstaq leads to the following error currently:
UnsupportedFeatureForVersion: 'Dumping QPY version 11, but version 12 is required for: circuits containing realtime variables.'
To replicate this, try:
import qiskit
import qiskit_superstaq as qss
from qiskit.circuit.classical import expr, types
qr = qiskit.QuantumRegister(2, "q")
cr = qiskit.ClassicalRegister(2, "c")
qc = qiskit.QuantumCircuit(qr, cr)
a = qc.add_input("a", types.Bool())
with qc.if_test(a) as else_:
qc.x(0)
with else_:
qc.h(0)
qc.cx(0, 1)
qc.measure(qr, cr)
compiler_output = qss.SuperstaqProvider().get_backend("ibmq_kyoto_qpu").compile(qc)
What is happening?
Qiskit 1.1 added a feature to add typed classical variables to a
qiskit.QuantumCircuit
. However, trying to compile a circuit containing such variables usingqiskit-superstaq
leads to the following error currently:To replicate this, try:
What are the current alternatives?
Use qiskit's standard transpiler
Environment
qiskit-superstaq version: 0.5.21 qiskit version: 1.1.1 Python version: 3.12.4