You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When taking an OpenQASM program, creating a Circuit via the Circuit.from_ir method, and then translated back to OpenQASM via the Circuit.to_ir method, indices used in classical registers during qubit measurement are all set to 0, even if the indices in the original OpenQASM code were non-zero.
Expected behavior
The indices used in the classical registers in the translated output should match the indices in the original openqasm program (even if the classical register name is changed). In this example, we should see
b[0] = measure q[0];
b[1] = measure q[1];
However, the output from running this code yields
b[0] = measure q[0];
b[0] = measure q[1];
Screenshots or logs
Print out from running snippet in example:
Describe the bug
When taking an OpenQASM program, creating a Circuit via the Circuit.from_ir method, and then translated back to OpenQASM via the Circuit.to_ir method, indices used in classical registers during qubit measurement are all set to 0, even if the indices in the original OpenQASM code were non-zero.
To reproduce
Example:
Expected behavior
The indices used in the classical registers in the translated output should match the indices in the original openqasm program (even if the classical register name is changed). In this example, we should see
However, the output from running this code yields
Screenshots or logs
Print out from running snippet in example:
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: