Pauli-string phase by parity computation
ID: pauli-string-phase-by-parity-computation
The Pauli Z gates give eigenvalue on . Use parity computation by CNOT gates to put the parity bit in a zero ancilla, apply to it, and uncompute. The data acquire exactly , and the ancillary line returns to zero. This compute-phase-uncompute construction needs one- and two-qubit gates. Accumulating parity into the last data line instead uses gates without an extra ancilla. Neither implementation drops the global phase.
New to topics? Read the docs here!