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

Incorrect Handling of Mid-Circuit Measurements in IR Function #99

Open
contra-bit opened this issue Aug 24, 2024 · 1 comment
Open

Incorrect Handling of Mid-Circuit Measurements in IR Function #99

contra-bit opened this issue Aug 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@contra-bit
Copy link

Describe the bug
When mid-circuit measurements are included in a quantum circuit, the ir function fails to recognize these measurements correctly. The function erroneously adds measurements to all qubits in the circuit.

To reproduce

  1. Create a quantum circuit that includes mid-circuit measurements on specific qubits.
  2. Generate the intermediate representation (IR) of the circuit using the ir function.
  3. Inspect the output of the IR to check the measurements.
  4. Observe that measurements have been added to all qubits instead of only the specified ones.

Expected behavior
I expected the ir function to accurately reflect the mid-circuit measurements as defined in the original quantum circuit.
Midcircuit measurements should not be moved to the end of the circuit.

Screenshots or logs
image

System information

  • Julia version: 1.10
  • Braket.jl version: Main Branch

Note
Instead of using the Reset Instruction, I am currently using Z.
The idea, is that after a measurement, the qubit is reset and reused for a different computation

@contra-bit contra-bit added the bug Something isn't working label Aug 24, 2024
@kshyatt-aws
Copy link
Member

Mid-circuit measurement isn't supported yet, so this is more of a feature request I'd say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants