Local Cost Functions for Trainable Variational Quantum Circuits

29 concepts20 papers1 proposal

Variational Quantum Algorithms (VQAs) offer a promising pathway to achieving quantum advantage on near-term hardware. These hybrid algorithms use a classical optimizer to iteratively adjust the parameters of a quantum circuit, minimizing a specified cost function. However, scaling these models faces a severe mathematical obstacle known as the barren plateau problem: an optimization landscape that becomes exponentially flat as the number of qubits increases, leaving gradient-based optimizers completely lost.

To understand why this happens and how to fix it, we must look at how we measure success in a quantum circuit.

The Geometry of a Barren Plateau

Imagine trying to find a narrow, deep well in a vast, perfectly flat desert. If you are dropped randomly into this desert, every step you take in any direction keeps you at exactly the same altitude. The gradient is zero everywhere, offering no clues about which way to walk.

This is precisely what happens when training deep quantum circuits with global cost functions. A typical global cost function evaluates the entire quantum system at once—for example, calculating the global fidelity between an $n$-qubit trial state and a target state. As reviewed in Barren Plateaus in Variational Quantum Computing by Martín Larocca et al., global observables cause the optimization landscape to flatten exponentially with the number of qubits, even at relatively shallow circuit depths.

The intuition lies in the geometry of Hilbert space. Two random quantum states in a high-dimensional space are almost perfectly orthogonal. If your cost function only registers a signal when the trial state matches the target state globally, the initial overlap will be exponentially small ($O(2^{-n})$). Moving a single parameter slightly will change the state, but its global overlap with the target remains effectively zero. The gradient vanishes, and training stalls before it can even begin.

Why Locality Restores Gradients

The core insight behind mitigating barren plateaus is to replace global measurements with local cost functions. Instead of asking, "Is the entire $n$-qubit state correct?", a local cost function asks, "Are individual qubits or small subsystems correct?"

As synthesized by Stefano Mangini et al. in Quantum computing models for artificial neural networks, measuring individual qubits or small subsets provides a critical mechanism for maintaining trainable gradients.

To understand why this works, consider a classical analogy: the Hamming distance. If you are guessing a password, a global cost function only tells you if the entire password is correct (a binary yes/no). A local cost function tells you how many letters you got right. Even if the full password is wrong, correcting a single letter gives you immediate feedback.

In the quantum setting, a local cost function looks at the reduced density matrices of small subsystems. Even if the global state is far from the target, the local subsystems can exhibit partial alignment. This transforms the flat desert into a smooth, continuous slope where the gradient variance decays only polynomially ($O(1/\text{poly}(n))$) rather than exponentially. The optimizer now has a reliable directional signal to follow.

Mathematical Formulations of Locality

Researchers have successfully implemented this concept across various domains by redesigning objectives to focus on local properties:

Structural and Curriculum-Based Alternatives

While changing the measurement operator to a local observable directly addresses the landscape geometry, complementary strategies achieve gradient preservation by altering the circuit structure or the optimization schedule.

Curriculum Learning and Assembly

Instead of optimizing the entire complex problem at once, optimization can be broken down into a sequence of simpler, local steps. Andrea Skolik et al. introduced a layerwise learning strategy in Layerwise learning for quantum neural networks, showing that training shallow layers incrementally concentrates gradient magnitudes and prevents the optimizer from getting lost. Taking a problem-centric approach, Navid Roshani et al. developed Sequential Hamiltonian Assembly: Enhancing the training of combinatorial optimization problems on quantum computers, which starts with a simplified, local version of an optimization problem and iteratively assembles its full complexity.

Architectural and Initialization Constraints

The physical layout and initialization of the circuit can also guarantee trainability. In Absence of barren plateaus in finite local-depth circuits with long-range entanglement, Hao-Kai Zhang et al. proved that trainability is primarily governed by local depth—the number of gates acting on any individual qubit—rather than the total number of layers. If a global observable must be used, Kaining Zhang et al. demonstrated in Escaping from the Barren Plateau via Gaussian Initializations in Deep Variational Quantum Circuits that a specialized Gaussian parameter initialization strategy, where the variance scales inversely with circuit depth, can keep the initial gradient large enough to escape the plateau.

Broad Applications and Stability

Preserving gradients through localized objectives is essential across diverse quantum applications. In quantum reinforcement learning, Samuel Yen-Chi Chen showed in Quantum Deep Q-Learning with Distributed Prioritized Experience Replay that a matrix-based loss function evaluating multi-step trajectories stabilizes gradients and prevents erratic learning behavior. In quantum cryptanalysis, Brian Coyle et al. leveraged faithful local cost functions in Progress toward practical quantum cryptanalysis by variational quantum cloning to successfully optimize cloning circuits on noisy hardware.

Finally, even when optimizing global systems, mathematical formulation matters: Nico Meyer et al. demonstrated in Comprehensive Library of Variational LSE Solvers that reformulating global cost functions to avoid numerical instabilities like division-by-zero errors ensures reliable convergence during gradient descent.

Key Foundational Work

Quantum computing models for artificial neural networks (2021) — contributed 2 concept elements to this direction.
Variational quantum one-class classifier (2022) — contributed 2 concept elements to this direction.
F-Divergences and Cost Function Locality in Generative Modelling with Quantum Circuits (2021) — contributed 2 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_local_cost_function_optimization_9462dba9,
  title = {local cost function optimization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/local-cost-function-optimization/rdr_9462dba98bc24167beeac643931e1613},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 1, frozen text):

@misc{lacuna_local_cost_function_optimization_9462dba9_v1,
  title = {local cost function optimization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/local-cost-function-optimization/rdr_9462dba98bc24167beeac643931e1613/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-25},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake