Skip to content

Commit

Permalink
measurements issues solved for circuit.remove
Browse files Browse the repository at this point in the history
  • Loading branch information
WanderingMike committed Dec 12, 2023
1 parent 2b039ba commit 234a7a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qibo/models/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def remove(self, gate, replacement_gates=[]):
pos = self.queue.remove(gate)

for q in gate.qubits:
idx = self.queue.moment_index[q]
idx = self.queue.moment_index[q] - 1
if self.queue.moments[idx][q] != gate:
# another gate exists after the measurement gate
continue
Expand Down

0 comments on commit 234a7a7

Please sign in to comment.