Source-linked AI summary
Efficient Learning for Deep Quantum Neural Networks
Kerstin Beer, Dmytro Bondarenko, Terry Farrelly, Tobias J. Osborne, Robert Salzmann, Ramona Wolf
TL;DR
Quantum neural networks should represent general quantum operations, but existing perceptron designs can produce separable outputs. This paper proposes arbitrary-unitary quantum neurons with fidelity-based training and shows universality alongside width-scaled qubit requirements.
Problem
Quantum neural networks should represent arbitrary quantum functions, motivating architectures with the universality of classical neural networks.
Method
The proposed quantum neural network uses arbitrary unitary perceptrons and estimates fidelity through a SWAP-based quantum subroutine.
Results
The architecture is universal, and its cost-function procedure requires no more than 2 × W + m + 1 qubits, where W is the network width.
Takeaways & Limitations
The results support quantum neural networks capable of implementing universal quantum operations with resource requirements determined by network width.
Takeaways & Limitations
The channels simulable by more restricted perceptrons that act only on a few qubits remain an open question.
Abstract
from arXiv · showhide
Neural networks enjoy widespread success in both research and industry and, with the imminent advent of quantum technology, it is now a crucial challenge to design quantum neural networks for fully quantum learning tasks. Here we propose the use of quantum neurons as a building block for quantum feed-forward neural networks capable of universal quantum computation. We describe the efficient training of these networks using the fidelity as a cost function and provide both classical and efficient quantum implementations. Our method allows for fast optimisation with reduced memory requirements: the number of qudits required scales with only the width, allowing the optimisation of deep networks. We benchmark our proposal for the quantum task of learning an unknown unitary and find remarkable generalisation behaviour and a striking robustness to noisy training data.
1. Quantum algorithms for classical data · Appendix A: A summary of the existing approaches for quantum perceptrons and quantum neural networks
The paper situates its approach among quantum algorithms for classical data, qubit-circuit methods, and continuous-variable quantum systems. Existing proposals use quantum subroutines, differing circuit geometries, or non-Gaussian gates for learning and computation.
- 1. Quantum algorithms for classical data: Quantum subroutines can efficiently approximate vector inner products and store intermediate values in quantum random access memory.This approach targets efficient training of classical neural networks via quantum algorithms.
- 1. Quantum algorithms for classical data: The inner-product approach achieves a quadratically faster running time than classical counterparts.
- 1. Quantum algorithms for classical data: Qubit-circuit setups have been proposed for learning classical data through quantum algorithms.Examples include the approaches cited in [27] [28] [37].
- 1. Quantum algorithms for classical data: Although qubit-circuit setups resemble quantum neural networks, their gate choices and geometry differ from the paper’s approach.
- 1. Quantum algorithms for classical data: Continuous-variable quantum systems provide an alternative for quantum perceptrons and feedforward neural networks.These systems are discussed as another approach to quantum learning architectures.
- 1. Quantum algorithms for classical data: Non-Gaussian gates make continuous-variable systems universal for continuous-variable quantum computation and suitable for CQ learning.They match CQ learning because classical machine learning typically uses vectors in R^d.
2. Controlled unitaries as perceptrons
The section examines controlled-unitary quantum perceptrons, whose within-layer unitaries commute. It shows that these candidates cannot generate entanglement from separable layer inputs, limiting their suitability for universal quantum computation.
- Controlled-unitary form: Controlled-unitary perceptrons use unitaries of the form U = P_α|α⟩⟨α|⊗U(α).This form has been used in several proposed quantum analogues of the classical perceptron.
- Controlled-unitary form: A proposed perceptron assigns the jth qubit in layer l a unitary acting on that qubit.The cited construction defines each perceptron as a qubit with an associated unitary.
- Layer structure: Within one layer, all perceptron unitaries commute.The layer unitary is formed from the product of the perceptron unitaries acting in that layer.
- Entanglement limitation: These candidate perceptrons cannot create entanglement and therefore cannot be universal for quantum computing.The limitation follows from the separability-preserving behavior of each layer.
- Entanglement limitation: If the input state of a layer is separable, its output remains separable regardless of entanglement in the preceding layer.Consequently, every subsequent network layer, including the output layer, is not entangled.
3. Implementation on near-term quantum computers · Appendix B: The Quantum Neural Network
The paper situates quantum machine-learning proposals within near-term quantum-computing implementations and defines a quantum neural network as a layered circuit of generalized quantum perceptrons. Its construction supports layer-by-layer computation and unitary training without storing the entire network state.
- 3. Implementation on near-term quantum computers: Near-term quantum computers have motivated implementations of quantum machine-learning and quantum-assisted machine-learning proposals.Programming frameworks such as PennyLane and Strawberry Fields are cited as examples of customized quantum-ML architectures.
- 3. Implementation on near-term quantum computers: PennyLane supports quantum and hybrid quantum-classical machine learning on near-term devices, while Strawberry Fields targets light-based quantum computing.
- Appendix B: The Quantum Neural Network: A generalized quantum perceptron is defined as a unitary U acting on m input qudits and n output qudits, with unknown mixed input state ρin and zero-state outputs.For implementation, the paper focuses on perceptrons acting on m input qubits and one output qubit.
- Appendix B: The Quantum Neural Network: The quantum neural network contains an input layer, an output layer, L hidden layers, and a varying number of perceptrons in each layer.The accompanying figure illustrates the ordered application of perceptron unitaries within the first layer.
- Appendix B: The Quantum Neural Network: The QNN is a quantum-perceptron circuit that maps an input state ρin to a generally mixed output state ρout.Each layer unitary is composed of perceptrons acting on qubits in adjacent layers, and arbitrary perceptrons need not commute.
- Appendix B: The Quantum Neural Network: The network output can be represented as a composition of completely positive layer-to-layer transition maps.This follows from the layer structure and the allowance of arbitrary unitary perceptrons.
- Appendix B: The Quantum Neural Network: Layer-by-layer computation avoids storing the state of the whole network.The perceptron unitaries depend on a time parameter s, and training finds a unitary path U(s) that minimizes the cost function through iterative updates after time step ǫ.
Appendix C: Universality and implementing quantum channels
The appendix constructs a quantum neural network equivalent to a universal circuit of two-qubit gates and shows that general perceptrons can implement arbitrary quantum channels. It also identifies restricted few-qubit perceptrons as a practical setting whose simulable channels remain to be characterized.
- Universality: A network with two qubits per neuron and specified interlayer connections is equivalent to a circuit of two-qubit gates.The construction uses commuting SWAP operations and unitary perceptrons acting on neighboring layers.
- Universality: Two-qubit gates and SWAP are universal, so the constructed quantum neural network supports universal quantum computation.Alternative network geometries could enable far-away qubit interactions and more efficient simulation of some circuits.
- Quantum channels: When 2m_(l−1) = m_l and the layer-l qubits are pure, the perceptron can implement any completely positive map on the preceding-layer qubits.This follows from the Stinespring dilation theorem and extends to qudits for more general neurons.
- Quantum channels: Restricted perceptrons acting on only a few qubits would be easier to implement in practice, but their simulable channels remain an open question.The appendix contrasts this practical restriction with the general channel-implementation result.
Appendix D: Classical simulation of training the QNN
This section describes how to simulate the proposed quantum neural network on a classical computer.
- The proposed QNN can be simulated on a classical computer.
1. Example: A Simple Network · 2. The General Network
The paper illustrates QNN training on a two-layer, four-qubit example and then generalizes the same feedforward, cost-evaluation, parameter-update procedure to arbitrary networks. In both cases, parameter matrices are obtained by maximizing the cost-function increase under a Lagrange-multiplier constraint, with η = 1/λ as the learning rate.
- 1. Example: A Simple Network: The simple example uses a two-layer QNN with four qubits to clarify the training procedure.The network has no hidden layers, and its unitaries are applied sequentially from the bottom layer upward.
- 1. Example: A Simple Network: Training begins by initializing the iteration parameter and perceptron unitaries, then repeatedly feedforwards each training example through the network.The feedforward stage initializes the network state, applies the unitaries to the input, and traces out the input system.
- 1. Example: A Simple Network: After feedforward, the algorithm computes the cost function, derives each parameter matrix K_l^j, updates every perceptron unitary, and increments s by ǫ.These steps are repeated until the cost function reaches its maximum.
- 1. Example: A Simple Network: The update matrices are found by maximizing dC/ds, with a real Lagrange multiplier λ enforcing a finite solution.The derivative is linear to first order in ǫ, so unconstrained extrema occur at ±∞.
- 2. The General Network: The learning rate is defined by η = 1/λ in both the simple and general training procedures.The paper explicitly identifies η as the learning rate associated with the Lagrange multiplier.
- 2. The General Network: The general-network algorithm initializes all layer unitaries, tensors each layer state with the preceding output, applies that layer’s unitaries, and traces out the previous layer.These operations are equivalent to successively applying the layer-to-layer channels E_l^s to the input state.
- 2. The General Network: For every layer, training then computes the cost, calculates each K_l^j, updates the perceptron unitaries, increments s by ǫ, and repeats until the cost is maximal.The trace-out step is identified as crucial for efficiently calculating the parameter matrices.
- 2. The General Network: The generalized derivation maximizes dC/ds under the same finite-solution constraint to obtain each layer-and-qubit parameter matrix K_l^j.The parameter matrices are expressed using qubits from the previous layer and the current qubit in layer l.
3. Efficient Training
The training procedure exploits the feed-forward channel structure to compute cost-function derivatives through a backpropagation-like method. It uses adjoint channels and explicit Kraus representations to support implementation.
- Channel-based training: The feed-forward channel structure enables efficient training of networks with L hidden layers and N training-data pairs.The paper explicitly frames this structure as the basis for efficient training.
- Channel-based training: The cost-function derivative is computed using a method analogous to backpropagation in classical machine learning.The derivative is translated into the channel formalism to order ǫ.
- Adjoint channels: The derivative calculation propagates information through adjoint channels associated with the network layers.The adjoint channel of E_l is used in the derivative construction, and its explicit form is needed for implementation.
- Kraus representation: Each layer channel is represented with Kraus operators mapping the (l −1)th layer of m_l−1 qubits to the lth layer of m_l qubits.This representation yields an explicit definition of the adjoint channel for operators on the lth layer.
Appendix E: Estimating the optimal cost function for learning an unknown unitary
This appendix estimates the typical cost when learning an unknown unitary from random training pairs, including the effects of subspace coverage and phase ambiguity. It derives average-cost behavior for best possible guesses after training and contrasts random-state with random-orthogonal training data.
- Setup: The analysis uses N Haar-random training pairs, trains on the first n < D, and evaluates performance over all pairs.The first n inputs span an n-dimensional subspace with probability 1 and are mapped by the unknown unitary to another n-dimensional subspace.
- Training-data dependence: For nonorthogonal random inputs, the best learned unitary agrees with the target on the training subspace, whereas orthogonal inputs leave state-dependent phases undetermined.This phase ambiguity causes a quantitative performance difference for random orthogonal training states.
- Random orthogonal inputs: For random orthogonal initial training states, the resulting estimate contains the dependence D + min{n2 + 1, D2}.The appendix reports this as the alternative behavior to the random-state case, reflecting the unresolved phase ambiguity.
- Average-cost estimate: The average full cost is obtained by taking expectations over the Haar-random input states and, for the unconstrained complement, over an unknown unitary and random phases.The complementary action is unconstrained beyond mapping K⊥ to L⊥, so the estimate treats it as a Haar-random guess.
1. Generalisation
The generalisation task evaluates how well the quantum neural network performs when trained on fewer input–output pairs than the Hilbert space dimension. The study varies network architectures, parameters, and Hilbert space dimensions, comparing estimated and numerical cost-function values.
- Generalisation: Generalisation is assessed using fewer training pairs than the Hilbert space dimension.This setup is intended to measure how well the QNN generalises beyond its training pairs.
- Generalisation: The QNN is evaluated across different network architectures, parameter choices, and Hilbert space dimensions.The passage states that performance was studied under each of these variations.
- Generalisation: Plots compare estimated cost-function values from (E1) with numerical values.Violet points represent the estimates, while orange points represent numerical results.
- Generalisation: Figure 8 presents numerical results for the generalisation task.The figure is identified as the numerical-results summary for this task.
2. Robustness to Noisy Data · 3. Deep Neural Networks
The paper evaluates QNN robustness by corrupting randomly selected training pairs and assessing performance on uncorrupted test pairs. It also studies how deep neural networks train in classical simulation.
- 2. Robustness to Noisy Data: The second task examines the QNN’s robustness to noisy training data.This experiment generates good training pairs and corrupts a subset by replacing them with random pairs.
- 2. Robustness to Noisy Data: N good training pairs are generated before n randomly selected pairs are corrupted.The corrupted pairs are replaced with random pairs, and the choice of which good pairs are corrupted is random.
- 2. Robustness to Noisy Data: The plots’ x-axis reports how many good training pairs were replaced by random-state pairs.This specifies the noise level varied in the robustness experiment.
- 2. Robustness to Noisy Data: The cost function is evaluated on all good test pairs rather than on the corrupted training pairs.This evaluates performance using uncorrupted test data while training data are progressively replaced by random pairs.
- 2. Robustness to Noisy Data: Figure 9 presents numerical results for estimating QNN robustness to noisy data.The figure summarizes the robustness experiment described in the surrounding text.
- 3. Deep Neural Networks: A separate study examines how well deep neural networks train in classical simulation.This investigation is presented as an additional task beside the previous experiments.
- 3. Deep Neural Networks: Figure 10 presents numerical results for deep neural networks.The figure corresponds to the classical-simulation study of deep-network training.
Appendix G: Quantum algorithm for quantum training of the neural network · 1. Subroutine 1 · 2. Subroutine 2
Appendix G presents a quantum implementation of training that separates cost-function evaluation from derivative estimation. It uses the SWAP trick for fidelity estimation and a layered channel-implementation subroutine whose qubit and gate requirements are explicitly given.
- Appendix G: Quantum algorithm for quantum training of the neural network: The quantum algorithm assumes qubit initialization, easy application of cnot, T, and H gates, perceptrons, and computational-basis measurement.These operations define the assumed capabilities of the quantum computer.
- Appendix G: Quantum algorithm for quantum training of the neural network: Training is divided into two tasks: computing the cost function and calculating its derivative, implemented as Subroutines 1 and 2.The appendix labels these tasks as subroutine 1 and subroutine 2, respectively.
- 1. Subroutine 1: Subroutine 1 estimates F(|φ⟩, ρ) = ⟨φ|ρ|φ⟩ using the SWAP trick with |φ⟩ and ρ in separate m-qubit registers plus one ancillary qubit.The circuit estimates fidelity as a probability by applying the SWAP-trick procedure.
- 1. Subroutine 1: The fidelity estimate is obtained by measuring the control qubit, while repeated measurements reduce fluctuations from quantum projective noise and the binomial distribution.The supplied description specifies repeating the measurement N times, but does not provide the resulting expression.
- 1. Subroutine 1: For arranging the registers, bigswap requires m^2 swaps on a line or m swaps otherwise.This concludes the resource discussion for the first subroutine.
- 2. Subroutine 2: Subroutine 2 implements channel E_l by appending m_l qubits in |0⟩, applying layer-l perceptrons, and tracing out the m_(l−1)-qubit input layer.Its input is ρ_(l−1), and its output is ρ_l = E_l(ρ_(l−1)).
- 2. Subroutine 2: Across L layers, Subroutine 2 requires max{m1 + m2, m2 + m3, . . . , mL + mout} qubits and n1 + n2 + . . . + nL perceptrons.Each layer uses m_(l−1) + m_l qubits for the appended input and output, while tracing reduces this to m_l qubits without gates.
3. Algorithm for the cost function · 4. Algorithm for derivative
The cost-function algorithm estimates ⟨φx|ρ|φx⟩ by repeated state preparation, subroutine application, and the swap trick, then averages over randomly selected x. The derivative algorithm parameterizes perceptron generators, identifies individual parameter entries, and updates them with a gradient-ascent step that increases the cost.
- 3. Algorithm for the cost function: The cost-function estimate uses three operations: prepare two copies of |φx⟩, apply subroutine 2 to the last m qubits, and perform the swap trick.These operations are presented as the first three steps of the algorithm.
- 3. Algorithm for the cost function: Repeating the procedure M times for the same x estimates ⟨φx|ρ|φx⟩, with larger M providing greater accuracy.The repetition controls the accuracy of the expectation-value estimate.
- 3. Algorithm for the cost function: Sampling x randomly N times and averaging the resulting expectation values computes the cost function C = 1/x ⟨φx|ρ|φx⟩.The supplied expression is reproduced as written in the passage.
- 3. Algorithm for the cost function: The resource requirements are N × M(PL i=1 ni + 3) gates and perceptrons, while the qubit count is ≤2 × W + m + 1.Here W is the QNN width, W = max{m1, . . . , mout}.
- 4. Algorithm for derivative: For a three-qubit perceptron U = eik, the derivative procedure represents k as a sum of Pauli-tensor terms and differentiates with respect to the full parameter vector xα.The passage introduces xα as the vector of all parameters and gives k = P kα,β,γσα ⊗σβ ⊗σγ.
- 4. Algorithm for derivative: The parameter-selection vector has ϵ as its αth entry, with α = 1, . . . , (#perc) × 64.The displayed vector contains a single nonzero entry ϵ.
- 4. Algorithm for derivative: For a four-qubit QNN with two three-qubit perceptrons, the derivative construction is extended to the corresponding multi-perceptron parameter expression.The supplied passages identify this architecture and show its derivative representation.
- 4. Algorithm for derivative: The optimization concludes with a gradient-ascent step that always makes the cost function larger.The passage explicitly states the monotonic effect of this update.