Abstract
We present an explicit quantum circuit that prepares an arbitrary U ( 1 ) -eigenstate on a quantum computer, including the exact eigenstates of the spin- 1 / 2 X X Z quantum spin chain with either open or closed boundary conditions. The algorithm is deterministic, does not require ancillary qubits, and does not require QR decompositions. The circuit prepares such an L -qubit state with M down-spins using ( L M ) − 1 multi-controlled rotation gates and 2 M ( L − M ) CNOT-gates.