Problem Statement
In PR 1108, lift-measurements has been introduced. It lifts measurements before certain gates to save on quantum resources.
At the moment, the lift-measurements stops at Hadamard gates.
Proposed Solution
I'd like to propose hadamard-lifting: Pulling Hadamard gates in front of certain gates using commutation rules (e.g. H * X = Z * H) in order to support lift-measurements and improve lift-measurements' impact on the circuit.
Conveniently, the gates that can be commuted with Hadamard (Pauli gates, CNOT) are also the ones that a measurement can be lifted over.
Problem Statement
In PR 1108,
lift-measurementshas been introduced. It lifts measurements before certain gates to save on quantum resources.At the moment, the
lift-measurementsstops at Hadamard gates.Proposed Solution
I'd like to propose
hadamard-lifting: Pulling Hadamard gates in front of certain gates using commutation rules (e.g. H * X = Z * H) in order to supportlift-measurementsand improvelift-measurements' impact on the circuit.Conveniently, the gates that can be commuted with Hadamard (Pauli gates, CNOT) are also the ones that a measurement can be lifted over.