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

fix: change to_openqasm cbit num #144

Closed
wants to merge 2 commits into from
Closed

Conversation

beizhansl
Copy link
Collaborator

If we use the length of measures as the size of the cbit array, many problems will arise.
For example:

qc = QuantumCircuit(3)
qc.cx([0],[2])
qc.to_openqasm()

the qsam will be

include "qelib1.inc";
qreg q[4];
creg meas[1];
cx q[0],q[1];
measure q[0] -> meas[3];

@beizhansl beizhansl closed this Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant