Multistate Contracted VQE (MC-VQE)
What You'll Learn:
- How to find multiple eigenstates simultaneously using a contracted Hamiltonian approach
- How a shared rotation U(θ) transforms reference states into trial states (and how this demo's rotation differs from a true Givens rotation)
- Why multi-reference methods are essential for strongly correlated systems
- How to solve generalized eigenvalue problems with regularized overlap matrices
Level: Advanced | Time: 30 minutes | Qubits: 4 | Framework: Qiskit
Prerequisites
- H2 Excited States — VQD algorithm, overlap between states
- H2 Ground State — VQE fundamentals
The Idea
VQD finds excited states one at a time — ground state first, then first excited, then second. This works, but it compounds errors: each state's optimization depends on the accuracy of all previous ones. If the ground state is slightly wrong, every subsequent state is affected.
MC-VQE takes a different approach: instead of finding states one by one, it builds a small subspace of reference states and diagonalizes the Hamiltonian within that subspace. All eigenstates emerge simultaneously from a single matrix diagonalization. The quantum computer's job is to prepare good reference states; the classical computer handles the small eigenvalue problem.
Think of it like this: VQD searches the full landscape one valley at a time, while MC-VQE builds a topographic map of a small region and reads off all the valleys at once.
How It Works
Step 1: Choose Reference States
Select initial configurations that span the physically relevant subspace:
CODE|Φ₁⟩ = |1100⟩ Hartree-Fock reference (2 occupied orbitals) |Φ₂⟩ = |1010⟩ Single excitation (orbital 1 → 2) |Φ₃⟩ = |0110⟩ Different single excitation |Φ₄⟩ = entangled Multi-reference superposition
Good reference sets should be linearly independent and cover the target subspace — the subspace where the lowest eigenstates live.
Step 2: Apply Orbital Rotation
A shared rotation U(θ) transforms all references simultaneously:
|Ψ_I⟩ = U(θ)|Φ_I⟩
The shared rotation U(θ) here is a simple entangling layer: one RY and CNOT block on each of the 6 qubit pairs. It is not a true Givens (orbital) rotation, which would keep the number of excitations fixed; this block does not (on |00⟩ with θ = 0.7 it produces all four basis states):
CODERotation block between qubits i and j: q_i: ──RY(θ)──■────────────■── │ │ q_j: ─────────X──RY(-θ/2)──X──
For 4 qubits, there are 6 qubit pairs → 6 rotation parameters.
Step 3: Build Contracted Matrices
Compute the Hamiltonian and overlap in the reference subspace:
CODEH_IJ = ⟨Ψ_I|H|Ψ_J⟩ (energy matrix) S_IJ = ⟨Ψ_I|Ψ_J⟩ (overlap matrix)
These are small matrices (4×4 for 4 references) that can be classically diagonalized.
Step 4: Solve the Generalized Eigenvalue Problem
H·C = S·C·E
The eigenvalues E give the energies, and the eigenvectors C give each eigenstate as a linear combination of reference states.
Step 5: Optimize θ
This demo minimizes only the lowest eigenvalue by adjusting the rotation parameters, then reads all eigenvalues from the same diagonalization. MC-VQE as published (Parrish et al. 2019) instead tunes U(θ) to minimize the average energy of all its reference states (orthonormal CIS states), which tunes the whole subspace. Minimizing only the lowest eigenvalue leaves the other states much less accurate (see Expected Output).
The Math
Contracted Hamiltonian
The full Hamiltonian H acts on a 2^n-dimensional space. The contracted Hamiltonian H_c acts on an m-dimensional subspace (m << 2^n):
H_c = P† H P
where P = [|Ψ₁⟩, |Ψ₂⟩, ..., |Ψₘ⟩] is the matrix of reference states.
The eigenvalues of H_c are upper bounds to the true eigenvalues (by the variational principle applied to each subspace direction).
Generalized Eigenvalue Problem
When references are non-orthogonal (S ≠ I), we solve HC = SCE. This is handled by:
- SVD of S: S = UΣV†
- Regularize: discard singular values below threshold
- Transform: H' = S^{-1/2} H S^{-1/2}
- Standard diagonalization of H'
Transverse Field Ising Model
H = -Σᵢ ZᵢZᵢ₊₁ - h Σᵢ Xᵢ
At h = 0.5 (ordered phase), the two lowest states are the even and odd combinations of the two ferromagnetic configurations |0000⟩ and |1111⟩, split by only about 0.09 on 4 sites. States with a domain wall start at E₂, about 1.6 above the ground state.
Expected Output
| State | MC-VQE | Exact | Error |
|---|---|---|---|
| E₀ | -3.07 | -3.427 | 0.36 |
| E₁ | -0.22 | -3.332 | 3.12 |
| E₂ | 0.46 | -1.827 | 2.28 |
| E₃ | 1.60 | -1.732 | 3.33 |
Values from run_circuit(max_iterations=100, seed=42), which is deterministic. Accuracy depends on how well the reference states span the target subspace. Ground state is typically most accurate. Every estimate lies above its exact value, as the variational bound requires, but with these 4 references and a rotation tuned only for E₀ the excited-state estimates are poor.
Running the Circuit
PYTHONfrom circuit import run_circuit, verify_mcvqe, compute_exact_eigenvalues # Exact reference exact = compute_exact_eigenvalues() print(f"Exact eigenvalues: {[f'{e:.4f}' for e in exact]}") # MC-VQE result = run_circuit(max_iterations=100, seed=42) for state in result['states']: print(f"E_{state['index']}: {state['energy']:.4f} " f"(exact: {state['exact']:.4f}, error: {state['error']:.4f})") # Verification v = verify_mcvqe() for check in v["checks"]: status = "PASS" if check["passed"] else "FAIL" print(f"[{status}] {check['name']}: {check['detail']}")
Try It Yourself
-
Add more references: Create a 5th reference state (e.g., |0011⟩) and observe how the accuracy of higher excited states improves.
-
Vary the transverse field: Change h from 0.1 to 2.0. At h = 1.0 (critical point), the system is hardest to solve — do you need more references?
-
Compare with VQD: Run VQD for the same Hamiltonian. Which method gets closer to the exact excited state energies? Which converges faster?
-
Reference quality: Replace the entangled reference with |0011⟩. Does the subspace quality (ground state accuracy) improve or degrade?
What's Next
- SSVQE — Simultaneous optimization without contracted Hamiltonian
- VQD Algorithm — Sequential deflation approach
- H2 Excited States — Simplest excited state example
Comparison: MC-VQE vs Other Methods
| Aspect | MC-VQE | VQD | SSVQE |
|---|---|---|---|
| States found | All at once | One at a time | All at once |
| Optimization | Single cost (E₀ in this demo; state-averaged energy in the published method) | K separate optimizations | Weighted sum |
| Strong correlation | Excellent | Poor | Moderate |
| Parameters | Few (6 rotation angles here) | K × ansatz params | K × ansatz params |
| Quantum resource | References × rotation | Ansatz per state | Ansatz per state |
| Error propagation | None (single diag) | Compounds per state | Shared optimization |
Applications
| Domain | Use case |
|---|---|
| Bond breaking | H₂ dissociation, transition states |
| Transition metals | d-orbital near-degeneracy |
| Conical intersections | Photochemical reaction pathways |
| Condensed matter | Quantum phase transitions |
References
- Parrish, R.M. et al. (2019). "Quantum Computation of Electronic Transitions Using a Variational Quantum Eigensolver." Physical Review Letters 122, 230401. DOI: 10.1103/PhysRevLett.122.230401
- Huggins, W.J. et al. (2020). "A non-orthogonal variational quantum eigensolver." New Journal of Physics 22, 073009. DOI: 10.1088/1367-2630/ab867b
- McClean, J.R. et al. (2016). "The theory of variational hybrid quantum-classical algorithms." New Journal of Physics 18, 023023. DOI: 10.1088/1367-2630/18/2/023023