---
title: Variational Quantum Eigensolver with Constraints (VQEC)
url: https://www.emergentmind.com/topics/variational-quantum-eigensolver-with-constraints-vqec
type: topic
---

# Variational Quantum Eigensolver with Constraints (VQEC)

Searching arXiv for the core VQEC paper and closely related constrained-VQE work to ground the article in published sources.
{"query":"Variational Quantum Eigensolver with Constraints constrained variational quantum eigensolver arXiv 1806.00461 2311.08502", "max_results": 10}
Variational Quantum Eigensolver with Constraints (VQEC) denotes a family of hybrid quantum-classical variational methods in which the minimization of a Hamiltonian expectation value is restricted by physical, algebraic, or combinatorial conditions. In quantum chemistry, the core motivation is that ordinary VQE acts on the full Fock-space spectrum of the mapped second-quantized Hamiltonian, so an unconstrained search can converge to the wrong charge or spin sector; the constrained variational quantum eigensolver introduced this correction by adding property constraints without requiring additional quantum resources [1806.00461]. Later work broadened the concept to explicit Lagrangian saddle-point schemes, automatically-adjusted constraint handling, exact constrained encodings, feasibility-preserving ansätze, and reduced-subspace formulations, so that “VQEC” now refers less to a single algorithm than to a design space for constrained variational optimization [2311.08502].

## 1. Origin in Fock-space variational collapse

The foundational chemistry setting starts from the second-quantized electronic Hamiltonian
\[
\hat H_e = \sum_{ij}^{N_b} h_{ij} \hat a_i^\dagger \hat a_j + \frac{1}{2}\sum_{ijkl}^{N_b} g_{ijkl} \hat a_i^\dagger \hat a_k^\dagger \hat a_l \hat a_j,
\]
which acts in Fock space rather than in a fixed-\(N\)-electron Hilbert space. After Jordan–Wigner or Bravyi–Kitaev mapping, the qubit Hamiltonian preserves the full Fock-space spectrum, including neutral molecules, cations, anions, singlets, and triplets. Standard VQE therefore minimizes over all reachable states in the mapped qubit space, not over a preselected electron-number or spin sector. By contrast, ordinary classical electronic-structure treatments implicitly restrict the search by working in determinant or configuration spaces with fixed \(N\), \(S_z\), and often \(S^2\) [1806.00461].

The canonical failure mode is the \(\mathrm{H_2^+}\) example. In the full Fock-space spectrum, neutral \(\mathrm{H_2}\) lies below the cation, so a general unconstrained VQE targeting the one-electron cation collapses to the lower-energy neutral molecule. The same mismatch produces nonphysical root switching along potential-energy surfaces. For \(\mathrm{H_2}\) in STO-3G, the first excited state is \(\mathrm{H_2^+}\) with \(N=1\) for \(R \le 0.7\,\text{\AA}\), whereas for larger \(R\) it becomes triplet \(\mathrm{H_2}\) with \(N=2\) and \(S^2=2\); if one follows the lowest available full-spectrum state rather than a fixed sector, the resulting curve develops kinks [1806.00461].

This origin fixes the central meaning of VQEC in chemistry: it is a remedy for variational collapse caused by optimizing over a Hilbert space that is larger than the physically intended sector.

## 2. Mathematical formulations

The original constrained VQE keeps the usual VQE energy functional
\[
E(\boldsymbol \Omega, \boldsymbol\tau) = \braket{\Psi(\boldsymbol \Omega,\boldsymbol\tau)|\hat H|\Psi(\boldsymbol \Omega,\boldsymbol\tau)},
\]
with
\[
\ket{\Psi(\boldsymbol \Omega,\boldsymbol \tau)} = U_\text{ENT}(\boldsymbol \tau)\,U_\text{MF}(\boldsymbol \Omega)\ket{00\ldots 0},
\]
but replaces unconstrained minimization by a penalty-augmented objective,
\[
\mathcal{E}(\boldsymbol \Omega, \boldsymbol \tau, \boldsymbol \mu) =
\braket{\Psi|\hat H|\Psi}
+ \sum_i\mu_i \left[\braket{\Psi|\hat C_i|\Psi} - C_i \right]^2.
\]
Here \(\hat C_i\) may be the electron-number operator \(\hat N\), total spin \(\hat S^2\), or other conserved quantities, and the \(\mu_i\) are described as “big but fixed numbers” [1806.00461].

