Computing Library › Quantum Ml
Quantum Ml

Trainability and Local Cost Functions

A quantum model is trainable only if its gradients stay measurable as it scales; local cost functions and structured ansatze are the main ways to keep them so.

Trainability as a scaling question

Trainability asks whether an optimizer can find a good parameter setting in a feasible number of steps and measurements. In quantum machine learning the enemy is gradient decay: if the loss gradient shrinks exponentially with qubit count, no optimizer can navigate the landscape once the gradient drops below shot noise. Trainability is therefore inseparable from the barren plateau problem.

The local cost theorem

Kronos motion — pid vs model

A key result distinguishes global from local cost functions. A global cost, comparing the full quantum state to a target, exhibits a barren plateau even at logarithmic circuit depth. A local cost, built from observables acting on one or a few qubits, provably retains gradients that decay only polynomially, not exponentially, for circuits up to logarithmic depth. Choosing a local cost function is thus one of the most effective trainability levers available.

Other levers

Beyond cost locality, several strategies improve trainability. Structured, problem-inspired ansatze restrict expressivity to a useful subspace and keep gradients alive. Careful initialization, such as identity blocks that start the circuit near the identity, begins training away from the flat region. Layerwise training grows the circuit gradually. Warm starts from classically optimized parameters place the optimizer in an already-informative region.

python
# Compare gradient magnitude under global vs local cost (schematic)
g_global = grad_magnitude(cost='global', n_qubits=n)
g_local  = grad_magnitude(cost='local',  n_qubits=n)
# As n grows, g_global falls exponentially; g_local falls only polynomially.

The layered defense

No single technique guarantees trainability; practice combines them. A shallow, structured ansatz with a local cost, sensible initialization, and adequate shots is the standard recipe. Even then, trainability holds only up to modest depths, which is why deep, generic quantum networks remain out of reach and why the field emphasizes shallow, inductive-bias-rich designs on today's hardware.