Symmetry-Preserving Ansätze
A fixed or hardware-efficient ansatz wanders freely over the whole Hilbert space. But the physical states we care about almost always live in a much smaller subspace defined by a symmetry — a conserved quantity such as the number of electrons or the total spin. A symmetry-preserving ansatz restricts its trial states to that subspace from the start. This buys two things at once: a smaller, more trainable search space (helping against barren plateaus) and trial states that are physically valid by construction.
Symmetries as conserved quantum numbers
A symmetry is generated by an operator that commutes with the Hamiltonian, . The eigenvalue of — the quantum number — is conserved by the true dynamics, so the ground state lives in a single eigensector. For electronic structure the most important example is particle number: under the Jordan–Wigner mapping the number operator counts the number of qubits in state (the Hamming weight). A molecule with electrons has its ground state in the weight- subspace.
If your ansatz can produce states of the wrong weight, the optimizer wastes its expressibility exploring unphysical regions — and may even converge to a lower-energy state that simply has the wrong number of electrons.
Particle-number-preserving gates
The fix is to build the circuit entirely from gates that commute with the number operator, i.e. that never change the Hamming weight. Single-qubit or gates do not qualify — they flip and change the count. The fundamental weight-preserving two-qubit gate is the Givens rotation (also called the gate or RBS gate), which mixes only the two single-excitation basis states:
while acting as the identity on and . Crucially, every basis state it touches has Hamming weight 1, so weight is conserved exactly. This single rotation is the chemistry analogue of a single orbital excitation.
Decomposing the Givens rotation
Native hardware rarely has a Givens gate directly, so we synthesize it. A controlled- between two CNOTs realizes , and the controlled- itself decomposes into native single- and two-qubit gates:
so the whole Givens block needs only and CNOT gates — exactly what every superconducting or trapped-ion device provides.
Try it
Start from the single-excitation state and apply a Givens rotation with . The grader checks the full state vector. A correct circuit produces
with zero amplitude on and — the unmistakable signature that particle number has been preserved.
After running, confirm in the Amplitudes view that the and bars are exactly zero. The trial state never left the one-electron subspace.
Sign in on the full site to ask questions and join the discussion.