Hybrid quantum classical classification system for classifying images and training method

The hybrid quantum-classical computing system efficiently processes image features using multiple variational quantum circuits, overcoming qubit limitations to achieve quantum supremacy in image classification tasks.

JP2024132890AActive Publication Date: 2024-10-01TERRA QUANTUM AG
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024017066
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-16
Filing Date
2024-02-07
Publication Date
2024-10-01
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

Quantum devices are limited by the number of qubits and circuit depth, restricting the application of variational quantum circuits, particularly in image classification tasks.

Method used

A hybrid quantum-classical computing system that utilizes a convolution block, flattening layer, and classification block to process image features, employing multiple independent variational quantum circuits with parameterized quantum gates to classify input features efficiently, despite limited qubits and entanglement.

Benefits of technology

The system achieves quantum supremacy in image classification by processing subsets of features in parallel, achieving accuracy comparable to classical methods with fewer trainable parameters, even in noisy intermediate-scale quantum devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024132890000001_ABST
    Figure 2024132890000001_ABST
Patent Text Reader

Abstract

To provide a hybrid quantum classical computation system for classifying a grid of features provided as an input.SOLUTION: A hybrid quantum classical computation system 10 comprises: a convolutional block 12 including a convolutional filter that receives a grid of features, and outputs a plurality of output features of a grid 26 of input features on the basis of a trainable configuration of the convolutional filter; a flattening layer 14 for transforming filtered grids 28a-28d of the output features received from the convolutional block into a flattened feature vector 16; and a classifying block 22 for receiving the flattened feature vector and generating output classification. The classifying block comprises a plurality of independent variational quantum circuits 20. The plurality of independent variational quantum circuits receives subsets with different features from the flattened feature vector as an input feature vector, and a measurement output 32 of the plurality of independent variational quantum circuits is processed by complete connection classification MLP 34 in order to determine an output label 36 as the output classification.SELECTED DRAWING: Figure 3A
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention is in the field of quantum computing. More precisely, the present invention relates to a hybrid quantum-classical computing system as part of a trainable classifier. [Background technology]

[0002] Quantum computers provide a platform for controllable quantum mechanical systems whose states and interactions can be controlled to perform computations. Computations are realized by the deterministic evolution of the controllable quantum mechanical systems, e.g. qubits as the quantum analogue of classical bits, and the state of the quantum mechanical systems can be measured to determine the outcome of the computation.

[0003] Control operations on these qubits are called quantum gates. Quantum gates can act coherently on qubits to induce changes in the state of a single qubit (so-called single-qubit gates) and to act on multiple qubits (so-called multi-qubit gates), e.g. entangle the state of multiple qubits and any combination of the qubit states. For example, a single-qubit gate may induce a rotation of the spin state of an electron by a selectable value, e.g. π / 2. A multi-qubit gate may act coherently on two or more qubits, such as a coherent CNOT operation on the state of two qubits. Multiple quantum gates can be applied in parallel or sequentially to the qubits of a quantum computer to perform a computation. Finally, the state of the qubits may be repeatedly measured after applying a sequence of quantum gates to determine the probability of each possible outcome of the computation.

[0004] To compute solutions to problems that are considered intractable on classical computers, quantum computers exploit the special properties of quantum mechanical states, in particular the superposition and entanglement of different quantum states, to find solutions in a relatively small number of computational steps.

[0005] However, because the superposition / entangled states of quantum mechanical systems are inherently volatile (e.g., subject to decoherence) and the control and measurement of these systems are subject to fidelity margins, state-of-the-art quantum computers are currently limited in both the number of controllable quantum mechanical systems (qubits) as well as the number of control actions that can be performed in succession (quantum gates).

[0006] Despite these drawbacks, there are promising applications for near-term available quantum processors, namely noisy intermediate-scale quantum (NISQ) devices such as variational quantum algorithms. In variational quantum algorithms, the action of quantum gates is parameterized in terms of variational parameters, which can be systematically varied with the help of classical computational resources, in a manner similar to machine learning. By varying the variational parameters to extremize a cost function that attributes a cost to the output of the variational quantum circuit relative to an optimal solution, the output of the variational quantum circuit can be "trained" to provide an optimal solution to an unseen problem. Entanglement between different qubits can give access to a large internal state space to provide "quantum supremacy".

[0007] For example, Henderson et al. ("Quanvolutional Neural Networks: Powering Image Recognition with Quantum Circuits") investigate a quantum machine learning (QML) method involving image classification that includes a "quantum convolutional layer" as part of the convolutional image encoding. The quantum convolutional layer processes input features according to randomly determined parameterized operations to generate encoded features for analysis by a decoding module, which provides a classification result. [Prior art documents] [Non-patent literature]

[0008] [Non-Patent Document 1] Henderson et al., “Quanvolutional Neural Networks: Powering Image Recognition with Quantum Circuits” Summary of the Invention [Problem to be solved by the invention]

[0009] However, quantum devices are still not widely available and practical implementations may be limited in both qubit number and circuit depth, which also limits the application of NISQ devices as part of variational quantum circuits.

[0010] In view of this state of the art, it is an object of the present invention to provide an improved classifier for grids of features, such as pixel maps of images, that includes a quantum-circuit-based architecture that can efficiently utilize relatively small and realizable quantum devices for approximation tasks. [Means for solving the problem]

[0011] This object is solved by a system, a method and a computer program for classifying images according to the independent claims. The dependent claims relate to preferred embodiments.

[0012] According to a first aspect, the invention relates to a hybrid quantum-classical computing system for classifying a grid of features provided as input. The system comprises a convolution block comprising a convolution filter configured to receive the grid of features as input and to output a plurality of output features for the grid of features based on a trainable configuration of the convolution filter. The system further comprises a flattening layer for converting the filtered grid of output features received from the convolution block into a flattened feature vector. The system further comprises a classification block configured to receive the flattened feature vector and generate an output classification. The classification block comprises a plurality of independent variational quantum circuits, each comprising a plurality of quantum gates acting on a qubit of a qubit register of a respective variational quantum circuit. The plurality of quantum gates comprise variational quantum gates, where the action of the variational quantum gate on the qubit of the qubit register is parameterized according to an associated variational parameter, and an encoding gate for modifying the state of the qubit of the qubit register according to the input feature vector. The variational quantum circuits of the multiple independent variational quantum circuits receive different subsets of features from the flattened feature vector as an input feature vector, and the measurement outputs of the multiple independent variational quantum circuits are combined to determine a label of the grid of input features as an output classification.

[0013] In contrast to conventional approaches where the complexity of the available variational quantum circuits limits the number of possible input features, the system uses multiple independent variational quantum circuits to independently process a subset of flattened features extracted from the grid of input features via convolution blocks. As a result, the system is less limited to the achievable maximum number of processable input features, defined for example by the maximum number of features encoded per qubit and the number of available qubits. The inventors have surprisingly found in experiments that quantum supremacy for image classification can still be exploited despite the lack of entanglement between all qubits of the multiple variational quantum circuits. Thus, a viable hybrid quantum-classical computing system for processing and classifying a grid of input features can be provided. The labels determined for the grid of input features may correspond to a classification into multiple (predetermined) output classes and / or may be identifiers of objects / patterns detected by the system in the grid of input features.

[0014] The grid of input features may correspond to a two-dimensional or multi-dimensional array of numerical values ​​that may indicate a visual encoding of an image in the data. For example, the grid of input features may be a two-dimensional pixel grid, where the numerical value of each pixel may correspond to a grayscale image encoding, such as a luminance value ranging from black to white. The pixel grid may encode an image of an object to be classified, such as a letter, a number, or an object, such as a human face, a scene imagined with a vehicle camera, etc. The classification of the system then attributes the image to an output class, such as a particular letter, a particular number, or a corresponding entry in a face image database.

[0015] Similar to known image classification methods in the art, the grid of input features may be first processed using a convolution filter, which may be applied to different subsets of the grid to generate a filtered grid of output features, where the convolution filter may perform local operations on groups of adjacent features in the grid of features provided as input. For example, the grid of input features may be used to generate multiple square grids of features, such as a 3x3 or 5x5 grid of adjacent features of the grid of input features. Each of the subsets may be processed by a convolution filter, which may generate a corresponding filtered feature for the input subset of the grid of features, for example through a trained network of artificial neurons. Each of the square grids of features may be processed in parallel by different convolution filters, such as to extract different image features from the square grid of features, such as edges or lines of the square grid of features.

