Choosing an ansatz: expressibility versus trainability
The hardware-efficient ansatz used in the lab, how its parameters grow, and why more is not always better.
8 min read · reviewed December 2026
What an ansatz is
The ansatz is the parameterised circuit that prepares the trial state. Its choice decides which states VQE can reach at all. If the true ground state is not in the family, no optimiser will find it.
The lab’s ansatz
Layers of RY rotations on every qubit, separated by a ladder of CNOT gates, with a final RY layer. It is a hardware-efficient style of ansatz, the kind used in Kandala et al. 2017: it uses only gates that are cheap on many devices. Because RY and CNOT have real matrices, the state has real amplitudes, which suits Hamiltonians whose matrices are real, as here.
| Qubits | 0 layers | 1 layer | 2 layers | 3 layers | 4 layers |
|---|---|---|---|---|---|
| 2 | 2 | 4 | 6 | 8 | 10 |
| 3 | 3 | 6 | 9 | 12 | 15 |
| 4 | 4 | 8 | 12 | 16 | 20 |
Depth versus accuracy
With the same optimiser settings, deeper circuits can reach lower energies. The table shows this for three qubits.
| Model | Exact energy | 0 layers | 1 layer | 2 layers | 3 layers |
|---|---|---|---|---|---|
| Transverse-field Ising chain | -3.4940 | 0.33168 | 0.02049 | 0.00005 | 0.00000 |
| Heisenberg chain | -4.0000 | 2.00000 | 0.17157 | 0.00000 | -0.00000 |
The trade-off
- Too shallow: the family is too small and the error cannot reach zero.
- Too deep: more parameters make the optimisation harder, and on hardware more gates mean more noise.
- Random deep circuits can have nearly flat cost landscapes. This is the barren plateau problem, described by McClean et al. in 2018. Check the original paper for the precise statement.
Try it
Questions
Is the hardware-efficient ansatz always best?
No. It is easy to run but has no knowledge of the problem. Problem-inspired ansätze use the structure of the Hamiltonian.
Why does the lab use RY and not RX or RZ?
RY keeps all amplitudes real, which matches the real Hamiltonians in the lab and keeps the simulation simple.
What is a barren plateau?
A region where the gradient of the cost is extremely small everywhere, so the optimiser cannot tell which way to go.
Read next
Sources and further reading
- E. Farhi, J. Goldstone and S. Gutmann, “A Quantum Approximate Optimization Algorithm” (2014)
- A. Peruzzo et al., “A variational eigenvalue solver on a photonic quantum processor” (2014)
- A. Kandala et al., “Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets” (2017)
- J. McClean et al., “Barren plateaus in quantum neural network training landscapes” (2018)
- J. Preskill, “Quantum computing in the NISQ era and beyond” (2018)
- K. Mitarai et al. (2018) and M. Schuld et al. (2019) on analytic gradients of quantum circuits
Check the original sources for exact citations.