Ansatz Design for VQE
Track: Variational & NISQ Algorithms · Difficulty: Intermediate · Est: 14 min
Ansatz Design for VQE
Overview
In VQE, the ansatz is the parameterized circuit that prepares the candidate state .
Ansatz choice is crucial because it sets the tradeoffs:
- which states are reachable (expressivity)
- how easy it is to optimize (trainability)
- how deep the circuit is (noise sensitivity)
A “better” ansatz is not always deeper. In NISQ, deeper often means noisier, and noisier can mean less useful.
Intuition
What an ansatz really is
An ansatz is a structured guess. It is a family of states controlled by parameters.
You are not searching all possible quantum states. You are searching a subset that your circuit can produce.
Hardware-efficient vs problem-inspired
Two broad families:
-
Hardware-efficient ansatz
- built from native gates and repeating layers
- aims to be easy to run on the device
- risk: may be hard to train or may not match the problem structure well
-
Problem-inspired ansatz
- built using knowledge of the Hamiltonian’s structure
- aims to reach relevant low-energy states with fewer parameters
- risk: may require gates that are harder to implement or deeper circuits
Expressivity vs trainability
- If the ansatz is too simple, it might never reach the true ground state.
- If the ansatz is too expressive, the optimization landscape can become flat or chaotic.
In NISQ, you often want a “just expressive enough” ansatz.
Why deeper circuits are not always better
Depth increases:
- accumulated gate error
- decoherence exposure
- measurement cost (more shots needed for stable estimates)
So there is a practical sweet spot:
- enough depth to represent useful states
- not so much depth that noise dominates
Formal Description
We describe ansatz design as choosing a parameterized circuit class.
Ansatz as a mapping from parameters to states
An ansatz defines:
- parameters (a vector of angles and possibly other control values)
- a circuit
- the prepared state
VQE then minimizes the energy over .
Practical ansatz design criteria
A good ansatz tends to have:
- compatibility with hardware: uses gates you can execute reliably
- reasonable parameter count: not too few (underfit) and not too many (hard to train)
- structured entanglement: enough entangling capability to represent correlated states
- manageable depth: to survive noise
Interpreting “expressivity” carefully
High expressivity means the ansatz can represent a wide variety of states. But in VQE, expressivity is only valuable if you can actually find the right parameters.
So a practical criterion is:
- “expressive enough, trainable enough”
Worked Example
Consider a 2-qubit Hamiltonian that couples qubits (so product states may be insufficient).
Option A: shallow ansatz
- single-qubit rotations on each qubit
- no entangling gate
This ansatz may fail because it cannot represent entangled ground states.
Option B: slightly deeper ansatz
- single-qubit rotations
- one entangling gate
- another layer of rotations
Now the ansatz can represent some entangled states while still being shallow.
This example shows the design goal:
- add the minimum structure needed to represent the physics, without adding unnecessary depth
Turtle Tip
A good VQE ansatz is not “maximally expressive.” It’s “expressive enough to capture the ground state, but simple enough to train and survive noise.”
Common Pitfalls
- Adding layers until training fails. More depth often increases noise and optimization difficulty.
- Treating hardware-efficient ansätze as universally best. They can be convenient but may be hard to train.
- Ignoring problem structure entirely. If the Hamiltonian has known symmetries, an ansatz that respects them can help.
Quick Check
- What role does the ansatz play in VQE?
- Why might a deeper ansatz perform worse on real hardware?
- What is the tradeoff between expressivity and trainability?
What’s Next
Now that we have an ansatz, we must evaluate its energy. Next we focus on the biggest practical cost in VQE: Hamiltonian measurement and the shot cost of estimating expectation values.