The practical significance of this form is that the constraints are classical post-processing objects. After mapping, both \(\hat H\) and \(\hat C_i\) are Pauli sums, and the constrained-VQE paper emphasizes that the corresponding observables often share Pauli terms, so \(\langle \hat C_i\rangle\) can be formed by reusing \(\langle \hat T_I\rangle\) values “at zero additional cost.” The workflow therefore remains a standard VQE loop: prepare the ansatz, measure grouped commuting Pauli terms, classically contract the energy and constraint expectations, minimize the augmented objective, and repeat. In the reported hardware implementation, Nelder–Mead was used because it was more robust to noise than conjugate-gradient methods [1806.00461].

Later work formalized VQEC more abstractly as a constrained variational problem
\[
P_\theta^*:=\min_{\btheta}~F_0(\btheta)
\quad \mathrm{s.to}~F_m(\btheta)\leq 0,\quad m=1{:}M,
\]
with each \(F_m(\btheta)=\braket{\bx(\btheta)|\bH_m|\bx(\btheta)}\), and introduced a Lagrangian
\[
\mcL_{\theta}(\btheta;\blambda)=\sum_{m=0}^M \lambda_m F_m(\btheta),
\]
together with perturbed primal-dual updates computed by the parameter-shift rule. In that formulation, VQEC becomes a saddle-point extension of VQE over both circuit parameters and dual multipliers rather than a fixed-penalty heuristic [2311.08502].

A distinct but related route is explicit constrained optimization. VQE under automatically-adjusted constraints minimizes the energy subject to overlap conditions such as
\[
\left|\langle \Psi(\boldsymbol{\theta})|\Psi_0\rangle\right|^2 \le 10^{-4},
\]
using COBYLA rather than a hand-chosen VQD penalty weight. When needed, spin can also be imposed as a constraint rather than as a separate penalty term. This replaces manual penalty tuning by a classical constrained optimizer and is presented as a way to obtain smooth potential-energy surfaces without geometry-dependent retuning of \(\beta\) [2110.14448].

## 3. Constraint-enforcement paradigms

A useful classification suggested by the literature is that VQEC comprises several technically distinct enforcement mechanisms rather than one canonical architecture.

| Mechanism | Representative papers | Characteristic implementation |
|---|---|---|
| Penalty-augmented objectives | [1806.00461], [2103.12574], [1910.05168] | Quadratic property penalties, spin penalties, overlap penalties, Tabu terms |
| Explicit constrained optimization | [2110.14448], [2311.08502], [2301.01443] | COBYLA inequality constraints, primal-dual Lagrangians, dual decomposition |
| Hard-feasibility ansätze or encodings | [2303.01122], [2606.08504], [2007.13245], [2501.03521], [2006.05643] | Exact subspace mappings or circuits whose support is feasible by construction |
| Restricted-subspace variants | [2011.10027], [2303.15237] | Contextual subspaces or Fock-basis parameterizations with explicit symmetry restriction |

Penalty methods are the most direct descendants of the 2018 constrained-VQE proposal. They preserve the usual VQE loop and often require no additional quantum resources, but they only enforce feasibility through the optimization landscape. This is why later work repeatedly treats penalty-weight selection as a central difficulty [1806.00461].

Explicit constrained optimization replaces fixed penalty magnitudes by adaptive classical machinery. In VQE/AC, the optimizer enforces overlap or spin restrictions directly; in the formal VQEC paper, primal and dual variables are updated jointly; and in the stochastic QCQP literature, dual decomposition turns a constrained problem into a sequence of ordinary VQE subproblems with modified Hamiltonians [2110.14448].

Hard-feasibility approaches instead alter the feasible set itself. Exact constrained encodings map only the valid sector to qubits; mixed Dicke-state constructions support only allowed Hamming-weight sectors; tailored variational forms for binary optimization generate only bitstrings satisfying modeled inequalities; and inductive “forwarding” circuits build feasible states for larger subproblems from feasible states of smaller ones. This suggests that a large fraction of later VQEC research shifts the burden of constraint handling from objective design to state preparation [2303.01122].

Restricted-subspace methods occupy an intermediate position. Contextual subspace VQE is not VQEC in the narrow penalty-based sense, but it is directly relevant as a hard subspace restriction generated from a classically solved noncontextual sector. Likewise, cascaded VQE primarily concerns measurement reuse, yet its Fock-basis parameterization gives explicit control over symmetry sectors by excluding forbidden occupation strings or tying amplitudes of symmetry-related states [2011.10027].

## 4. Electronic-structure implementations

The first constrained-VQE demonstrations were deliberately minimal. For \(\mathrm{H_2}\), \(\mathrm{H_2^+}\), and \(\mathrm{H_2O}\), the hardware experiments on Rigetti Computing Inc’s 19Q-Acorn quantum processor used a qubit mean-field ansatz with only single-qubit rotations. Spin-constrained and number-constrained objectives yielded smooth potential-energy surfaces for singlet \(\mathrm{H_2}\), triplet \(\mathrm{H_2}\), and the one-electron \(\mathrm{H_2^+}\) cation, and the water example enforced both \(N_e=10\) and singlet character; the paper states that “the spin constraint is invaluable for avoiding convergence to the closely spaced triplet solution” in \(\mathrm{H_2O}\) [1806.00461].

This line of work naturally extended to excited states as symmetry-sector minima. Multireference and spin-restricted UCC variants showed that VQE can recover the lowest-energy state within a chosen symmetry class by combining fixed qubit-register encoding of particle number and spin, multireference initial states, restricted excitation operators, and, when necessary, an \(S^2\) penalty. The resulting benchmarks covered \(\mathrm{H_2}\), \(\mathrm{H_3}\), \(\mathrm{H_4}\), NH, \(\mathrm{OH^+}\), \(\mathrm{CH_2}\), and \(\mathrm{NH_2^+}\), and the study explicitly characterized this as a constrained VQE strategy for avoiding undesired spin crossover during excited-state optimization [1910.05168].

A more explicit constrained excited-state framework appears in VQE/AC. There the constrained optimizer replaces manually tuned VQD penalties, and a chemistry-inspired spin-restricted ansatz is used to remain in the singlet sector. At the Frank–Condon and conical-intersection geometries of ethylene and phenol blue, the reported energy errors were at most \(2\,\mathrm{kcal\,mol^{-1}}\) even on the `ibm_kawasaki` device, and the authors argued that the method has the potential to describe smooth potential-energy surfaces because it does not require pre-determination of constraint weights [2110.14448].

Another branch aims at exact sector encoding. A custom mapping that excludes all invalid determinants before VQE reduces the qubit count while preserving constrained-sector energies exactly. For \(\mathrm{H_2}\) in cc-pvtz with 56 spin orbitals, the mapped problem was reduced to 10 qubits for the singlet sector and 9 qubits for the triplet sector; in STO-3G, reported reductions included \(\mathrm{H_2}: 4\to 2\), LiH: \(12\to 8\), \(\mathrm{H_2O}: 14\to 9\), \(\mathrm{BeH_2}: 14\to 11\), and \(\mathrm{CH_4}: 18\to 14\) [2303.01122].

## 5. Constrained optimization beyond electronic structure

Outside quantum chemistry, VQEC has become a framework for constrained binary and stochastic optimization. The formal VQEC paper represents a variational quantum circuit as a probability mass function over computational-basis strings and solves constrained problems through a Lagrangian saddle-point method with perturbed primal-dual updates. In that setting, VQEC is used for quadratically-constrained binary optimization, stochastic binary policies satisfying quadratic constraints on the average and in probability, and large-scale linear programs over the probability simplex; the paper also provides optimality-gap bounds under an assumption on the VQC approximation error for arbitrary PMFs [2311.08502].

A closely related but earlier line uses dual decomposition for stochastic binary QCQP. There the constraints are enforced in expectation over the circuit-induced distribution, and each dual iterate requires solving an ordinary VQE problem for a modified Hamiltonian \(H_0+\sum_m \lambda_m H_m\). The method is empirically effective on small synthetic instances, but its stochastic formulation means that feasibility is fundamentally distributional unless additional deterministic or chance constraints are imposed [2301.01443].

Hard-feasibility ansätze are particularly prominent in combinatorial optimization. Mixed Dicke-state constructions encode equality constraints by a fixed Hamming weight and inequality constraints by a convex combination of Dicke sectors, thereby eliminating penalty terms from the objective. The framework was validated on combinatorial portfolio optimization, with feasible-set sizes \(|\mathcal{F}_I|=561\), \(|\mathcal{F}_{II}|=1419\), and \(|\mathcal{F}_{III}|=45000\); the reported trend was that the advantage over random search became clearer as the feasible search space grew, while hardware experiments on IBM NISQ processors showed that noise mitigation and circuit transpilation remained open challenges [2606.08504].