[0016] The filtered features obtained using the convolution filters may generate a filtered grid of features, which may be further processed by additional convolution filters. The convolution block may then output multiple filtered grids of features, e.g., different filtered grids of features corresponding to different filters applied to the grid of input features.

[0017] The filtered grid of features may be flattened into a flattened feature vector, which may be, for example, a list of features derived from the output of the convolution block using an artificial neural network that maps the filtered grid of features to a number of features according to a number of internal weights and biases.

[0018] In a preferred embodiment, the convolution blocks and / or the flattening layers are implemented in classical hardware, specifically using trainable machine learning models.

[0019] The trainable machine learning model may be trained to obtain a trained machine learning model or may be provided as a trained machine learning model, which may process the filtered grid of output features according to a number of machine learning parameters, such as weights and biases of an artificial neural network. The trained machine learning model may be obtained by defining a machine learning architecture and by training the corresponding machine learning parameters in a training process, for example using stochastic gradient descent or other optimization methods, based on the historical data and the corresponding classes. Following the training process, the trained machine learning model may be configured to generate optimal outputs for a subsequent classification stage of the hybrid quantum-classical computing system.

[0020] In some embodiments, the system comprises a classical processing system and / or AI processing hardware configured to implement the trained machine learning model, in particular the AI ​​processing hardware comprises a GPU, a neural processing unit, analog memory-based hardware, or neuromorphic hardware.

[0021] The processing system may include a single processing unit or multiple processing units that may be functionally connected. The processing unit may include a microcontroller, ASIC, PLA (CPLA), FPGA, or other processing device including a processing device that operates based on software, hardware, firmware, or a combination thereof, such as the AI ​​processing hardware mentioned above. The processing device may include an integrated memory or communicate with an external memory, or both, and may further include an interface for connecting to sensors, devices, applications, integrated logic circuits, other controllers, etc., and the interface may be configured to receive or transmit signals, such as electrical signals, optical signals, wireless signals, acoustic signals, etc.

[0022] The processing system may implement the trained machine learning model using classical hardware and may process the input grid of features to generate a flattened feature vector, which may be subsequently processed by multiple independent variational quantum circuits. Preferably, the number of features in the flattened feature vector is a multiple of the number of qubits in the multiple variational quantum networks.

[0023] In a preferred embodiment, each of the variational quantum circuits of the plurality of independent variational quantum circuits is configured to encode a number of inputs into quantum states of qubits of its qubit register, and the input feature vector includes a number of features that is a multiple of the number of inputs of the variational quantum circuits of the plurality of independent variational quantum circuits.

[0024] The number of inputs may be encoded in all or a subset of the qubits of each variational quantum circuit, e.g., multiple input features may be encoded into a single qubit or into a subgroup of the qubits of the variational quantum circuit. In some embodiments, multiple input features may be encoded into the quantum states of the qubits of the variational quantum circuit, where the number of qubits may be smaller or larger than the number of inputs. In some embodiments, the number of input features may be equally distributed among the qubits of each variational quantum circuit and encoded by manipulating the quantum states of each qubit.

[0025] For example, the flattening layer may generate a feature vector containing N features, and each of the variational quantum networks may contain M qubits, where N=M*K, where K is a natural number greater than 1, i.e., K∈{2; 3; 4; ...}. The flattened feature vector may be separated into K subsets of features that may be independently processed by K independent variational quantum circuits. Each feature of one of the K subsets of features may then be encoded in each of the M qubits of the corresponding variational quantum circuit.

[0026] Independent variational quantum circuits can process subsets of features in parallel and / or sequentially, in other words, multiple different variational quantum circuits may be implemented using the same or different hardware, and the output of each variational quantum circuit may be obtained independently of each other.

[0027] Variational quantum circuits can contain multiple qubits, whose quantum states can be manipulated by the application of quantum gates applied to single qubits and / or to multiple qubits, either sequentially or in parallel.

[0028] The qubits may form a qubit register and may be initialized to an initial state, such as a ground state of each qubit. In some embodiments, after initialization of the qubits to their ground states, a superposition state of each qubit in the qubit register is prepared, for example through application of a Hadamard gate.

[0029] Subsequently, multiple quantum gates can be applied to the qubits to transform the state of the qubits to an output state. In a variational quantum circuit, the behavior of at least some of the quantum gates in a variational quantum network is parameterized such that the measurement output is a function of variational parameters that parameterize the variable behavior of the (variational) quantum gates. The combined behavior of (at least partially parameterized) quantum gates may be called a variational quantum network, since the principle of operation is similar to that of a neural network.

[0030] Furthermore, in a variational quantum circuit, at least one quantum gate is used as an encoding gate, and the action of the encoding gate is based on the input feature vector. For example, the value of the input feature vector can be encoded into a qubit by rotating the state of one qubit proportional to the value of the input feature vector through a single qubit rotation.

[0031] In some embodiments, at least one encoding gate comprises a single qubit rotation proportional to the value of the input feature vector. The encoding gate may be applied k times as part of each variational quantum circuit, where k is an integer value greater than 2, and the variational quantum circuit is parameterized by at least 2k variational parameters. Multiple applications of the encoding gate may effect a re-uploading of the input feature vector into the variational quantum circuit, such that the variational quantum circuit may fit a higher order Fourier series to the labeling function.

[0032] Two-qubit or multi-qubit gates can create superposition states between qubits, such as to exploit the "quantum supremacy" offered by quantum hardware; such gates may be referred to below as entangled gates. For example, when variational quantum circuits are implemented in quantum devices based on trapped ion systems, the states of different ions in the trapped ion system may be coupled through co-excitation, e.g., transferred via the Molmer-Sorensen interaction. As another example, pairs of qubits in a qubit register may be entangled via (tunable) nearest-neighbor interactions or exchanges of quantum particles to implement two-qubit gates, such as CNOT gates.

[0033] In some embodiments, a variational quantum network may be defined in terms of a layer of quantum gates that may act on a qubit to link it with the qubit in the qubit register. A layer of quantum gates may include the cumulative action of multiple coherent operations on the state of the qubit in the qubit register. The cumulative action of the coherent operations in a layer should generally act on all qubits of the qubit register involved in the computation, in other words, a layer of quantum gates should directly affect the state of all qubits in the qubit register. Each layer should include at least one multi-qubit gate and at least one variational quantum gate (which in principle may be the same gate). Those skilled in the art will understand that multiple quantum gates in a layer may be applied to a qubit in parallel to shorten the sequence of coherent operations on the state of the qubit in the layer. Multiple layers of quantum gates may then be subsequently applied to the qubit to form a variational quantum network, the variational quantum network being parameterized by the variational parameters of each layer.

[0034] A layer may contain quantum gates of the same type and may be applied sequentially to the qubit registers. For example, each layer may feature quantum gates of the same architecture, but different elements of variational parameters may be applied to the variational gates of the layer. In other words, the layers may feature the same quantum gate architecture, but the action of the quantum gates on the qubits in each layer may differ based on the variational parameters and / or the input feature vector.

[0035] After the layer of quantum gates operates on the qubits, the qubits can be measured to obtain a characteristic result of the variational quantum circuit relative to a known initial state. The result of the quantum mechanical computation can be measured based on the computational basis states of the qubits. The computational basis states can be orthogonal basis states of a Hilbert space spanned by the tensor product of the basis states of each qubit.

[0036] The initial variational parameters of the variational quantum gate can encode an initial (random) guess of the optimal classifier, and the results of the evaluation of the variational quantum circuit with the variational parameters can be (iteratively) measured to determine the corresponding label. Based on the label, a cost function can be classically evaluated to attribute a cost to the label, in other words a measure of the goodness of the label is calculated.

[0037] By training the system, one may iteratively and systematically vary the variational parameters so that the variational quantum circuit approximates the output labels.

[0038] In a preferred embodiment, the variational parameters of one of the plurality of independent variational quantum circuits are different from the variational parameters of another of the plurality of independent variational quantum circuits.

[0039] For example, each of the variational quantum circuits may be associated with a respective variational parameter that may differ from the variational parameters of any of the other variational quantum circuits of the plurality of variational quantum circuits.

[0040] In a preferred embodiment, each of the plurality of independent variational quantum circuits comprises a plurality of layers of quantum gates, each layer of the plurality of layers of quantum gates in particular comprising a variational quantum gate for each of the qubits of the qubit register.

