Issue with dropping terminal measurements for simulation #6759
Labels
kind/bug-report
Something doesn't seem to work.
triage/needs-more-evidence
[Feature requests] Seems plausible, but maintainers are not convinced about the use cases yet
Description of the issue
The drop terminal measurements (https://quantumai.google/reference/python/cirq/drop_terminal_measurements) allows user to drop the terminal measures before simulation to get the proper simulation results.
I am trying to optimize a circuit and drop the terminal measurements, but the fidelity and final vector of the optimized circuit is different.
Seems like the measurement operation is absorbing the Z operation even though the Z gate is not separate (part of PhasedXZ gate).
Expected it to replace back the terminal measures like it does for X gate.
Eg:
Optimized: 1: ───PhX(-0.5)^-0.5───!M─── After dropping terminal measures: 1: ───PhX(-0.5)^-0.5───X───
How to reproduce the issue
Output:
Cirq version: 1.4.0
The text was updated successfully, but these errors were encountered: