Skip to content
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

Support realtime typed classical variables in qss #1014

Open
bharat-thotakura opened this issue Aug 5, 2024 · 0 comments
Open

Support realtime typed classical variables in qss #1014

bharat-thotakura opened this issue Aug 5, 2024 · 0 comments
Labels

Comments

@bharat-thotakura
Copy link
Contributor

bharat-thotakura commented Aug 5, 2024

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 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 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant