superpositions

    Quantum Neural Networks (QNN)
    and Hybrid QNN (HQNN)

    Parameterized quantum circuits that learn from data, and the hybrid variant that wraps them in classical layers to train reliably on today's hardware: transparent, reproducible, and benchmarked on Superpositions Studio.

    Reproducible QNN & HQNN pipelines
    Downloadable code & benchmarks
    Classical baselines included
    Transparent metrics & results

    Overview

    A Quantum Neural Network (QNN) is a machine-learning model built from a parameterized quantum circuit. Classical data is embedded into a quantum state through an encoding step (angle or amplitude encoding, optionally with data reuploading); a set of trainable gates with parameters θ transforms that state; and a measurement of the resulting observables produces the outputs a classical optimizer uses to minimize a loss and update θ. A Hybrid Quantum Neural Network (HQNN) keeps that same quantum layer at its core but wraps it in classical neural-network layers — an MLP, RNN, or CNN block — that handle input preprocessing and output shaping. The quantum layer only has to do what circuits do well; the classical layers absorb the rest. QNNs are considered highly expressive because a circuit on relatively few qubits can, in principle, represent complex functions; their main practical bottleneck is noise, since deeper circuits and more qubits can drive gradients toward a noise-induced barren plateau — a limitation that recedes as hardware fidelity improves.

    Why It Matters

    Both architectures explore whether quantum circuits can learn useful representations, especially for small or structured datasets. The hybrid split matters in practice: shallow quantum layers are what today's noisy hardware can run reliably, so wrapping one in classical layers is usually what turns a simulator-only exercise into a model that trains and runs on real qubits. Industry surveys treat both as an R&D tool today — a way to benchmark quantum hardware and algorithms ahead of the more powerful, error-corrected processors expected in the late 2020s and 2030s.

    QNN or HQNN: When to Use Which

    Use a pure QNN when the model needs to stay quantum end-to-end — researching quantum-native feature maps and kernels, or benchmarking a device's raw learning capacity on a small, self-contained problem. Use HQNN when the goal is a working system: classical layers carry most of the representation learning, the quantum layer contributes one narrow, well-defined transformation, and the combination trains end-to-end with standard deep-learning tooling. The trade-off is engineering cost, not accuracy alone: a pure QNN is simpler to reason about in isolation, while an HQNN adds the surface area of a full deep-learning stack around a small quantum component. All three production case studies below — predictive maintenance, hydraulic system monitoring, and wind energy forecasting — use the hybrid form for exactly this reason.

    How QNN & HQNN Work

    A six-step process to build and train quantum and hybrid quantum-classical neural networks

    01

    Choose a data encoder

    Map classical inputs onto the circuit with angle or amplitude encoding, optionally with data reuploading for extra expressivity.

    02

    Design a parameterized ansatz

    Build the trainable gate sequence (PQC) that transforms the encoded state — the core layer shared by QNN and HQNN alike.

    03

    Decide: pure QNN or wrap it as HQNN

    Run the circuit on its own for an end-to-end quantum model, or embed it as a layer inside a classical backbone (CNN, MLP, or LSTM) that handles the surrounding feature extraction and output shaping — the hybrid split most current hardware needs to train reliably.

    04

    Define a loss from measurements

    Compute a loss (cross-entropy for classification, MSE for regression) from the circuit's measured observables, combined with the classical layers' outputs when hybrid.

    05

    Optimize end-to-end

    Train with parameter-shift or SPSA for the quantum parameters, passed through backprop alongside the classical layers' gradients.

    06

    Validate and ablate

    Test generalization, and ablate the quantum layer — swap it for a classical block of matching size — to confirm it is actually contributing before shipping.

    Real-World Applications

    Where QNNs and HQNNs provide practical solutions for quantum machine learning and classification tasks, and where a different quantum approach fits better

    Production

    Predictive maintenance

    Binary equipment-failure classification on ~10,000 sensor records — temperatures, rotational speed, torque, and tool wear — using a hybrid linear model wrapping a trainable quantum layer.

    Predictive maintenance case study
    Production

    Hydraulic system monitoring

    Multi-class condition monitoring across 2,205 sixty-second sensor cycles from a hydraulic test rig, using a hybrid LSTM + quantum-layer model over hundreds of pressure, flow, and temperature channels.

    Hydraulic monitoring case study
    Forecasting

    Time-series forecasting

    Wind-energy production forecasting over 26,000+ CAISO/NREL time steps combines meteorological variables and calendar features with an angle-encoded quantum layer.

    Related: volatility forecasting with quantum reservoir computing
    Research

    Classification & anomaly detection

    Small/medium datasets with nonlinear decision boundaries, anomaly-detection prototypes on spectra and time series, and research on quantum-enhanced feature maps and kernels.

    Comparison

    When search beats learning

    Not every quantum ML workload needs a trained model — transaction-level fraud detection is often a better fit for Grover-based search than for a QNN, since a fixed decision rule needs no training data at all.

    Related: fraud detection with Grover's algorithm

    Strengths & Limitations

    Strengths

    • Flexible modeling with parameterized circuits, usable standalone (QNN) or wrapped in classical layers (HQNN)
    • Hybrid form leverages mature classical training infrastructure while still exploring quantum features
    • Modular and extensible in standard ML frameworks
    • End-to-end training with ablations to isolate the quantum layer's contribution
    • Classical tooling — autodiff, optimizers, checkpointing — carries over directly to the classical layers in HQNN

    Limitations

    • No guaranteed advantage over classical models; benefits are task-dependent
    • Barren plateaus and vanishing gradients, worse as circuits get deeper or noisier
    • High shot cost and noise sensitivity on NISQ hardware
    • Careful engineering needed so the quantum layer doesn't become the training bottleneck
    • Two-stack engineering: teams need both ML and quantum-circuit expertise to debug failures

    Benchmarking and Verification

    Compare against classical baselines — logistic regression, SVM, MLP, or a classical-only backbone with the quantum layer removed — and report deltas in accuracy, calibration, robustness, and compute cost. Seed-controlled pipelines and saved checkpoints keep both QNN and HQNN runs reproducible, and the same ablation habit (swap the quantum layer for a classical block) doubles as the fastest way to tell whether it earned its place in the architecture.

    Hardware & Requirements

    QubitsDepends on the encoding strategy and feature count for a pure QNN; for HQNN, sized to the classical backbone's output feeding the quantum layer, so a pure QNN over the same raw features typically needs more qubits than an HQNN whose backbone has already compressed them
    DepthShallow-to-moderate; deeper circuits increase noise, training difficulty, and the risk of barren plateaus in either architecture, especially past shallow depths on current devices
    Shots1k–50k per circuit run depending on budget; higher counts reduce measurement variance at added runtime cost
    Classical computeHQNN's backbone layers (CNN/MLP/LSTM) train on ordinary GPU/CPU, letting teams iterate on architecture without consuming QPU time; only the quantum layer touches the QPU or simulator
    BackendStart and prototype on a simulator, then run on a quantum device to validate any performance delta before committing to hardware time

    Proof-of-Concept Examples

    Real experimental results demonstrating QNN and HQNN performance, from a pedagogical toy problem to three production HQNN implementations

    The HQNN algorithm ships in three production forms: a hybrid linear model for predictive maintenance, a hybrid LSTM plus linear model for hydraulic system condition monitoring, and a hybrid model for wind energy forecasting. Each is shown below alongside a smaller, pedagogical pure-QNN example on synthetic data, to make the QNN/HQNN contrast concrete.

    Predictive maintenance (HQNN)

    TaskBinary machine-failure classification on 10,000 equipment records (14 sensor features)
    ModelHybrid linear model with a trainable quantum layer
    MetricsAccuracy and recall on the minority failure class
    OutcomeStable simulator training, benchmarked against a classical-only linear baseline

    Hydraulic system monitoring (HQNN)

    TaskMulti-class condition monitoring across 2,205 sixty-second sensor cycles (pressure, flow, temperature)
    ModelHybrid LSTM + linear model with a quantum layer for time-series structure
    MetricsPer-fault-type classification accuracy across cooler, valve, pump, and accumulator conditions
    OutcomeStable simulator training on multi-channel process sensor data

    Wind energy forecasting (HQNN)

    TaskTime-series forecasting of wind energy production (26,304 CAISO/NREL time steps)
    OptimizerAdam, with parameter-shift for the quantum part
    MetricsAccuracy of the predictions
    OutcomeStable training on simulator on GPU; quantum device demo feasible

    Moon-dataset classification (pure QNN)

    TaskBinary classification on a 2D moon dataset
    AnsatzLayered entangling circuit with data reuploading (1–3 layers)
    OptimizerSPSA / Adam
    MetricsAccuracy/AUC, loss vs epochs
    OutcomeDemonstrates stable training on simulator; hardware demo for tiny models

    FAQ

    Common questions about QNN and HQNN implementation and performance

    What is a quantum neural network (QNN)?

    A QNN is a machine-learning model built from a parameterized quantum circuit: classical data is encoded into a quantum state, trainable gates transform it, and a measurement of the resulting observables produces the output a classical optimizer uses to update the parameters and minimize a loss. The same circuit is also considered highly expressive: relatively few qubits can, in principle, represent complex functions.

    What is a hybrid quantum neural network (HQNN)?

    An HQNN wraps that same quantum layer inside classical neural-network layers — an MLP, RNN, or CNN block — that handle input preprocessing and output shaping. The quantum circuit only has to do what circuits do well; the classical layers absorb the rest, which is why hybrid models are what typically runs on today's hardware.

    QNN vs classical neural network: what's the difference?

    A classical neural network learns entirely with classical weights and activations. A QNN replaces, or in the hybrid form augments, some of those layers with a parameterized quantum circuit whose expressivity comes from superposition and entanglement rather than added neurons. Neither is proven to beat the other in general: in practice, most published QNN results roughly match rather than outperform a well-tuned classical baseline, and the benefit is task-dependent.

    When should I use HQNN instead of a pure QNN?

    Use HQNN when you need a model that trains reliably on today's noisy hardware: classical layers carry most of the representation learning, and the quantum layer contributes one narrow transformation. All three production case studies on this page — predictive maintenance, hydraulic monitoring, and wind forecasting — use the hybrid form for that reason. Use a pure QNN for research on quantum-native feature maps or when benchmarking a device's raw learning capacity.

    Can QNNs and HQNNs run on real quantum hardware today?

    Yes, for shallow circuits and modest batch sizes. Today's devices support shallow QNNs on tens to a few hundred noisy qubits, which caps model size more than it caps whether training works at all. The usual flow is to prototype and validate on a simulator first, then evaluate on NISQ hardware with error mitigation.

    How do I avoid barren plateaus when training a QNN?

    Use shallow, problem-inspired circuits and local cost functions, initialize near identity, and train layer-wise. As hardware fidelity improves, the onset of the noise-induced plateau pushes to larger qubit counts, so the same design also scales better on future devices.

    Ready to Run QNN or HQNN?

    Run QNN and HQNN on Superpositions Studio: design circuits, plug quantum layers into your DL models, and export reproducible experiments.

    Powered by Superpositions Studio: transparent, reproducible quantum computing