Source-linked AI summary

Classification with Quantum Neural Networks on Near Term Processors

Edward Farhi, Hartmut Neven

arXiv:1802.06002v2quant-ph

TL;DR

The paper asks whether quantum neural networks can represent and learn binary labels for classical and quantum data. It develops parameterized quantum circuits with readout-based supervised learning, and simulations show successful classification of handwritten digits, superposed classical data, and selected quantum states. The work remains exploratory because it relies on classical simulation and some represented functions may require exponential circuit depth.

  • Problem

    The paper investigates whether quantum circuits can represent and learn labels for classical data and properties of quantum states, extending classification to inputs unavailable to classical neural networks.

  • Method

    The QNN applies parameterized unitary transformations to an encoded input state and predicts a binary label by measuring a Pauli operator on a designated readout qubit.

  • Results

    Simulations learned to classify downsampled handwritten digits, superpositions representing digit batches, and selected quantum states labeled by the sign of a Hamiltonian expectation value.

  • Takeaways & Limitations

    The framework provides an exploratory route for running supervised quantum classification on near-term gate-model processors and for studying tasks involving quantum-state inputs.

  • Takeaways & Limitations

    The demonstrations use classical simulations of small systems, and some Boolean functions may require exponentially long circuits; the quantum-state examples also come from simply generated states with classical descriptions.

Abstract

from arXiv · show

We introduce a quantum neural network, QNN, that can represent labeled data, classical or quantum, and be trained by supervised learning. The quantum circuit consists of a sequence of parameter dependent unitary transformations which acts on an input quantum state. For binary classification a single Pauli operator is measured on a designated readout qubit. The measured output is the quantum neural network's predictor of the binary label of the input state. First we look at classifying classical data sets which consist of n-bit strings with binary labels. The input quantum state is an n-bit computational basis state corresponding to a sample string. We show how to design a circuit made from two qubit unitaries that can correctly represent the label of any Boolean function of n bits. For certain label functions the circuit is exponentially long. We introduce parameter dependent unitaries that can be adapted by supervised learning of labeled data. We study an example of real world data consisting of downsampled images of handwritten digits each of which has been labeled as one of two distinct digits. We show through classical simulation that parameters can be found that allow the QNN to learn to correctly distinguish the two data sets. We then discuss presenting the data as quantum superpositions of computational basis states corresponding to different label values. Here we show through simulation that learning is possible. We consider using our QNN to learn the label of a general quantum state. By example we show that this can be done. Our work is exploratory and relies on the classical simulation of small quantum systems. The QNN proposed here was designed with near-term quantum processors in mind. Therefore it will be possible to run this QNN on a near term gate model quantum computer where its power can be explored beyond what can be explored with simulation.

1 Introduction and Setup

The paper frames binary classification as learning a parameterized quantum circuit whose readout measurement predicts labels for encoded input strings. It separates representational capacity from supervised optimization and describes a stochastic-gradient procedure for fitting the circuit.

  • Input encoding: Classical samples are encoded as computational-basis states on n data qubits plus a readout qubit.The readout qubit is initialized to 1 before the circuit acts.
  • Quantum predictor: A sequence of parameterized few-qubit unitaries transforms each input, and a Pauli measurement on the readout qubit supplies the predicted label.The prediction is the average measurement outcome, a real number between −1 and 1.
  • Objective: The learning objective is to choose parameters so the predicted label approaches the true binary label while minimizing the sample loss.The loss is defined from the label multiplied by the readout expectation value.
  • Optimization: Supervised training repeatedly measures a randomly selected training example, evaluates its loss, and adjusts parameters using local search or a loss gradient.This procedure is identified as stochastic gradient descent when training examples are sampled randomly.
  • Optimization: The circuit’s gradient is bounded by the number of parameters because derivatives of the few-qubit generator operators have norm at most 1.The paper presents this as avoiding gradient blow-up without additional intervention.

2 Representation

