Quantum neural network

Also known as: QNN

On this page 7

A quantum neural network (QNN) is a machine learning model built from a parameterized quantum circuit: data are encoded into qubits, a sequence of gates with trainable rotation angles transforms the state, and measured expectation values serve as the model output. Among quantum applications in quantum computing, QNNs are the most widely studied attempt to bring the learning paradigm of deep learning onto quantum hardware.

Despite the name, a QNN is not a literal copy of a classical neural network. Quantum evolution is linear and unitary, so there are no neurons with activation functions in the usual sense. The analogy lies in the layered, trainable structure and in the gradient-based training loop, which runs on a classical computer that adjusts the circuit parameters.

How a quantum neural network processes data

Every QNN follows the same three-stage pipeline. A feature map or encoding circuit loads the input into the quantum state, a variational ansatz of parameterized gates and entangling gates processes it, and a measurement of an observable produces a number that becomes a prediction or a cost value.

Training is hybrid quantum-classical. The quantum processor estimates outputs and gradients, while a classical optimizer such as Adam or a quasi-Newton method updates the parameters. Gradients are usually obtained with the parameter-shift rule, which evaluates the circuit at two shifted angles per parameter instead of using backpropagation.

The table below maps each stage of the pipeline to its role and its common implementation choices.

StageWhat it doesCommon choices
Data encodingMaps classical input to a quantum stateAngle, amplitude or basis encoding
Variational layersApply trainable rotations and entanglementHardware-efficient or problem-inspired ansatz
MeasurementTurns the state into a numerical outputPauli-Z expectation, parity, sampling
Classical optimizerUpdates parameters from the costAdam, SPSA, natural gradient
Gradient estimationSupplies derivatives to the optimizerParameter-shift rule, finite differences
Stages of a typical quantum neural network

Where the nonlinearity comes from

Because unitary gates act linearly on the state vector, a QNN gains its expressive nonlinearity from encoding and measurement. An angle-encoded input x enters the circuit through terms such as cos(x) and sin(x), so the model output becomes a finite Fourier series in the input features.

Data re-uploading, which encodes the same input several times between trainable layers, widens the set of frequencies the model can represent. Theoretical work also shows that many QNNs are formally linear models in a quantum feature space, which connects them closely to quantum kernel methods: the trainable circuit chooses a measurement, and the encoding defines the feature space.

Main architectures and variants

Several QNN families have emerged, and they differ mainly in how layers are arranged and what kind of data they target. The following table compares the most cited variants.

ArchitectureStructureTypical use
Variational quantum classifierEncoding followed by repeated ansatz layersBinary or multiclass classification
Quantum convolutional neural networkLocal convolution and pooling that halves qubitsPhase recognition in quantum many-body data
Data re-uploading circuitAlternating encoding and trainable blocksFunction approximation with few qubits
Continuous-variable QNNGaussian and non-Gaussian gates on photonic modesPhotonic hardware, regression tasks
Hybrid quantum layerQuantum circuit embedded in a classical networkExperiments within deep learning frameworks
Common quantum neural network architectures

The quantum convolutional neural network (QCNN) deserves special mention: its logarithmic depth and limited number of parameters make it trainable at scale, and it is one of the few designs with a clear use case on quantum data produced by physical systems.

A QNN sits within the broader field of quantum machine learning, next to quantum kernels and fully classical models. Choosing among them depends on the data source, the hardware budget and the evidence of advantage.

ApproachTrainable partMain strengthMain weakness
Quantum neural networkCircuit parametersFlexible, hardware-native modelsBarren plateaus and noisy gradients
Quantum kernel methodClassical weights over a fixed kernelConvex training problemKernel values may concentrate
Classical deep networkMillions to billions of weightsMature, proven at scaleNo access to native quantum data
Quantum-inspired algorithmClassical model mimicking quantum structureRuns on ordinary hardwareAdvantage only over naive baselines
Quantum neural networks and their neighbors

For classical data such as images or tabular records, no QNN has yet shown a robust, practical advantage over well-tuned classical models. The strongest theoretical arguments for advantage concern data that already exist as quantum states, for example outputs of quantum sensors or quantum simulations.

Training challenges and limitations

The best-known obstacle is the barren plateau: for deep, randomly initialized circuits or global cost functions, the variance of the gradient shrinks exponentially with the number of qubits, so the optimizer sees an essentially flat landscape. Local cost functions, shallow or structured ansatz designs and careful initialization reduce the effect.

A related, more recent concern is that architectures provably free of barren plateaus are often classically simulable, because the same structure that keeps gradients large also confines the computation to a small subspace. This tension is an open research question and limits claims of quantum advantage.

ProblemCauseTypical mitigation
Vanishing gradientsDeep random circuits, global observablesLocal costs, layerwise training
Shot noiseFinite measurements per estimateMore shots, about 1/ε² for precision ε
Hardware noiseGate errors and decoherenceShallow circuits, error mitigation
Data loading costEncoding large inputs needs deep circuitsDimensionality reduction, compact encodings
Costly gradientsTwo circuit runs per parameterSPSA or batched parameter shifts
Practical problems in QNN training

Finally, benchmarks are easy to misread. Small QNN experiments on toy datasets often match simple classical baselines, and studies that tune the classical competitor carefully tend to find no measurable quantum benefit on today’s noisy hardware.

In plain words

A quantum neural network is a quantum circuit with adjustable dials. Data go in, the circuit processes them, and a measurement gives an answer. An ordinary computer then turns the dials a little, checks whether the answer improved, and repeats this many times until the circuit gives useful results.

It borrows the idea of learning from examples from regular artificial intelligence, but it runs on qubits instead of ordinary bits. The hope is that qubits can spot patterns that are hard to capture otherwise, especially in data that come from quantum experiments. So far, for everyday data such as photos, ordinary neural networks remain better and far cheaper.

A real-world example

A condensed-matter research group wants to identify which phase of matter a simulated chain of 16 spins is in, a task that is hard when only measurement snapshots are available. Instead of reconstructing the full quantum state, the team feeds the prepared state directly into a quantum convolutional neural network on the same processor.

The QCNN uses about 40 trainable parameters, alternating convolution and pooling layers until a single qubit remains, and is trained on roughly 200 labeled example states with parameter-shift gradients and 2,000 shots per evaluation. After training, the network separates the two phases with high accuracy close to the transition point while requiring far fewer measurements than full state tomography. The outcome shows where QNNs are most promising today: learning directly from quantum data rather than from classical images or spreadsheets.