Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 4 b iii Solution Created 2026-10-03 Updated 2026-10-07
The product of the data Pauli Z gates has computational-basis eigenvalueUse the parity circuit from part (ii), apply the target unitary gate , and then uncompute the parity with . For every basis input,This equals on the data, with the ancilla qubit returned to zero. The compute-phase-uncompute construction therefore gives an exact linear-size circuit:This is a Pauli-string phase by parity computation, an instance of simulation of a computable diagonal Hamiltonian. Part (i) also explains it by , whose exponential restricts correctly to the target- subspace. If no extra line is desired, accumulate parity into the last data qubit, apply there, and undo the CNOT gates, for gates. Both constructions implement the global phase as well as the relative phases exactly.
Two-qubit parity phase gate 2026-10-24
A two-qubit parity phase gate multiplies odd-parity computational vectors by and fixes even-parity ones. With ,The first controlled-NOT gate computes in the second wire, the phase gate multiplies by , and the last controlled-NOT gate restores the original bits. This compute-phase-uncompute construction leaves the data unchanged except for the desired phases. The more general Pauli-string phase by parity computation uses the same mechanism. In terms of the Pauli Z gate, ; the scalar factor ensures equality as a matrix, rather than only up to global phase.