Source-linked AI summary

An Artificial Neuron Implemented on an Actual Quantum Processor

Francesco Tacchino, Chiara Macchiavello, Dario Gerace, Daniele Bajoni

arXiv:1811.02266v1quant-ph

TL;DR

The paper addresses scaling complexity in multilayer perceptrons by introducing a quantum perceptron algorithm with exponentially efficient encoding resources. A two-qubit implementation on an IBM processor classifies simple patterns, while simulations extend the approach to larger inputs.

  • Problem

    Increasing nodes and interlayer connectivity make multilayered perceptron computational complexity grow, motivating quantum implementations.

  • Method

    The authors encode m-dimensional classical input and weight vectors using N qubits, with m = 2^N, and obtain threshold nonlinearity through measurement of an ancilla qubit.

  • Results

    The model experimentally classifies simple patterns on an IBM quantum processor and represents 4-bit strings with 2 qubits and 16-bit strings with 4 qubits.

  • Takeaways & Limitations

    The quantum perceptron provides a concrete first step toward artificial quantum neural networks implemented on near-term quantum hardware.

  • Takeaways & Limitations

    Generic quantum states and controlled transformations can require exponentially many elementary gates, potentially hindering practical advantages as the qubit count increases.

Abstract

from arXiv · show

Artificial neural networks are the heart of machine learning algorithms and artificial intelligence protocols. Historically, the simplest implementation of an artificial neuron traces back to the classical Rosenblatt's `perceptron', but its long term practical applications may be hindered by the fast scaling up of computational complexity, especially relevant for the training of multilayered perceptron networks. Here we introduce a quantum information-based algorithm implementing the quantum computer version of a perceptron, which shows exponential advantage in encoding resources over alternative realizations. We experimentally test a few qubits version of this model on an actual small-scale quantum processor, which gives remarkably good answers against the expected results. We show that this quantum model of a perceptron can be used as an elementary nonlinear classifier of simple patterns, as a first step towards practical training of artificial quantum neural networks to be efficiently implemented on near-term quantum processing hardware.

INTRODUCTION

The paper motivates quantum perceptrons as a response to rising complexity in multilayered classical networks and introduces a compact quantum design experimentally tested on a small processor. The model uses quantum encoding to classify simple patterns nonlinearly.

  • Quantum processors can represent and manipulate large complex-valued vectors and matrices, motivating quantum implementations of artificial neural networks.
  • Classical perceptrons remain foundational but become computationally complex as multilayer networks add nodes and interlayer connectivity.
  • The proposed design encodes an m-dimensional classical input and weight vector with N qubits, where m = 2^N, while using multipartite entanglement to reduce resources.
  • A 2-qubit version was implemented on an IBM quantum processor to test the proposed quantum perceptron experimentally.
  • The quantum perceptron sorts simple patterns, including vertical or horizontal lines, among all possible inputs.

QUANTUM CIRCUIT MODELING OF A CLASSICAL PERCEPTRON

The quantum circuit encodes inputs and weights into quantum states, computes their inner product, and measures an ancilla to obtain a nonlinear perceptron activation.

  • N qubits provide 2^N computational-basis states, allowing ±1-valued classical input and weight vectors to be encoded as quantum-state amplitudes.
  • The algorithm prepares the input state |ψ_i⟩ from an initialized N-qubit register using a unitary transformation U_i.
  • A unitary transformation U_w computes the input–weight inner product, whose normalized information is stored in the coefficient c_{m−1}.
  • An ancilla qubit receives the relevant information through a multi-controlled NOT operation.
  • Measuring the ancilla produces an activated perceptron with probability |c_{m−1}|^2, supplying the model’s nonlinearity.

IMPLEMENTATION OF THE UNITARY TRANSFORMATIONS

The paper addresses efficient implementation of the quantum perceptron's input- and weight-dependent unitaries by replacing an exponentially costly brute-force construction with hypergraph-state generation. The optimized procedure reduces required resources and is demonstrated in a four-qubit circuit, while retaining exponential worst-case circuit-depth cost.

  • Efficient unitary implementation is critical because it may distinguish genuine quantum advantage from classical alternatives in neural-network applications.
  • The proposed workflow compares brute-force successive sign-flip blocks with a more effective hypergraph-state approach, the only one used to implement the model on a real quantum device.
  • Each sign-flip block changes the phase of one computational-basis element while leaving the others unchanged; the blocks commute and can be applied in any order.
  • 2^N−1 sign-flip blocks suffice in the worst case because global phase makes at most half of the m = 2^N factors independently relevant.
  • Hypergraph-state generation uses single-qubit and multi-controlled Z gates, with p-controlled gates potentially performed in parallel after an initial H⊗N operation.
  • The optimized algorithm reduces quantum resources relative to brute force, but still has exponential worst-case circuit depth or processor clock cycles.

NUMERICAL RESULTS AND QUANTUM SIMULATIONS

The quantum perceptron was tested on an IBM quantum processor for all 2-qubit input-weight combinations and simulated for selected 4-qubit patterns. The optimized hypergraph-state implementation matched ideal outputs closely and recognized simple image patterns.

  • Hardware constraints: The real-hardware experiment was limited to N = 2 because IBM hardware connectivity constrained larger implementations.The authors nevertheless identify exponential growth in the analyzable problem dimension as a feature of the encoding scheme.
  • N = 4 simulation: The N = 4 implementation uses 4 qubits to represent selected 4 × 4 image-pattern cases, while multipartite-gate operations include CNOT and Toffoli decompositions.The reported examples compare ideal linear-algebra answers with quantum-algorithm simulation results.
  • N = 2 experiments: The 2-qubit model analyzed all 16 input-weight combinations, with ideal activation of 1 for a weight vector or its negative and outputs below 0.25 otherwise.This supports recognition of vertical lines, horizontal lines, and checkerboard patterns in 2 × 2 pixel grids.
  • N = 2 experiments: On the IBM Q 5 “Tenerife” processor, the hypergraph-state algorithm produced substantially more accurate outputs than the sign-flip approach, with small quantitative errors.The hypergraph formulation embeds global phase symmetry and maintains symmetric performance across possible inputs and weights.
  • N = 4 simulation: For N = 4, a Qiskit circuit simulator evaluated selected cross-shaped input patterns against a chosen weight vector, with 8192 repetitions per result.The simulated quantum-circuit outputs showed overall excellent agreement with standard linear-algebra values within finite-shot statistical inaccuracy.
  • Pattern discrimination: The perceptron outputs above 0.5 for the weight pattern and its negative when images differ from either by at most 2 bits.This provides a threshold-based pattern-discrimination behavior for nearby inputs.

CONCLUSIONS AND DISCUSSION

The paper proposes and tests a quantum perceptron for near-term quantum processors, while identifying encoding complexity and binary inputs as current boundaries. It outlines extensions toward continuously valued data and multilayer quantum neural networks.

  • The model was experimentally tested on a 5-qubit IBM superconducting quantum computer.
  • 4-bit strings were represented and classified using 2 qubits, while 16-bit strings used only 4 qubits.
  • Generic quantum-state encoding and multiply controlled operations may require exponentially many gates or create severe scaling issues as N increases.The practical impact depends on processor constraints and required accuracy.
  • The present analysis restricts inputs and weights to binary values for clarity and implementation simplicity.
  • Future work could encode continuously valued vectors and connect quantum perceptrons into fully quantum-coherent feedforward deep networks.The proposed architecture assigns ancilla qubits roles in introducing nonlinearity and propagating information between layers.

AKNOWLEDGEMENTS

The authors acknowledge financial support from the University of Pavia and the Italian Ministry of Education, University and Research, along with use of IBM Quantum Experience.

  • The University of Pavia Blue Sky Research project BSR1732907 supported the research.
  • The Italian Ministry of Education, University and Research supported the work through the Dipartimenti di Eccellenza Program (2018-2022).
  • The authors acknowledge use of the IBM Quantum Experience.
Loading 1811.02266v1…