The QNN can represent any Boolean label function, using unitary circuits whose depth may become exponential for some functions. Specific constructions illustrate efficient representations for subset parity and subset majority.

  • Any two-valued label function can be represented by a quantum circuit, although some functions may require high circuit depth.The construction establishes representation abstractly before addressing how efficiently the circuit can be built.
  • Boolean label functions can be expanded in a Reed-Muller formula containing binary coefficients and mod-2 additions.The formula includes terms involving products of input bits and can itself be exponentially long.
  • Each nonzero Reed-Muller term produces a controlled bit flip on the readout qubit, and these controlled operations can be decomposed into two-qubit unitaries.A label function with RM terms becomes a product of commuting operators, each decomposable into n^2 two-qubit unitaries.
  • 2.1 Representing Subset Parity and Subset Majority: Subset parity requires at most n commuting two-qubit operators, all involving the readout qubit.This gives a compact quantum representation, whereas a classical neural network requires three layers for subset parity.
  • 2.1 Representing Subset Parity and Subset Majority: Subset majority is represented using a rotation determined by the selected bits, with an odd subset size assumed to avoid zero-sum ambiguity.Although its compact expression is not in Reed-Muller form, thresholding repeated readout measurements yields perfect categorical error.

3 Learning

The QNN can learn several classical and quantum classification tasks, but learnability depends strongly on the function, encoding, and circuit setting. Simulations demonstrate successful learning while exposing scaling and representation limitations.

  • Learning Subset Parity: Subset-parity learning succeeded with far fewer than 2^n samples, and 10% label noise did not impede prediction of unseen examples.The result came from stochastic-gradient-descent simulations using 6–16 bits.
  • Learning Subset Parity: For subset parity, exponentially small average gradients prevent stochastic gradient descent from reaching the narrow region containing optimal parameters at large n.The empirical-risk landscape is nearly flat except near the optimum, so gradients can fall below machine precision.
  • Learning Subset Parity: The subset-parity setup is doomed at large bit number because its 2^n parity functions are orthonormal and their empirical-risk gradients cannot distinguish the target function.This connects the observed failure to the cited failure-of-gradient-based-deep-learning phenomenon.
  • Learning Subset Majority: Subset majority was efficiently learnable in small simulations because its label is separable by one hyperplane, yielding low sample complexity.The paper relates this behavior to the sign of a weighted sum of input bits.
  • Learning to Distinguish Digits: 2% categorical error was achieved on handwritten-digit classification with 96 ZX/XX parameters after seeing less than the full sample set.The circuit used three ZX layers alternating with three XX layers, with the readout qubit as the second qubit.
  • Classical Data Presented in Superposition: Quantum-batch training required more than an order of magnitude fewer samples than sequential single-sample training for comparable or better test generalization.This comparison used 16-bit data on a 17-qubit simulator; the empirical risk decreased more smoothly in the quantum-batch case.

4 Conclusions and Outlook

The paper presents a supervised-learning framework for quantum neural networks that classifies both classical and quantum data using parameterized quantum circuits. Simulations demonstrate classification on handwritten digits, superposed classical data, and selected quantum states, while the authors emphasize exploratory scope and the absence of demonstrated quantum advantage.

  • Classical data: For classical n-bit inputs, two-qubit-unitary circuits can represent every Boolean label function, although some representations require exponentially many gates.The input string is mapped to a computational basis state and a Pauli operator is measured on a readout qubit.
  • Framework: The framework uses parameterized one- and two-qubit unitaries, measured output qubits, and iterative parameter updates to perform supervised classification.Parameters are varied to make the measured output more likely to match each training label.
  • Classical data: A classical simulation learned to distinguish downsampled handwritten images of two digits using a parameterized gate set and random initialization.The experiment simulated a 17-qubit quantum device because an error-free processor of that size was not available.
  • Quantum-encoded data: Simulations found that learning was possible when classical samples were encoded as quantum superpositions, though preparing and repeatedly refreshing those states adds computational cost.The superposition is consumed by the network, so fresh copies are needed for gradient descent unless copies are prepared and stored.
  • Quantum data: For selected quantum states, the network learned to predict the sign of a Hamiltonian expectation value on new examples.The study restricted states to those generated from a simple product state by local unitary transformations and simulated 8+1 qubits.
  • Limitations and outlook: The numerical work was exploratory, limited to simulations of at most 17 qubits, and did not establish an advantage over classical supervised-learning methods.The authors note that labeled quantum states without concise classical descriptions have no classical counterpart for direct comparison.
  • Limitations and outlook: The framework is intended for near-term gate-model processors, with hybrid classical-quantum architectures proposed for real-world tasks with modest input dimensions.A classical network could implement early layers while a smaller QNN implements final layers.
  • Limitations and outlook: The authors describe QNN design as exploratory, noting that only a single measured qubit is used and that alternative circuit designs may reveal greater capability.They identify unused information in the input qubits as a possible source of novel network designs.
Loading 1802.06002v2…