amazon-braket / amazon-braket/Braket.jl
Incorrect Handling of Mid-Circuit Measurements in IR Function
- Linguagem predominante
- Julia
- Estrelas
- 110
- Forks
- 7
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
**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**

**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
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.