= Pauli-string phase by parity computation
{c}
{title2=$e^{itZ^{\otimes n}}$}
The <Pauli Z gates> give <eigenvalue> $(-1)^{\sum_jx_j}$ on $|x\rangle$. Use <parity computation by CNOT gates> to put the <parity bit> in a zero ancilla, apply $e^{itZ}$ to it, and uncompute. The data acquire exactly $e^{it(-1)^{\sum_jx_j}}$, and the ancillary line returns to zero. This <compute-phase-uncompute construction> needs $2n+1$ one- and <two-qubit gates>. Accumulating parity into the last data line instead uses $2n-1$ gates without an extra ancilla. Neither implementation drops the global phase.
Back to article page