Ansatz Circuits
In VQE the quantum computer's job is to prepare a trial state whose energy we want to minimize. The circuit that prepares this trial state is called the ansatz (German: "initial attempt" or "approach"). Choosing a good ansatz is the central design decision in any VQE experiment.
What makes a good ansatz?
An ansatz must balance two competing demands:
- Expressibility — the set of states it can reach must include (or closely approximate) the true ground state.
- Efficiency — the circuit must be shallow enough to run on near-term hardware without accumulating too much noise.
The two are in tension: a circuit with more layers can reach more states but also incurs more error.
Hardware-efficient ansatz
The most common near-term choice is the hardware-efficient ansatz (HEA): apply single-qubit rotation gates (typically or pairs) to every qubit, then add a layer of two-qubit entangling gates (CNOT or CZ) that match the device's native connectivity. Repeat for layers.
For two qubits, one layer looks like this:
The rotation is
so . When this is the state; gives .
Entanglement is essential
Without the CNOT layer the ansatz is a product state , which can never reach an entangled ground state. Even a single entangling gate can dramatically increase expressibility. For a 2-qubit system, one CNOT layer is often enough to reach any state in the two-dimensional subspace of interest.
Try it
Build a two-qubit hardware-efficient ansatz with the angles fixed to and . The grader checks the full state vector, so the circuit must produce the correct amplitudes.
After running, inspect the amplitudes: the CNOT entangles the two qubits so you cannot write the output as a simple tensor product. That entanglement is exactly what lets VQE explore correlated ground states.
Sign in on the full site to ask questions and join the discussion.