Source-linked AI summary
Continuous-variable quantum neural networks
Nathan Killoran, Thomas R. Bromley, Juan Miguel Arrazola, Maria Schuld, Nicolás Quesada, Seth Lloyd
TL;DR
The paper develops quantum neural networks for machine learning in the continuous-variable architecture. It proposes universal variational circuits, embeds classical networks, and demonstrates promise across several modeling tasks and hybrid architectures.
Problem
Quantum computers offer potential advantages for machine learning, motivating neural-network models that exploit quantum effects such as superposition, interference, and entanglement.
Method
The paper builds multilayer CV variational circuits from continuously parameterized universal gates, using Gaussian and non-Gaussian operations for affine transformations and nonlinear activation functions.
Results
The proposed models show promise across numerical experiments, including fraud detection, image generation, and hybrid classical-quantum network tasks.
Takeaways & Limitations
CV quantum neural networks support fully connected, convolutional, recurrent, and residual variants, while classical neural networks can be embedded as a restricted case.
Abstract
from arXiv · showhide
We introduce a general method for building neural networks on quantum computers. The quantum neural network is a variational quantum circuit built in the continuous-variable (CV) architecture, which encodes quantum information in continuous degrees of freedom such as the amplitudes of the electromagnetic field. This circuit contains a layered structure of continuously parameterized gates which is universal for CV quantum computation. Affine transformations and nonlinear activation functions, two key elements in neural networks, are enacted in the quantum network using Gaussian and non-Gaussian gates, respectively. The non-Gaussian gates provide both the nonlinearity and the universality of the model. Due to the structure of the CV model, the CV quantum neural network can encode highly nonlinear transformations while remaining completely unitary. We show how a classical network can be embedded into the quantum formalism and propose quantum versions of various specialized model such as convolutional, recurrent, and residual networks. Finally, we present numerous modeling experiments built with the Strawberry Fields software library. These experiments, including a classifier for fraud detection, a network which generates Tetris images, and a hybrid classical-quantum autoencoder, demonstrate the capability and adaptability of CV quantum neural networks.
I. INTRODUCTION
The paper motivates continuous-variable quantum neural networks as a natural quantum framework for continuous neural computations and introduces a universal, layered architecture that extends classical networks.
- Motivation: Quantum computers may enhance machine learning through potential speedups for data fitting, principal component analysis, Bayesian inference, Monte Carlo methods, and other algorithms.
- Motivation: Deep learning transforms continuous vectors and tensors through multilayer structures that combine linear transformations with nonlinear activation functions.
- Motivation: Qubit-based architectures are less flexible for continuous-valued neural networks because they require indirect nonlinearities or binarization and make standard neural-network structures cumbersome.
- Motivation: The continuous-variable model encodes information in quantum states of fields with continuous observables and remains largely unexplored as a machine-learning setting.
- Contribution: The proposed CV quantum neural network uses continuously parameterized operations, stacks layers to increase expressiveness, and provides a universal CV-computation architecture.
- Contribution: Classical neural networks can be embedded as a special case without superposition or entanglement, while the paper also develops specialized quantum versions and studies their theory and experiments.
B. Quantum computing and the CV model
The CV model represents quantum information in bosonic modes with continuous phase-space variables, while Gaussian gates implement affine transformations through decomposable optical operations.
- CV representation: The CV architecture encodes information in bosonic modes and is physically realizable with optical systems, microwave devices, and ion traps.
- CV representation: A single qumode uses real-valued phase-space variables (x, p), while N qumodes use 2N real-valued variables.
- CV representation: Phase-space and Hilbert-space formulations give equivalent predictions, allowing CV systems to be described from wave-like or particle-like perspectives.
- Gaussian operations: Gaussian gates include rotations, displacements, squeezing, and beamsplitters, with parameters φ, θ ∈ [0, 2π], α ∈ C, and r ∈ R.
- Gaussian operations: Gaussian operations correspond naturally to affine phase-space transformations, with a real symplectic matrix M and displacement vector α.
- Gaussian operations: Every Gaussian transformation can be decomposed into interferometers, squeezing operations, and displacements, using the Euler or Bloch–Messiah decomposition of symplectic matrices.
Universality in the CV model
The paper frames CV quantum neural networks as variational circuits inspired by classical multilayer networks, using CV gate correspondences and layered universal building blocks.
- Conceptual correspondences: CV quantum computation associates neural-network variables with quantum operators, mapping classical weights and biases to symplectic matrices and displacement vectors.
- Quantum neural-network model: The proposed CV quantum neural-network scheme is inspired by classical neural networks and variational quantum circuits for near-term quantum devices.
- Quantum neural-network model: A single CV quantum-neural-network layer applies interferometers, local squeezing, a second interferometer, local displacements, and local non-Gaussian gates.
- Quantum neural-network model: The first four circuit components implement an affine transformation, followed by a final nonlinear transformation.
- Quantum neural-network model: The general model is the quantum analogue of a classical fully connected network and can embed classical networks as a special case without superposition or entanglement.
A. Fully connected quantum layers
CV quantum layers combine Gaussian operations for affine transformations with non-Gaussian gates for nonlinear transformations, forming continuously parameterized universal circuit layers. These layers can be stacked, varied in width, accept classical or quantum inputs, and reproduce classical neural-network layers within the CV formalism.
- A. Fully connected quantum layers: Each layer applies interferometers, displacement and squeezing operations, followed by a non-Gaussian gate such as a cubic-phase or Kerr gate.The gate parameters form the network’s trainable variables, with the non-Gaussian parameter optionally fixed.
- A. Fully connected quantum layers: Gaussian operations parameterize arbitrary affine transformations, while the added non-Gaussian gate supplies the neural-network nonlinearity.The combined transformation is nonlinear while the underlying quantum circuit remains unitary.
- A. Fully connected quantum layers: Multiple layers can be stacked with changing widths by measuring or tracing out qumodes between layers, and inputs may be classical or quantum.Classical inputs can be encoded through gate arguments or displacements, while final outputs are obtained by homodyne measurements.
- A. Fully connected quantum layers: A classical feedforward layer is embedded by decomposing its weight matrix into orthogonal and diagonal factors implemented with interferometers and squeezing.The construction assumes a full-rank weight matrix and uses phaseless interferometers to avoid mixing x and p coordinates.
- A. Fully connected quantum layers: The embedded construction realizes |x⟩→|ϕ(Wx+b)⟩, matching a single classical neural-network layer while allowing practical approximations with finitely squeezed states.The nonlinear transformation is implemented using an ancilla, a non-Gaussian unitary, mode swapping, and tracing out the ancilla.
C. The power of CV neural networks
CV neural networks gain capabilities beyond transformations that merely act on fixed basis states by operating on superpositions and using a universal CV gate set. This universality also implies that general CV quantum neural networks are not expected to be efficiently classically simulable.
- C. The power of CV neural networks: Unlike the preceding basis-state transformations, general CV neural networks can act on superpositions and entangled states.The single-layer gates form a universal gate set, so the network shares the capabilities of universal CV quantum computation.
- C. The power of CV neural networks: Any quantum circuit can be represented by a quantum neural network by replacing each circuit gate with a parameterized layer and zeroing unused gate parameters.Because each layer contains the universal gate set, it can reproduce the selected gate and therefore the complete circuit.
- C. The power of CV neural networks: General CV quantum neural networks are not expected to be efficiently simulated on classical computers.A Fourier-transformed construction acts on an equal superposition of all classical inputs, connecting the claim to CV-IQP circuits.
- C. The power of CV neural networks: Efficient exact classical simulation of CV-IQP circuits would imply a collapse of the polynomial hierarchy to its third level.The cited result is then extended to approximate classical simulation under additional conditions.
D. Beyond the fully connected architecture
The CV architecture supports quantum adaptations of convolutional, recurrent, and residual networks by encoding their structural constraints into Gaussian transformations, optical feedback, and controlled-X operations. The paper also illustrates these architectures across several machine-learning tasks.
- Convolutional network: A quantum convolutional layer enforces translation symmetry through a translationally invariant Gaussian Hamiltonian and a block-Toeplitz symplectic matrix.The resulting transformation performs conjugate convolutions on x and p coordinates while respecting the uncertainty principle.
- Recurrent network: A quantum recurrent layer combines an external input with an internal state from a previous time step and can reuse the same optical circuit through feedback.Optical fibres connect output modes back to input modes, while subsets of modes can carry data and outputs.
- Residual network: A quantum residual layer adds input and output signals using a controlled-X or SUM gate implemented with Gaussian operations.The resulting residual transformation also acts on arbitrary wavefunctions in superposition.
- Applications: The explored task architectures include curve fitting, hybrid fraud detection, Tetris image generation, and a hybrid autoencoder for phase-space encoding.These examples use position, photon-number, and continuous phase-space encodings across classical-quantum and quantum settings.
IV. NUMERICAL EXPERIMENTS
Numerical experiments simulated with Strawberry Fields cover supervised and unsupervised tasks using fully quantum and hybrid architectures. In curve fitting, six-layer networks trained on noisy functions closely reproduced the noiseless target curves.
- IV. NUMERICAL EXPERIMENTS: The experiments use Strawberry Fields simulations, automatic differentiation or numerical optimization, and both hybrid and fully quantum architectures.Unless otherwise stated, the networks use Adam optimization and Kerr gates as their non-Gaussian operation.
- IV. NUMERICAL EXPERIMENTS: The experiments are presented as evidence of the range of potential CV quantum-neural-network applications.The paper notes that dedicated hardware could extend this range beyond limitations imposed by classical simulation.
- Experiment A: Six-layer networks trained for 2000 steps with cutoff dimension 10 fit noisy versions of sin(πx), x3, and sinc(πx).The training noise has standard deviation ϵ = 0.1.
- Experiment A: The curve-fitting outputs closely resemble the noiseless ground-truth curves despite noisy training data.The reported input-output functions are smooth and largely immune to noise, with no regularization needed for the explored problems.
A. Training quantum neural networks
CV quantum neural networks are trained on noisy curve-fitting tasks while varying architecture, optimization, regularization, and simulated photon loss. The experiments show smooth fitting, depth saturation, resilience to loss, optimizer differences, and the need for penalties or regularization to stabilize truncated simulations.
- Training setup: Inputs are encoded as position-displaced vacuum states, and supervised training minimizes mean square error between circuit outputs and target function values.The training data are tuples (x_i, f(x_i)) with uniformly sampled inputs.
- Noise and overfitting: Quantum circuits produce smooth input-output functions that largely ignore data noise and generalize from training to test data without regularization in the studied problems.This follows from the limited change in observable expectations between nearby quantum states.
- Depth and imperfections: MSE improves as circuit depth increases through six layers, then saturates near the noise variance ϵ^2 = 0.01 for the tested curve-fitting task.The fitted function is sin(πx) on [−1, 1] in the accompanying figure.
- Depth and imperfections: A six-layer circuit with 10% loss per layer experiences 46.9% total loss, yet fit quality remains resilient to photon-loss imperfections.The authors indicate that the circuit learns to compensate for losses.
- Optimization: Adam with an adaptive learning rate performs better than vanilla SGD, while Nelder–Mead and SLSQP converge significantly more slowly.The comparison includes three numerical methods and two automatic-differentiation methods.
- Regularization: Without parameter control, truncated-Hilbert-space simulations become unstable; L1, L2, and trace penalties restore near-zero loss while maintaining unit trace.Without regularization, the state trace falls to 0.1; L1 regularization leaves nonlinear-gate parameters in layers 3 and 4 undamped.
B. Supervised learning with hybrid networks
The paper builds hybrid classical-quantum networks for fraud classification and labeled image generation, combining classical preprocessing with continuous-variable quantum circuits. Experiments demonstrate proof-of-principle classification and image reproduction while highlighting simulation-related constraints.
- Fraud classification: The fraud dataset contains 284,807 transactions represented by 28 anonymized features, with only 0.172% labeled fraudulent.The experiment splits fraudulent transactions between training and test datasets.
- Fraud classification: A classical neural network controls the parameters of a two-mode quantum neural network whose photon-number output determines whether a transaction is genuine or fraudulent.The quantum section uses two vacuum-initialized modes, four hidden layers, and photon-number measurement with single-photon output encoding.
- Fraud classification: At threshold pth = 0.61, the model’s confusion matrix and ROC curve characterize classification using true negative and false negative rates.The selected threshold is the closest chosen point to the ideal ROC location, while fraud detection prioritizes minimizing false negatives.
- Fraud classification: The fraud experiment demonstrates a proof-of-principle classifier for a practically relevant task, but its width and depth are restricted because the quantum network is simulated classically.The authors explicitly note that a classical neural network can outperform this hybrid model under those restrictions.
- Labeled image generation: The image network reproduces desired low-photon images while populating higher-photon sectors to preserve pairwise overlaps and satisfy unitarity.This permits image fidelity in the restricted image Hilbert space even when desired outputs have different overlaps from nearly orthogonal inputs.
D. Hybrid quantum-classical autoencoder
The hybrid autoencoder uses a classical encoder to map three Fock-state inputs into continuous phase-space displacements, followed by a quantum decoder. It reconstructs the trained states with high fidelity and produces intermediate states for intermediate displacements.
- Architecture: The autoencoder combines a classical feedforward encoder with a one-qumode quantum decoder whose objective is to reproduce the input Fock state.The encoder has three input dimensions and a two-dimensional output that controls the quantum displacement.
- Architecture: The encoder’s two outputs set the x and p components of a displacement applied to vacuum, providing a continuous encoding of the Fock states.The resulting displaced vacuum states have Gaussian phase-space distributions, giving the architecture a variational-autoencoder resemblance.
- Training: Training uses one-hot inputs for |0⟩, |1⟩, and |2⟩, with fidelity measured after projection onto the subspace of the first three Fock states.A trace penalty is included, and the displacement radius is constrained to |α| = 1.5.
- Results: 99.5% fidelity is achieved for each of the three trained Fock states at its best-matching input displacement.Performance is evaluated by varying the displacement after removing the classical encoder.
- Results: Intermediate phase-space displacements produce output states that illustrate smooth transitions between the three trained Fock-state regions.The paper visualizes wavefunctions for intermediate points between each pair of encoded states.
V. CONCLUSIONS
The paper presents a continuous-variable quantum neural-network architecture and evaluates it through theory and numerical experiments. It extends familiar neural-network structures into quantum settings and reports promise across the tasks studied.
- Conclusions: The proposed architecture uses the continuous-variable formalism and is examined through theoretical analysis and numerical experiments.The authors describe it as leveraging quantum properties of the electromagnetic field.
- Conclusions: The paper develops quantum variants of fully connected, convolutional, recurrent, and residual neural networks.These variants extend the range of specialized architectures considered within the quantum neural-network framework.
- Conclusions: Numerical analyses show promise for the quantum neural-network models on the machine-learning tasks considered, including joint classical-quantum architectures.The conclusion emphasizes capability across the experiments rather than a single benchmark result.
Appendix A: Linear interferometers
The appendix analyzes how passive linear interferometers transform multimode position eigenstates under an orthogonal-mode restriction. Under this restriction, the transformed state remains a product state.
- Setup: The appendix defines the multimode vacuum and considers a passive linear-optical transformation U acting on multimode states.The transformation is examined using the multimode position-eigenstate representation.
- Orthogonal restriction: The interferometer is restricted to a real unitary matrix U, making it orthogonal and satisfying U^T U = U U^T = 1_N.This orthogonality condition is the key design assumption used in the derivation.
- Derivation: Defining y = U^T x and C = U^T expresses the transformed multimode state in the notation used for the main-text transformation.The appendix uses this variable change to match Eq. (20).
- Result: Under the orthogonal interferometer restriction, the output state remains a product state rather than becoming mode-entangled.The appendix relates this result to the exception for equally squeezed product inputs when squeezed and antisqueezed quadratures are not mixed.
Appendix B: Convolutional networks
The section connects translationally invariant quadratic Hamiltonians with Block Toeplitz symplectic transformations, establishing their relationship to one-dimensional convolutions. It also notes that two-dimensional convolutions require doubly block circulant matrices, which are not treated further.
- Translation symmetry and Toeplitz structure are both connected to one-dimensional convolutions.
- Two-dimensional image-processing convolutions correspond to doubly block circulant rather than Toeplitz matrices.The section does not consider this extension, although it states that the basic ideas remain the same.
- A Gaussian unitary generated by a Hamiltonian H on N modes implements an affine transformation's matrix multiplication when H is quadratic and generates no displacements.
- The Hamiltonian's inner matrix is denoted eH, while its phase-space action is represented by the symplectic transformation MH derived using the symplectic form Ω.
- Translational invariance is imposed using a shift operator that maps each mode's x and p operators to the next mode, with periodic boundary conditions.The periodic identification maps the Nth mode back to the first, allowing translation to be represented by an N × N orthogonal matrix.
- In the 2N-dimensional phase space, translation is represented by the direct sum T ⊕ T, acting consistently on the x and p sectors.The Hamiltonian's translationally invariant condition is then expressed through this translation representation.