[0041] The inventors have found that additional layers of gates can increase the accessible Fourier space of the qubits, thereby improving the classification results. Each layer may include different variational parameters that can be trained, such that the variable behavior of each layer of qubits in the variational quantum circuit may be different. Each layer may also comprise entanglement gates and / or encoding gates. The encoding gates in each layer may re-encode the same feature from the subset of features into the respective qubits, or may encode different features of the subset of features, such as to increase the number of features processed by each variational quantum circuit, at the expense of additional gates as part of the quantum circuit.

[0042] In a preferred embodiment, the plurality of independent variational quantum circuits each include at least two qubits in a respective qubit register.

[0043] Variational quantum circuits may in principle be designed according to the availability of quantum processing resources, and an increasing number of qubits generally increases the accessible Fourier space, which may also increase the complexity of the internal computations performed by the variational quantum circuit. In general, each of the variational quantum circuits may process a subset of features from the flattened feature vector corresponding to the number of qubits or a multiple thereof, in order to analyze a certain number of features extracted by the convolution block and determine therefrom a value indicative of an output label / class, e.g., a number of numerical values ​​equal to the number of qubits in the variational quantum circuit. Each of the multiple variational quantum circuits may comprise an entanglement gate for entangling the quantum states of at least two qubits.

[0044] In a preferred embodiment, each of the plurality of independent variational quantum circuits comprises an entanglement gate for entangling the quantum states of at least two of the qubits of the respective qubit register.

[0045] The entangled state of the qubits in each of the multiple independent variational quantum circuits may be used to determine a corresponding output, which may be used to determine an output class.

[0046] In a preferred embodiment, the output state of all qubits in the qubit register of one of the plurality of independent variational quantum circuits is independent of the action of a quantum gate of another of the plurality of independent variational quantum circuits.

[0047] As a result, the variational quantum circuits may be implemented independently and computed in parallel, e.g. using separate hardware implementations, or sequentially, e.g. using the same hardware implementation.

[0048] In a preferred embodiment, the quantum states of qubits in different ones of the multiple independent variational quantum circuits are disentangled prior to measurement.

[0049] In other words, the qubits of different variational quantum circuits may remain independent throughout a computation.

[0050] In a preferred embodiment, multiple independent variational quantum circuits are implemented in quantum hardware.

[0051] In our preliminary experiments, variational quantum circuits are generally implemented in simulations of quantum devices running on classical hardware, and the experiments have shown that the resulting virtual hybrid quantum-classical device can achieve similar results compared to classical approaches in machine learning, while relying on less trainable parameters that must be optimized during training. Thus, even simulated variational quantum circuits may be useful in some embodiments, i.e., multiple variational quantum circuits may be implemented on a classical computer using a quantum simulator. However, the system preferably implements variational quantum circuits calculated on quantum hardware, such as to reduce the classical processing power and computation time required to simulate complex quantum hardware.

[0052] The outputs of the variational quantum circuits may be measured and mapped to output features, e.g., between 0 and 1, for each of the qubits and / or each of the variational quantum circuits. The output features may then be used by the system to determine output labels / classes that correspond to the grid of input features.

[0053] In a preferred embodiment, the measurement outputs of multiple independent variational quantum circuits are combined using a trainable layer of artificial neurons implemented in classical hardware, in particular a fully connected layer of artificial neurons implemented in classical hardware.

[0054] A layer of artificial neurons can implement the combination between the outputs of different independent variational quantum circuits, and a fully connected layer can introduce the combination between each of the variational quantum circuits. A trainable layer of artificial neurons can be trained to optimally combine the measurement outputs to obtain a label, or can be obtained as a trained layer of artificial neurons. Those skilled in the art will understand that not all qubits need to be measured, or that some of the measurement outputs of one of the variational quantum circuits can be combined or discarded before determining the classification result using a layer of artificial neurons.

[0055] In a preferred embodiment, the trainable parameters of the convolution block, the flattening layer, and the classification block are obtained based on a joint training process, in particular of a machine learning model implemented in classical hardware and multiple independent variational quantum circuits implemented in quantum hardware.

[0056] The joint training process may train a classical layer to extract features appropriate for each classification task, may train a flattening layer to map features extracted by the convolutional blocks towards respective inputs of the multiple independent variational quantum circuits, may train the multiple independent variational quantum circuits to generate outputs that advantageously transform the flattened feature vector towards measurement output features indicative of the classification task, and may train a coupled layer of artificial neurons to determine a classification result based on the measurement outputs of the multiple independent variational quantum circuits.

[0057] Those skilled in the art will appreciate that in some embodiments, the convolution block may not be trained together with the variational quantum circuit, but instead pre-trained convolution blocks from different classification systems may be used, and only the classification block comprising the multiple variational quantum circuits, the multiple independent variational quantum circuits, and the portion of the flattening layer preceding the coupling layer may be trained in a joint training, which may reduce the complexity of the training task in some embodiments. In that case, only the parameters of the flattening layer and the coupling layer may be part of the trainable machine learning parameters of the classical portion of the hybrid quantum-classical computing system. The flattening layer may comprise a fully connected layer of artificial neurons, such as for mapping the output of the convolution block to the flattened feature vector as input to the multiple independent variational quantum circuits.

[0058] The system can be trained iteratively, and the variational parameters, machine learning parameters (of the convolutional blocks and / or flattening layers), and combination parameters, hereinafter also referred to collectively as trainable parameters, can be jointly optimized at each step of the iterative process such that the output labels approach the labels of a sample dataset of the same input grid of features.

[0059] The iterative process can mimic the training of a classical machine learning model, where the output labels are associated with cost values ​​based on a cost function. For example, the training can be based on a sample dataset of labels and corresponding sample input feature grids, and the cost function can be a loss function based on the output labels and based on sample labels of the sample dataset of the same input grid of features. The cost function can be the mean square error between the output labels and sample labels of the same input grid of features. Thus, the method for training can be based on the sample dataset of labels and the corresponding input feature grids. Those skilled in the art will understand that when the hybrid quantum-classical computing system is trained, the sample dataset can be constructed, for example, by obtaining data points of the sample dataset including the input grid of features and the corresponding labels, and then training the hybrid quantum-classical computing system based on the data points.

[0060] In another example, the optimal labels are unknown, but costs can be ascribed to candidate solutions based on the problem statement, such as travel times for the classic traveling salesman problem, and trainable parameters can be varied such that the costs are extreme (maximized or minimized).

[0061] The trainable parameters may be updated with known techniques employed in classical machine learning, such as gradient-based optimization algorithms, e.g., stochastic gradient descent or adaptive moment estimation, or gradient-free optimization, such as simulated annealing. Preferably, the optimization algorithm is gradient-based, and the method may include determining the gradient of the trainable parameters with respect to the cost attributed to the output label by the cost function.

[0062] Although the system is illustrated primarily with respect to the example of images as input features, those skilled in the art will appreciate that the system may be equally suitable for processing additional information encoded on a grid of features that may not necessarily be related to visual information.

[0063] According to a second aspect, the present invention relates to a method for determining labels of a grid of input features based on a hybrid quantum-classical computation algorithm. The method includes receiving a grid of input features and generating a filtered grid of features based on the grid of input features and a convolution filter. The convolution filter is configured to output a plurality of output features for the grid of input features based on a trainable configuration of the convolution filter. The method further includes flattening the filtered grid of output features into a flattened feature vector and separating the flattened feature vector into a plurality of flattened feature vector subsets. The method further includes encoding each of the flattened feature vector subsets into a qubit of a corresponding variational quantum circuit of a plurality of independent variational quantum circuits. Each of the plurality of independent variational quantum circuits comprises an encoding gate configured to act on a quantum state of a qubit based on features of a corresponding subset of the plurality of flattened feature vector subsets, a variational quantum gate, where the action of the variational quantum gate on the qubit of the qubit register is parameterized according to an associated variational parameter, and an entanglement gate for creating a superposition of quantum states of two qubits of the corresponding circuit. The method further includes obtaining a measurement output based on measuring an output state of each of the plurality of independent variational quantum circuits, and combining the measurement outputs of the plurality of independent variational quantum circuits to determine a corresponding output label.

[0064] Preferably, the label is determined by combining the measurement outputs using a trained machine learning model, preferably a multi-layer perceptron that includes a fully connected layer of artificial neurons. However, in some embodiments, there may be no classical layer after the quantum layer, but the output after the quantum layer can be a prediction of the output label for the problem, for example, by simply concatenating the measurement outputs or by combining the measurement outputs according to a predefined combination function. Determining the label allows for classification of a grid of input features into a predefined set of output classes.

[0065] The method may use the elements and components of the system according to the first aspect or any combination of its embodiments, or may implement any functionality of said components.

[0066] According to a third aspect, the present invention relates to a method for training a hybrid quantum-classical computing system to approximate a labeling function of a grid of input features. The system comprises a machine learning model implemented on a classical processing system configured to generate a flattened feature vector based on the grid of input features according to a parameterized transfer function, the parameterized transfer function being parameterized by machine learning parameters, the machine learning model comprising a convolutional layer of artificial neurons. The system further comprises a plurality of independent variational quantum circuits each comprising a plurality of quantum gates acting on a qubit of a respective qubit register, the plurality of quantum gates comprising a variational quantum gate, the parameterized action of the variational quantum gate on the qubit of the qubit register being parameterized according to an associated variational parameter, and an encoding gate for modifying a state of the qubit of the qubit register according to the input feature vector. The variational quantum circuits of the plurality of independent variational quantum circuits receive different subsets of features from the flattened feature vector as an input feature vector. The system further comprises a combining module implemented on a classical processing system and configured to receive measurement outputs generated by the multiple independent variational quantum circuits and combine the measurement outputs of the multiple independent variational quantum circuits to determine a classification result, the combining being based on multiple trainable combining parameters. The method includes providing a sample grid of features to a machine learning model and receiving an output flattened feature vector from the machine learning model. The method further includes separating the output flattened feature vector into multiple flattened feature vector subsets, providing each of the flattened feature vector subsets to a corresponding variational quantum circuit of the multiple variational quantum circuits, and receiving an output label from the combining module based on the measurement outputs of the multiple independent variational quantum circuits. The method further includes determining parameter updates for the variational parameters and the trainable combining parameters based on a value of a loss function for the output label.

[0067] In principle, the machine learning model may already be (partially) trained, and only a portion of the machine learning model, for example as part of the flattening layer, may be trained together with the multiple independent variational quantum circuits. For example, a portion of a conventional machine learning model based on a convolutional layer may be used as an encoder portion, and the output of the encoder portion of the conventional machine learning model may be mapped to a flattened feature vector by a second portion of the machine learning model, such as to prepare the extracted features for processing by the multiple independent variational quantum circuits. Thus, only the second portion of the machine learning parameters may be trained together with the variational parameters and the joint parameters. In other examples, all of the machine learning parameters may be trained together with the variational parameters and the joint parameters. In other words, the quantum layer and the classical layer of the hybrid quantum-classical computing system may be trained simultaneously, and the parameter update may update both the parameters of the machine learning model and the variational parameters.

[0068] In some embodiments, determining the parameter updates includes determining a vector of derivatives of the variational parameters as part of the parameter update gradient.

[0069] The trainable parameters can be updated based on a parameter update gradient, and a subset or all of the trainable parameters can be modified based on the value of the gradient and a learning rate value that quantifies the size of the update step.

[0070] In some embodiments, the step of determining the parameter updates is based on a stochastic gradient descent method, preferably including moment coefficients based on previously determined gradients of the cost function.

[0071] The gradient of the cost function for the variational parameters may be accessible through a parameter shifting rule, in which the variational quantum circuit is evaluated with the shifted variational parameters to determine partial derivatives of the cost function with respect to the shifted variational parameters.

[0072] In some embodiments, the method includes determining a vector of derivatives of the variational parameters, and determining the vector of derivatives may include applying a parameter shift rule to a subset or all of said variational gates at each iteration of the iterative process.

[0073] Specifically, quantum gates with eigenvalues ​​±1 / 2, e.g., 1 / 2{σ x ,σ y ,σ z}, the variational parameter θ j The partial derivative of a function f with respect to It can be determined according to JPEG2024132890000002.jpg17162.

[0074] The partial derivatives of the cost function with respect to the machine learning parameters can be determined in a known manner. Thus, different parts of the hybrid quantum-classical computing system can be jointly optimized based on a gradient composed of the partial derivatives of the cost function with respect to the trainable parameters of both the variational quantum circuit and the machine learning model. For example, the quantum mechanical network can be repeatedly evaluated to determine the partial derivatives of the layer of quantum gates with respect to the variational parameters, and the gradients may be classically calculated from the measured partial derivatives as well as classically calculated derivatives of the machine learning parameters.

[0075] However, those skilled in the art will appreciate that the variational parameters can equally be optimized in an optimization algorithm without access to the derivatives, such as by (randomly) sampling the cost function, such as in the Constrained Optimization by Linear Approximation (COBYLA) algorithm or similar algorithms, and the gradients may be estimated gradients based on an estimate of the energy landscape of the cost function.

[0076] The cost function can then be minimized / maximized by iteratively updating the trainable parameters according to the determined / estimated gradient of the cost function with respect to the trainable parameters, e.g., using an adaptive moment-based update function.

[0077] In some embodiments, determining the parameter updates is based on an update function of a moving average over the gradient of the cost function and a moving average over the squared gradient of the cost function.

[0078] Because the adaptive moment-based update function depends on a moving average over the gradient of the cost function and a squared (element) of the moving average over the gradient of the cost function, the variational parameter updates can be smoothed by the first and second moments of the gradient, enabling the descent towards an optimized solution even for “noisy” quantum systems.

[0079] In some embodiments, the learning rates for updating the variational parameters and the machine learning parameters are different.

[0080] Optimal performance of a hybrid quantum-classical computing system may require tuning of the relative rates at which the variational and machine learning parameters are updated during training so that training converges toward a set of trainable parameters in which both the variational quantum circuit and the machine learning model optimally contribute to the output label. For example, the variational quantum circuit and the machine learning model may converge toward their respective optimal solutions at different rates. If the learning rate is not adjusted correctly, during training the system may get stuck in a local minimum where one of the variational quantum circuit and the machine learning model contributes less to the output label than an optimally configured hybrid quantum-classical computing system.

[0081] In some embodiments, the learning rate of the variational parameters is higher than the learning rate of the machine learning parameters.

[0082] The different learning rates may be estimated based on individual rates of convergence of the machine learning models and variational parameters, may be based on past optimization results, or may be empirically determined for a hybrid quantum-classical computing system, e.g., on a sample dataset of an input grid of features and corresponding labels.

[0083] In some embodiments, the hybrid quantum-classical computing system may be trained with different ratios of learning rates for updating the variational parameters and the machine learning or combined parameters to determine an optimal ratio of learning rates for updating the variational parameters and the machine learning parameters for the labeling function.

[0084] For example, the hybrid quantum-classical computing system may be initialized with a fixed initialization point, including the same, e.g., randomly determined, starting values ​​of the trainable parameters each time, and training may be repeated from the fixed initialization point with different values ​​of the learning rates of the machine learning model and the variational quantum circuit, while recording the final results of the cost function for the input grid of features not used during training (not part of the training dataset). In practice, one learning rate, e.g., the learning rate associated with the variational parameters, may be fixed, and the other learning rate(s), e.g., the learning rates of the machine learning parameters and the combined parameters, may be changed, which may be the same or different learning rates in some embodiments. Those skilled in the art will understand that the learning rate(s) may already be decayed or stepped, and the different learning rates may be associated with the base learning rates of the machine learning parameters and the variational parameters, respectively.

[0085] Based on the resulting value of the cost function, an optimal learning rate can be selected, and the hybrid quantum-classical computing system may be subsequently performed or further trained based on the previously determined optimal learning rate or a ratio thereof.

[0086] By training the system using the method according to the third aspect, the hybrid quantum-classical computing system of the first aspect can be obtained.

[0087] According to a fourth aspect, the present invention relates to a computer program comprising machine readable instructions which, when the computer program is executed by a processing system, cause the processing system to perform a method according to any embodiment of the second or third aspect and / or to implement a system according to any embodiment of the first aspect.

[0088] The computer program may be stored on a non-transitory medium as machine-readable instructions that, when executed by a processing system, cause the processing system to perform a method according to any embodiment of the second or third aspect and / or implement a system according to any embodiment of the first aspect.

[0089] The computer program can coordinate the training of the hybrid quantum-classical computing system and / or can implement the hybrid quantum-classical computing system to approximate a given labeling function based on previously obtained trainable parameters.

[0090] The computer program may configure a plurality of variational quantum circuits, for example, by determining architectures and / or variational parameters of the variational quantum circuits. During implementation of the systems and / or methods, the computer program may provide the flattened feature vector subsets to a plurality of independent variational quantum circuits and may receive measurement outputs of the variational quantum circuits.

[0091] The computer program may further implement and control a machine learning model that may implement the convolution blocks and flattening layers, and may also implement a machine learning model for combining measurement outputs of multiple independent variational quantum circuits to determine output labels for a grid of input features.

[0092] In some embodiments, a computer program can control the training of the hybrid quantum-classical computing system and can determine parameter updates for the machine learning parameters, the coupling parameters, and the variational parameters. [Brief description of the drawings]

[0093] The features and many advantages of the method and system according to the present invention will be best understood from a detailed description of the preferred embodiment when read in conjunction with the accompanying drawings. [Figure 1] FIG. 1 is a schematic diagram illustrating an example of a hybrid quantum-classical computing system. [Diagram 2] 1 is a flowchart of a method for determining labels for a grid of input features according to an example. [Figure 3A] FIG. 1 is a schematic diagram illustrating another example of a hybrid quantum-classical computing system. [Figure 3B] FIG. 1 is a schematic diagram illustrating another example of a hybrid quantum-classical computing system. [Figure 4A] FIG. 1 shows examples of different handwritten symbols taken from the Modified National Institute of Standards and Technology (MNIST) database. [Figure 4B] FIG. 1 shows examples of different handwritten symbols taken from the MNIST database. [Diagram 5] FIG. 1 illustrates a method for training a hybrid quantum-classical computing system to approximate a labeling function of a grid of input features, according to an example. [Figure 6A] FIG. 4 illustrates the results of training a hybrid quantum-classical computing system as shown in FIGS. 3A and 3B according to an exemplary implementation. [Figure 6B] FIG. 4 illustrates the results of training a hybrid quantum-classical computing system as shown in FIGS. 3A and 3B according to an exemplary implementation. [Figure 7]FIG. 2 illustrates a schematic diagram of an example of a convolution block with a quantum convolution layer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0094] FIG. 1 illustrates generally one example of a hybrid quantum-classical computing system 10 for classifying a grid of input features into a predefined set of output classes. The grid of input features may be image data, and the hybrid quantum-classical computing system 10 may identify objects depicted in the image data according to a predefined set of output classes, such as a particular object, a particular character, or a particular facial feature. The system 10 may receive the grid of input features at an input of the system 10, which may take the form of an array of numerical values ​​encoded in a suitable format. For example, the grid of inputs may be a pixel array, and color / grayscale values ​​may be encoded as a bit sequence for each pixel of the pixel array.

[0095] The grid of input features may be pre-processed, e.g., normalized, and received at a convolution block 12, which may process the grid of input features according to a convolution filter to extract detectable features present in the image information. The output of the convolution block 12 may be a plurality of filtered grids of features, which may be flattened by a flattening layer 14. The flattening layer 14 may process the features of the filtered grid of features to obtain entries of a flattened feature vector 16, for example, by pooling the features of the filtered grid of features into a pooled feature map and / or flattening the pooled feature map onto a flattened feature vector 16.

[0096] The convolution block 12 and / or the flattening layer 14 may be executed by a machine learning model that may be implemented in a classical processing system. The classical processing system may comprise a GPU and / or an AI processing device and may process the grid of input features according to an internal multi-layer perceptron (MLP) having a layer of artificial neurons that processes the input based on an activation function that may be parameterized by trainable weights and / or biases for each artificial neuron. The output of the machine learning model may then be generated based on the activation of the artificial neurons in the output layer of the multi-layer perceptron. The output of the convolution block 12 may be pooled or flattened into a flattened feature vector 16 by the flattening layer 14 of the artificial neuron.

[0097] The flattened feature vector 16 may be separated into multiple flattened feature vector subsets 18 (indicated in FIG. 1 by the dashed lines separating the flattened feature vectors 16), and each of the subsets 18 may be received by an independent one of a plurality of variational quantum circuits 20 in a classification block 22 of the system 10. The multiple independent variational quantum circuits 20 may each process a respective flattened feature vector subset 18 and each generate a measurement output, which may be combined in a combination layer 24 to classify the grid of input features into predefined output classes.

[0098] The variational quantum circuit 20 may be implemented at least in part on a quantum device, and the flattened feature vector 16, or a feature vector derived therefrom, is encoded in the quantum state of the quantum device. For example, each subset 18 of the flattened feature vector 16 may include Q values, which may be encoded in quantum states of M=Q / J qubits, where J and M are natural numbers, i.e., J, M, and M, respectively, for encoding multiple features into a single qubit as part of the execution of the independent variational quantum circuit 20. JPEG2024132890000003.jpg12162, and Q mod J=0.

[0099] The quantum state of a quantum device can be manipulated based on the configuration of variational quantum gates, whose actions can be parameterized by variational parameters. The output state of the quantum device can be (repeatedly) measured, and a measurement output can be generated based on the repeatedly measured output state.

[0100] The combination layer 24 can combine the measurement outputs, for example based on trainable weighted linear summation, and preferably based on a fully connected layer of artificial neurons, for example an MLP, so as to generate an output label based on the measurement outputs according to internal combination parameters.

[0101] The combination parameters, machine learning parameters, and variational parameters can be trained together, for example based on stochastic gradient descent or a variant thereof, such that the outputs produced by the combination layer 24 can be used as labels that approximate a generally unknown labeling function that may map a grid of input features to output classes.

[0102] 2 illustrates generally a method for determining labels for a grid of input features, for example to classify the grid of input features into a predefined set of output classes, which may be implemented using the system 10 illustrated in FIG. The method includes receiving the grid of input features and generating a filtered grid of features based on the grid of input features and a convolution filter (S10), and flattening the filtered grid of features into a flattened feature vector 16 (S12). The method further includes separating the flattened feature vector 16 into a plurality of flattened feature vector subsets 18 (S14), and encoding each of the flattened feature vector subsets 18 into a qubit of a corresponding one of a plurality of independent variational quantum circuits 20 (S16). The method further includes obtaining a measurement output based on measuring an output state of each of the plurality of independent variational quantum circuits 20 (S18), and combining the output states of the plurality of independent variational quantum circuits 20 to determine a corresponding output label (S20).

[0103] The convolutional filter is configured to output multiple output features for the grid of input features based on a trainable configuration of the convolutional filter, and the convolutional filter may be applied to different subgroups of the grid of input features to generate a filtered grid of features, for example as part of the convolution block 12. The different subgroups may be small grids of adjacent features, for example 3×3 or 5×5 subgrids, and may be processed according to the convolutional filter to generate filtered values ​​of the filtered grid of features. The convolutional filter may be applied multiple times in parallel, for example to process all possible subgrids of a particular size of the grid of input features, and different convolutional filters may be applied to the grid of input features, such as to extract different properties from the data, as known in the art of convolutional neural networks. The output of the convolutional filter may be further processed by additional convolutional filters, such as to concatenate multiple convolutional layers.

[0104] The filtered grid of features may be flattened by the pooling and flattening layer 14, which may then be processed by a plurality of independent variational quantum circuits 20. Each of the plurality of independent variational quantum circuits 20 comprises an encoding gate configured to act on a quantum state of a qubit of the associated quantum circuit 20 based on features of a corresponding subset of the plurality of flattened feature vector subsets 18, which will generally comprise at least one encoding gate for each qubit of the variational quantum circuit 20. The information encoded within the variational quantum circuit 20 may be processed according to a plurality of variational quantum gates, whose actions on the qubits of the qubit register are parameterized based on associated variational parameters and a plurality of entanglement gates for creating a superposition of quantum states of at least two qubits of the corresponding variational quantum circuit 20.