Inductive feasible-subspace circuit design offers a different route. By defining “forwarding operations” that lift feasible solutions of smaller constrained subproblems to feasible solutions of larger ones, one can construct fully feasible variational circuits for structured problems such as facility location. In the reported \(m=n=3\) facility-location experiments, the proposed method produced \(100.00\%\) feasible samples and \(62.91\%\) optimal samples, compared with substantially lower feasible and optimal rates for conventional layered VQE baselines with penalty coefficients \(\lambda=5,10,15,20\) [2501.03521].

Problem-specific circuit synthesis predates some of these developments. For the Traveling Salesman Problem and Minimum Vertex Cover, dynamically generated PQCs were built so that the variational state lies in a reduced set \(\mathbb{S}_{\mathrm{proposed}}\) satisfying selected combinatorial constraints. The strongest TSP construction satisfied \(\mathbb{S}_{\mathrm{case\,4}}=\mathbb{S}_{\mathrm{feasible}}\), and on the reported 4-city TSP experiments it reached the global minimum in all 10 trials, while generic \(R_y\)-based baselines failed to converge well even after 400 iterations [2006.05643].

Tailored variational forms for linear inequality patterns pursue the same principle at smaller block level. Circuits were given for monotone chains, at-most-one constraints, and two implication/equality patterns, and were claimed always to produce feasible solutions for the represented constraints. On the reported Facility Location Problem and Linear Assignment Problem examples, these forms used fewer parameters than 2-Local and fewer gates than the compared general QAOA implementation in one case, with faster convergence attributed to the fact that the variational search was already confined to a feasible region [2007.13245].

## 6. Limitations, trade-offs, and open directions

The principal limitation of VQEC is that constraint handling and state expressibility are distinct problems. The original constrained-VQE paper already showed that imposing the correct spin sector does not fix an insufficient ansatz: for singlet \(\mathrm{H_2}\), constrained qubit mean-field removes kinks but still gives the usual restricted-HF-like dissociation error, and “to correct for this behavior requires an addition of an entangler” [1806.00461].

Hard-feasibility methods also trade universality for exactness. Tailored variational forms cover only specific inequality families, and the authors explicitly note that it is “not always possible to combine the circuits to represent multiple constrains at the same time.” Inductive feasible-subspace constructions depend on the existence of a problem-specific forwarding operation, and problem-specific PQCs for TSP or MVC rely on handcrafted combinatorial structure rather than a general compiler from constraints to ansätze [2007.13245].

Exact constrained encodings reduce qubits but can make Hamiltonians denser and measurement more difficult. The reduced-space encoding work reports that mapping can increase measurement-circuit counts even while qubit counts decrease, and identifies classical preprocessing as a nontrivial hidden cost with runtime in their implementation best fit by an exponential function of the post-mapping qubit count. The same paper also states that ansätze designed for the original qubit encoding are not straightforwardly transferable to the reduced encoding [2303.01122].

Explicit constrained optimizers avoid manual penalty tuning but do not remove other variational bottlenecks. VQE/AC still requires overlap measurements with previously computed states, larger active spaces deepen spin-restricted circuits, and hardware noise remains significant. In mixed Dicke-state optimization, IBM hardware experiments produced high KL divergence, very low Hellinger fidelity, and near-zero target-bitstring probability, leading the authors to identify zero-noise extrapolation, probabilistic error cancellation, and improved transpilation as open directions [2110.14448].

Finally, not all VQEC formulations enforce per-sample feasibility. Primal-dual and dual-decomposition methods based on PMFs or stochastic binary policies often impose constraints in expectation or in probability. This is appropriate for average QCBO, chance-constrained QCBO, or stochastic QCQP, but it is not equivalent to guaranteeing that every measured bitstring is feasible. A plausible implication is that future VQEC work will continue to separate into at least two branches: exact feasible-subspace methods for problems with exploitable structure, and adaptive Lagrangian methods for problems where hard feasibility is difficult to encode directly [2311.08502].

Source: https://www.emergentmind.com/topics/variational-quantum-eigensolver-with-constraints-vqec