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.
| Stage | What it does | Common choices |
|---|---|---|
| Data encoding | Maps classical input to a quantum state | Angle, amplitude or basis encoding |
| Variational layers | Apply trainable rotations and entanglement | Hardware-efficient or problem-inspired ansatz |
| Measurement | Turns the state into a numerical output | Pauli-Z expectation, parity, sampling |
| Classical optimizer | Updates parameters from the cost | Adam, SPSA, natural gradient |
| Gradient estimation | Supplies derivatives to the optimizer | Parameter-shift rule, finite differences |
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.
| Architecture | Structure | Typical use |
|---|---|---|
| Variational quantum classifier | Encoding followed by repeated ansatz layers | Binary or multiclass classification |
| Quantum convolutional neural network | Local convolution and pooling that halves qubits | Phase recognition in quantum many-body data |
| Data re-uploading circuit | Alternating encoding and trainable blocks | Function approximation with few qubits |
| Continuous-variable QNN | Gaussian and non-Gaussian gates on photonic modes | Photonic hardware, regression tasks |
| Hybrid quantum layer | Quantum circuit embedded in a classical network | Experiments within deep learning frameworks |
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.
How QNNs compare with related approaches
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.
| Approach | Trainable part | Main strength | Main weakness |
|---|---|---|---|
| Quantum neural network | Circuit parameters | Flexible, hardware-native models | Barren plateaus and noisy gradients |
| Quantum kernel method | Classical weights over a fixed kernel | Convex training problem | Kernel values may concentrate |
| Classical deep network | Millions to billions of weights | Mature, proven at scale | No access to native quantum data |
| Quantum-inspired algorithm | Classical model mimicking quantum structure | Runs on ordinary hardware | Advantage only over naive baselines |
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.
| Problem | Cause | Typical mitigation |
|---|---|---|
| Vanishing gradients | Deep random circuits, global observables | Local costs, layerwise training |
| Shot noise | Finite measurements per estimate | More shots, about 1/ε² for precision ε |
| Hardware noise | Gate errors and decoherence | Shallow circuits, error mitigation |
| Data loading cost | Encoding large inputs needs deep circuits | Dimensionality reduction, compact encodings |
| Costly gradients | Two circuit runs per parameter | SPSA or batched parameter shifts |
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.