[0105] For example, the variational quantum circuit 20 has the state Initialize a number of M qubits in JPEG2024132890000004.jpg12162 and use a unitary transformation on the qubit states, e.g., as part of a single qubit rotation, to iterate over the input features, e.g., {x1,…,x M A variational quantum gate can be equivalently described by a unitary that encapsulates the variational quantum circuit model parameters as operators that can be applied to the quantum states of the qubits. The operators are 0,…,L Finally, the quantum state of the qubits of the variational quantum circuit 20 can be parameterized by, for example, the quantum information being decomposed into M classical outputs and the expectation value of the circuit 20 f(x,θ)=〈Ψ(x,θ)|M|Ψ(x,θ)〉,(1) where |Ψ(x,θ)〉 denotes the state of the quantum circuit before the measurement, x is the input feature vector, and θ is the variational parameter.

[0106] However, those skilled in the art will understand that the number of classical outputs, M, and the number of qubits of variational quantum circuit 20 do not have to be the same, as it may be sufficient to measure some of the qubits to determine the output labels.

[0107] The measurement outputs can be taken into account by all the variational quantum circuits 20 measurement outputs as input features and can be combined using a machine learning model (MLP), such as a fully connected MLP, which can output output labels corresponding to the grid of input features.

[0108] Figure 3A shows a detailed example of a system 10 for classifying an image as a grid of input features 26, for example according to the method shown in Figure 2. The system 10 comprises a convolution block 12, which processes the grid of input features 26 into filtered grids of features 28a-d according to a number of concatenated convolution filters. The processing of the grid of input features 26 is illustrated with an exemplary subgroup of features being mapped onto features of the filtered grid of features 28a along the solid lines in the figure (depicted as white rectangles in the sample image).

[0109] In the illustrated example, the sample image is a 28x28 feature grayscale image of handwritten numbers (Arabic numerals), which may be mapped by a number of convolution filters into a tensor, e.g., a 16x28x28 tensor, as a first filtered grid 28a of features, extracting filtered features from each subset of features according to different filter functions. As an example, the convolution filters may comprise a square kernel with a size of 5x5, which may operate with a 1 pixel stride and may apply a 2 pixel padding to process all pixels of the sample image. The resulting filters may be subjected to batch normalization, followed by an activation function such as ReLU to obtain the first filtered grid 28a of features. The first filtered grid 28a of features may be pooled (e.g., according to max pooling of features) into a tensor, e.g., a 16x14x14, as a second filtered grid 28b of features, which may be processed by further convolution filter arrangements into a 32x14x14 third filtered grid 28c of features. The third filtered grid of features 28c may be pooled towards, for example, a 32x7x7 grid of features 28d and flattened into an intermediate flattened feature vector 30 having 1568 features. The intermediate flattened feature vector 30 may then be mapped to the flattened feature vector 16 through a fully connected MLP as part of the flattening layer 14, thereby reducing the size of the flattened feature vector 16 towards N features.

[0110] The features of the flattened feature vector 16 may be split into several flattened feature vector subsets 18, which may each be passed to each of a number of independent variational quantum circuits 20 and processed according to trainable variational parameters. The measurement outputs 32 of the variational quantum circuits 20 may then be processed by a fully connected classification MLP 34 to obtain output labels 36. Each of the variational quantum circuits 20 may include M qubits such that the N features may be split into K=N / M flattened feature vector subsets 18, where K is a natural number greater than 1, i.e., K∈{2; 3; 4; ...}, and we assume that one feature is encoded in each qubit of the variational quantum circuit 20.

[0111] FIG. 3B shows an example of a variational quantum circuit 20 that may be used in the system 10 shown in FIG. 3A.

[0112] 3B, each variational quantum circuit 20 of the plurality of variational quantum circuits 20 comprises a number of qubits 38, which may be initialized to an initial quantum state at the start of a computation, e.g., the qubits may be initialized to one of the computational basis states |0〉 or |1〉 as shown. A number of encoding gates 40 may then be applied to the states of the qubits 38 to encode the input features {x1,...,x5} into the quantum states of the qubits 38, which in this example may be accomplished through a single qubit (X) rotation, with the rotation angle proportional to the respective input feature.

[0113] Rotations of qubits 38 about different axes in the computation space may be described by rotation operators.

[0114] X(θ)=exp(-iσ x θ / 2), (2) and Y(θ)=exp(-iσ y θ / 2),(3) Define each rotation about a respective angle θ. In the figure, the vertical connection between a horizontal line having a black circle at one end and a white circle with a cross embedded in it at the other end represents a “CNOT” gate and can be mathematically described by:

[0115] JPEG2024132890000005.jpg22158, or JPEG2024132890000006.jpg29158

[0116] The CNOT gate can entangle the states of each of the two qubits 38, thus resulting in a superposition state to exploit the quantum supremacy of quantum circuits.

[0117] After the quantum state is encoded in the qubit 38 by the encoding gate 40, the quantum state of the qubit 38 may be transformed according to a number i of layers 42 of quantum gates, where each layer 42 may comprise a number of variational quantum gates 44 and a number of entanglement gates 46. The variational quantum gates 44 are transformed according to variational parameters {w1, w2, ..., w 15}, where each layer 42 can have different variational parameters. The entanglement gate 46 can entangle the states of multiple qubits 38, such as through application of a CNOT gate as shown in FIG. 3B.

[0118] Although not shown in FIG. 3B, those skilled in the art will appreciate that encoding gates 40 may be part of a layer of quantum gates 42, e.g., to perform data re-uploading of input features and / or to encode multiple input features into each qubit 38 of the variational quantum circuit 20.

[0119] After the i layers 42 of quantum gates are sequentially applied to the quantum state of the qubit 38, the state of the qubit 38 may be measured by a detector 48, such as a number of single-qubit detectors. Each variational quantum circuit 20 may be run iteratively to determine a measurement output 32 as an expectation value of the final measured quantum state of the qubit 38.

[0120] 3A, each of the independent variational quantum circuits 20 may receive a respective flattened feature vector subset 18 and independently process its respective input features to determine a respective measurement output. Each of the independent variational quantum circuits 20 may be configured with different variational parameters {w1, w2, ..., w 15}.

[0121] The measurement outputs 32 can be passed to a machine learning model, in particular a fully connected layer of artificial neurons 34, to combine information obtained from the measurement outputs 32 of multiple variational quantum circuits 20 and obtain output labels 36, etc.

[0122] The hybrid quantum-classical computing system 10 can be trained based on a training dataset of sample data, which may include a plurality of sample grids 26 of input features and corresponding sample output labels, such as Arabic numerals that correspond to handwritten symbols.

[0123] 4A and 4B show examples of different handwritten symbols taken from the Modified National Institute of Standards and Technology (MNIST) database that can be classified by classification system 10 into matching decimal digits 0-9 (as shown above the symbols). Each of the pictures has a resolution of 28x28 pixels and may be considered as a grid 26 of input features, where each pixel may be an input feature according to its associated grayscale color value. While the handwritten symbol in FIG. 4A may be unambiguously mapped overall to a corresponding digit, the example in FIG. 4B may be misinterpreted by a human classifier.

[0124] Handwritten digit datasets have been widely used to test the performance of various neural network (NN) models, where the primary objective is to classify each image by labeling it with a matching class label using a machine-based classifier, which usually involves recognizing which Arabic digits are present in the image.

[0125] The MNIST database has a total of 70,000 images, which are divided into two groups: 60,000 images are designated as training images, and the remaining 10,000 images are designated as test images to evaluate the performance of the machine-based classifier.

[0126] 5 illustrates a method for training a hybrid quantum-classical computing system 10 to approximate a labeling function of a grid 26 of input features. The method includes providing a sample grid 26 of features of a sample dataset to a machine learning model (S20) and receiving an output flattened feature vector 16 from the machine learning model (S22). The method further includes separating the output flattened feature vector 16 into a plurality of flattened feature vector subsets 18 and providing each of the flattened feature vector subsets 18 to a corresponding one of a plurality of variational quantum circuits 20 (S24) and receiving an output label from a combination module 24 based on the measurement outputs 32 of the plurality of independent variational quantum circuits 20 (S26). The method further includes determining parameter updates for the variational parameters and the trainable combination parameters based on the values ​​of the loss function and the labels of the output labels 36 (S28).

[0127] The machine learning model may be implemented as a multi-layer perceptron, and the method may begin with initializing trainable parameters of the multiple variational quantum circuits 20 (variational parameters), the machine learning model, and trainable weighting coefficients that form combination parameters for combining the outputs of the multiple independent variational quantum circuits 20. Subsequent steps may include selecting a loss (cost) function for comparing the output labels 36 generated by the hybrid quantum-classical computing system 10 to sample labels of a training dataset, such as mean squared error (MSE).

[0128] The training algorithm may then iteratively select data points of the training dataset, including the grid of input features 26 and corresponding sample labels, which are processed using the machine learning model followed by the multiple independent variational quantum circuits 20. The variational quantum circuits 20 encode each subset 18 of the flattened feature vectors 18 generated by the machine learning model using a selected encoding routine (e.g., angular embedding as shown in FIG. 3B). The expectation value of the selected measurement operator may be measured in parallel or sequentially after running the multiple independent variational quantum circuits 20, e.g., the expectation value of a qubit 38 is in a “0” or “1” state based on a Z-axis projection.

[0129] A prediction is obtained as an output label 36 by combining the outputs of the variational quantum circuit 20 according to the trainable weights of the combination layer 24, and the predicted output label 36 is compared with the sample labels of the training dataset.

[0130] Further, the gradient of the comparison value (cost) may be determined for some or all of the trainable parameters. The next data point may then be processed, for example, until all data points of the training data set have been passed. The gradient may be determined for all parameters in the system 10, and the average gradient of all data points may be used to update the trainable parameters, for example, based on an optimization algorithm such as the Adaptive Moment Estimation Algorithm (Adam). The iterative training process may be terminated at any point during training, for example, if the cost function reaches a particular value, reaches a plateau, or gets stuck in a loop around a point in the parameter space. Those skilled in the art will appreciate that it is not necessary to evaluate the cost function at each iteration step, but that it may be sufficient to calculate the gradient during training.

[0131] Based on the calculated gradients, an average gradient of the processed data points can be determined and used to update the trainable parameters based on the selected optimization algorithm and the selected learning rate, thereby completing one epoch of training.

[0132] Training can then be resumed from the first data point, for example, until it is determined that the parameter updates no longer improve the comparison value, for a predetermined number of epochs, or until a predetermined comparison value is reached.

[0133] The configuration and training hyperparameters of the hybrid quantum-classical computing system 10 can be selected based on a labeling function. For example, in the task of labeling a sequence of handwritten characters, such as the examples recorded in the Modified National Institute of Standards and Technology (MNIST) database of handwritten digits, the input layer may be adapted to the size of the database images, and the output layer may be adapted to match the labeling according to real Arabic digits, for example ranging from 0 to 9.

[0134] As part of implementing the variational quantum circuit 20, an initial circuit definition may be passed to a quantum circuit implementation device, which may adapt the variational quantum circuit 20 based on the architecture of the quantum device, such as to optimize the variational quantum circuit 20 for quantum hardware. For example, when the initial variational quantum circuit 20 specifies a CNOT operation, the hardware implementation may include combining single-qubit and multi-qubit state rotations. Additionally, multiple gates may be combined into different arrangements of quantum gates, such as to implement the variational quantum circuit 20 with hardware-efficient quantum gates.

[0135] Those skilled in the art will appreciate that the number of features in the flattened feature vector 16 is preferably a multiple of the number of qubits 38 in the plurality of variational quantum circuits 20 to avoid wasting processing resources. However, those skilled in the art will appreciate that some inputs to one of the variational quantum circuits 20 may remain fixed values, or one of the plurality of variational quantum circuits 20 may have a different circuit architecture, e.g., fewer qubits 38, such as to adapt the system 10 or method to a predefined convolutional filtering architecture having a number of features in the flattened feature vector 16 that is not a multiple of the total number of qubits 38 in the plurality of independent variational quantum circuits 20.

[0136] To test the hybrid quantum-classical computing system 10 obtainable by the above-described training method, multiple independent variational quantum circuits 20 were implemented in a classical simulator based on the circuit configuration shown in FIG. 3B, which includes four different independent variational quantum circuits 20, each having three layers 42 of quantum gates operating on five qubits 38. The system 10 was compared to a purely classical machine learning classifier that differs from the hybrid quantum-classical computing system 10 mainly in that the classification block 22 comprises a fully-connected MLP device implemented on classical hardware instead of multiple variational quantum circuits 20.

[0137] FIG. 6A shows the results of training a hybrid quantum-classical computing system 10 as shown in FIG. 3A, FIG. 3B (HQNN) when compared to the performance of a purely classical convolutional neural network (CNN), where the variational quantum circuit 20 is replaced by a multi-layer perceptron, MLP, and both systems are trained on the MNIST dataset to predict correct Arabic digits. The left figure tracks the training loss over epochs of training each system, and the right figure tracks the accuracy of each system in predicting the correct labels of handwritten samples of test images of the MNIST dataset. As indicated in the figure legend, the hybrid quantum-classical computing system 10 contains fewer trainable weights (parameters) than the CNN being tested.

[0138] FIG. 6B shows a bar graph of the relative performance, i.e., the accuracy of predicting the correct label of unseen handwritten symbols in the validation dataset, of the CNN on the left and the hybrid quantum-classical computing system 10 on the right. Although the number of parameters used to build the hybrid quantum-classical computing system 10 is about 8 times smaller than that of the CNN, the hybrid quantum-classical computing system 10 is better at predicting the correct label than the CNN, with a 38% decrease in the probability of attributing an incorrect label and a final accuracy of about 99.21%.

[0139] Thus, the system 10 using multiple variational quantum circuits 20 can achieve accuracy comparable to or greater than a corresponding classical classifier using less trainable parameters. This may be advantageous in situations where the number of samples in the sample data set for training the classifier is small or relatively few in complex tasks, and the classical classifier may be more or less complex depending on the complexity of the task. The inventors have found that even though the multiple variational quantum circuits 20 process only a respective subset of the flattened feature vector 16, and even though the correct label typically depends on a complex arrangement of features in the grid of features 26, the system 10 still accurately attributes a matching label to the image, indicating that the system 10 may be advantageously applied to classification tasks of the grid of features 26 in a short-term quantum computing device.

[0140] In the preceding description, the convolution block 12 has generally been implemented as a classical convolution block 12 based on classical convolution filters implemented in classical features. However, those skilled in the art will appreciate that the system 10 and methods are generally not limited to such embodiments and that the convolution block 12 may also be implemented using quantum circuits, for example using quantum convolution layers.

[0141] 7 illustrates an example of a convolution block 12 that includes a quantum convolution layer 50. In the illustrated example, the quantum convolution layer 50 is configured to receive a grid of features, such as the grid of input features 26, or a subset of the filtered grids of intermediate features 28a-d, and encode the features into qubits 52 in the quantum convolution layer 50. The illustrated quantum convolution layer 50 includes four qubits 52 and may be configured to receive a subset of the grid of input features 26 that includes four features, such as a 2×2 subset of the grid of input features 26, similar to the action of a classical convolution filter.

[0142] The quantum convolutional layer 50 may encode input features into the quantum state of the qubit 52 via encoding gates 54, e.g., via angular embedding, and may transform the state of the qubit 52 through the action of a layer of quantum gates 56. The layer of quantum gates 56 may comprise multi-qubit gates, such as CNOT gates, or may comprise variational quantum gates, whose action on the quantum state of the qubit 52 may be determined by respective trainable variational parameters. In the illustrated example, the layer of quantum gates 56 is applied once, although one skilled in the art will appreciate that the layer of quantum gates 56 may be applied multiple times to transform the initial state of the qubit 52.

[0143] After the layer of quantum gates 56 acts on the quantum state of the qubits 52, the quantum state can be measured by a detection assembly 58, such as a number of single-qubit detectors, which can measure the Z projection of the quantum states of all qubits 52.

[0144] The quantum convolutional layer 50 may be applied in parallel to all possible matching subgroups of the grids 26, 28a-d of features provided as input, for example all subgroups of 2×2 squares of adjacent features in the input, and may provide an output for each measured quantum bit, i.e., four measurement outputs. The quantum convolutional layer 50 may feature the same variational parameters for all subgroups of the grids 26, 28a-d of features, in other words the same quantum convolutional layer 50 may be applied to different subgroups of the grids 26, 28a-d of features provided as input. Each of the measurement outputs may be considered as the output of a different filter, such that the result of applying the quantum convolutional layer 50 to the grids 26, 28a-d of features as input results in four different filtered grids 60 of features, which may be further processed by additional quantum convolutional layers 50 or classical convolutional filters (not shown in FIG. 7).

[0145] The quantum convolutional layer 50 may be trained similarly to a classical convolutional layer as described above for the independent variational quantum circuit 20, e.g., by optimizing the variational parameters based on an optimization algorithm including, e.g., adaptive moment estimation and a gradient meter of the variational parameters, e.g., based on a parameter shift rule.

[0146] The filtered grid of features 60 may be flattened by the flattening layer 14 to obtain a flattened feature vector 16, which may be processed by the classification block 22 to obtain output labels 36 for the grid of input features 26, which may be implemented at least in part using a variational quantum circuit 20, as described above.

[0147] The description and illustrations of the preferred embodiment serve merely to illustrate the invention and its associated beneficial effects, and should not be understood to imply any limitation, the scope of the invention being to be determined solely by the appended claims. [Explanation of symbols]

[0148] 10 Hybrid quantum-classical computing system 12 Convolution Blocks 14 Planarization layer 16 Flattened feature vector 18 Flattened feature vector subset 20 Variational Quantum Circuits 22 Classification Blocks 24 Connecting layer 26 Grid of input features 28a-d Filtered grid of input features 30 Intermediate flattened feature vectors 32 Measurement Output 34 Fully connected MLP 36 Output Label 38 qubits 40 Encoding Gates 42 Layers of quantum gates 44 Variational Quantum Gates 46 Tangled Gate 48 Detectors 50 Quantum Convolutional Layer 52 qubits 54 Encoding Gate 56 Layers of Quantum Gates 58 Detection Assembly A filtered grid of 60 features

Claims

1. A hybrid quantum-classical computing system (10) for classifying a grid of features (26, 28, 28a-d) provided as input, said system (10) comprising: a convolution block (12) comprising a convolution filter configured to receive as an input the grid of features (26, 28, 28a-d) and to output (32) a plurality of output features (28, 28a-d) of the grid of features (26, 28, 28a-d) based on a trainable configuration of the convolution filter; a flattening layer (14) for converting the filtered grid of output features (28, 28a-d) received from the convolution block (12) into a flattened feature vector (16); a classification block (22) configured to receive the flattened feature vector (16, 18) and generate an output classification, the classification block (22) comprising a plurality of independent variational quantum circuits (20) each comprising a plurality of quantum gates (40, 44, 46) acting on a qubit (38) of a qubit register of a respective variational quantum circuit (20), the plurality of quantum gates (40, 44, 46) being variational quantum gates (44), the operation of the variational quantum gates (44) on the qubits (38) of the qubit register being parameterized according to associated variational parameters; and an encoding gate (40) for modifying the state of the qubit (38) of the qubit register according to the input feature vector (16, 18); Equipped with The variational quantum circuits (20) of the plurality of independent variational quantum circuits (20) receive different subsets (18) of features from the flattened feature vector (16) as the input feature vector; A hybrid quantum-classical computing system (10), in which measurement outputs (32) of the plurality of independent variational quantum circuits (20) are combined to determine a label (36) of the grid of input features (26, 28, 28a-d) as the output classification.

2. 2. The hybrid quantum-classical computing system of claim 1, wherein the output state of all qubits in the qubit register of one of the plurality of independent variational quantum circuits is independent of the action of quantum gates in another of the plurality of independent variational quantum circuits.

3. 3. The hybrid quantum-classical computing system of claim 1, wherein the variational parameters of one of the plurality of independent variational quantum circuits are different from the variational parameters of another of the plurality of independent variational quantum circuits.

4. 3. The hybrid quantum-classical computing system of claim 1, wherein each of the plurality of independent variational quantum circuits comprises a plurality of layers of quantum gates, each layer of the plurality of layers of quantum gates in particular comprising a variational quantum gate for each of the quantum bits of the quantum bit register.

5. The hybrid quantum-classical computing system (10) of claim 1 or 2, wherein the plurality of independent variational quantum circuits (20) are implemented in quantum hardware.

6. 3. The hybrid quantum-classical computing system (10) of claim 1 or 2, wherein the convolution block (12) and / or the planarization layer (14) are implemented in classical hardware, in particular using trainable machine learning models.

7. The hybrid quantum-classical computing system (10) of claim 1 or 2, wherein the plurality of independent variational quantum circuits (20) each comprises at least two qubits (38) in a respective qubit register.

8. 3. The hybrid quantum-classical computing system of claim 1, wherein each of the plurality of independent variational quantum circuits comprises an entanglement gate for entangling quantum states of at least two of the qubits of the respective qubit register.

9. 3. The hybrid quantum-classical computing system of claim 1, wherein the quantum states of qubits of different ones of the plurality of independent variational quantum circuits are disentangled prior to measurement.

10. 3. The hybrid quantum-classical computing system (10) of claim 1 or 2, wherein the trainable parameters of the convolution block (12), the flattening layer (14), and the classification block (22) are obtained based on a joint training process of a machine learning model implemented in particular in classical hardware and the plurality of independent variational quantum circuits (20) implemented in quantum hardware.

11. 3. The hybrid quantum-classical computing system of claim 1, wherein each of the variational quantum circuits of the plurality of independent variational quantum circuits is configured to encode a number of inputs into the quantum states of the quantum bits of its quantum bit register, and the input feature vector includes a number of features that is a multiple of a number of inputs of the variational quantum circuits of the plurality of independent variational quantum circuits.

12. 3. The hybrid quantum-classical computing system of claim 1, wherein the measurement outputs of the multiple independent variational quantum circuits are combined using a trainable layer of artificial neurons implemented in classical hardware, in particular a fully connected layer of artificial neurons implemented in classical hardware.

13. 1. A method for determining labels (36) for a grid (26, 28, 28a-d) of input features based on a hybrid quantum-classical computation algorithm, the method comprising: receiving the grid of input features (26, 28, 28a-d) and generating a filtered grid of features (26, 28, 28a-d) based on the grid of input features (26, 28, 28a-d) and a convolution filter, the convolution filter configured to output a plurality of output features for the grid of input features (26, 28, 28a-d) based on a trainable configuration of the convolution filter; flattening the filtered grid of output features into a flattened feature vector (16); separating the flattened feature vector (16) into a plurality of flattened feature vector subsets (16, 18) and encoding each of the flattened feature vector subsets (18) into a qubit (38) of a corresponding one of a plurality of independent variational quantum circuits (20), each of the plurality of independent variational quantum circuits (20) comprising: an encoding gate (40) configured to act on the quantum state of a qubit (38) based on characteristics of the corresponding subset (18) of the plurality of flattened feature vector subsets (16, 18); a variational quantum gate (44) where the action of the variational quantum gate (44) on the qubit (38) of the qubit register is parameterized according to an associated variational parameter; and an entanglement gate (46) for creating a superposition of the quantum states of two qubits (38) of the corresponding circuit; obtaining a measurement output (32) based on measuring an output state of each of the plurality of independent variational quantum circuits (20), and combining the measurement outputs (32) of the plurality of independent variational quantum circuits (20) to determine a corresponding output label (36); The method includes:

14. 1. A method for training a hybrid quantum-classical computing system (10) to approximate a labeling function of an input grid (26, 28, 28a-d) of features, the system (10) comprising: a machine learning model implemented on a classical processing system configured to generate a flattened feature vector (16, 18) based on said grid of features (26, 28, 28a-d) according to a parameterized transfer function, said parameterized transfer function being parameterized by parameterized machine learning parameters, said machine learning model comprising a convolutional layer (12) of artificial neurons; a plurality of independent variational quantum circuits (20) each comprising a plurality of quantum gates (40, 44, 46) acting on a qubit (38) of a respective qubit register, the plurality of quantum gates (40, 44, 46) comprising a variational quantum gate (44), the parameterized action of the variational quantum gate (44) on the qubit (38) of the qubit register being parameterized according to associated variational parameters; and an encoding gate (40) for modifying the state of the qubit (38) of the qubit register according to an input feature vector (16, 18); a plurality of independent variational quantum circuits (20), each of which receives a different subset (18) of features from the flattened feature vector (16) as the input feature vector (16, 18); a combination module (24) implemented on a classical processing system and configured to receive measurement outputs (32) generated by the plurality of variational quantum circuits (20) and to combine the measurement outputs (32) of the plurality of independent variational quantum circuits (20) to determine a classification result, the combination being based on a plurality of trainable combination parameters; wherein the method comprises: providing a sample grid of features (26, 28, 28a-d) to the machine learning model and receiving the output flattened feature vector (16) from the machine learning model; separating the output flattened feature vector (16) into a plurality of flattened feature vector (16) subsets and providing each of the flattened feature vector (16) subsets to a corresponding one of the plurality of variational quantum circuits (20); receiving an output label (36) from the combination module (24) based on the measurement outputs (32) of the plurality of independent variational quantum circuits (20); determining parameter updates for the variational parameters and the trainable combination parameters based on a value of a loss function for the output labels (36); The method includes:

15. A non-transitory machine-readable medium storing machine-readable instructions which, when executed by a processing system, cause the processing system to implement or control the system (10) of claim 1 or 2, or perform the method of claim 13 or 14.

Citation Information

Patent Citations

  • Method and system for estimating ground state energy of quantum system

    US20230054868A1