Classification using quantum neural networks

文档序号:1220311 发布日期:2020-09-04 浏览:8次 中文

阅读说明:本技术 使用量子神经网络的分类 (Classification using quantum neural networks ) 是由 E.H.法里 H.内文 于 2019-01-16 设计创作,主要内容包括:本公开涉及可以在量子计算系统上实现的分类方法。根据第一方面,本说明书描述了一种用于训练在量子计算机上实现的分类器的方法,所述方法包括:在具有已知分类的输入状态下准备多个量子位,所述多个量子位包括一个或多个读出量子位;将一个或多个参数化量子门应用于多个量子位,以将输入状态变换为输出状态;使用输出状态下的一个或多个读出量子位的读出状态,确定输入状态的预测分类;将预测分类与已知分类进行比较;以及根据预测分类与已知分类的比较,更新参数化量子门的一个或多个参数。(The present disclosure relates to classification methods that may be implemented on quantum computing systems. According to a first aspect, the present specification describes a method for training a classifier implemented on a quantum computer, the method comprising: preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits; applying one or more parameterized qubits to a plurality of qubits to transform an input state to an output state; determining a predictive classification of the input state using the readout states of the one or more readout qubits in the output state; comparing the predicted classification to known classifications; and updating one or more parameters of the parameterized quantum gate based on the comparison of the predicted classification to the known classification.)

1. A method for training a classifier implemented on a quantum computer, the method comprising:

preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits;

applying one or more parameterized qubits to the plurality of qubits to transform an input state to an output state;

determining a predicted classification of the input state using the readout state of the one or more readout qubits in the output state;

comparing the predicted classification to known classifications; and

one or more parameters of the parameterized quantum gates are updated based on a comparison of the predicted classification to the known classification.

2. The method of claim 1, further comprising: iterate until one or more threshold conditions are met.

3. The method of claim 2, further comprising: determining a readout state of the one or more readout qubits, wherein determining the readout state comprises repeatedly:

preparing the plurality of qubits in an input state;

applying the parameterized quantum gates to the input states; and

the readout state of the one or more readout qubits is measured.

4. The method of any one of the preceding claims, wherein comparing the predicted classification to the known classification comprises determining an estimated sample loss.

5. The method of claim 4, wherein updating one or more parameters comprises modifying parameters to reduce estimated sample loss.

6. The method of claim 5, comprising modifying the one or more parameters using a gradient descent method.

7. The method of any preceding claim, wherein the parameterized quantum gates each implement a parametric unitary transform.

8. The method of claim 7, wherein each of the parameterized quantum gates comprises one of: a single-quantum-bit quantum gate; a dual-qubit quantum gate; or a three-qubit quantum gate.

9. The method of claim 7 or 8, wherein one or more of the quantum gates implement a unitary transform of the form:

exp(iθ∑),

where θ is a parameter of the parameterized quantum gate and Σ is a generalized Pauli operator applied to one or more of the plurality of qubits.

10. The method of any preceding claim, wherein the input state comprises a superposition of binary strings.

11. The method of any of claims 1-10, wherein the input state comprises an arbitrary quantum state.

12. The method of any one of the preceding claims, wherein the input state is prepared using a classical artificial neural network.

13. The method of any one of the preceding claims, wherein a classifier is determined from the readout states using a classical artificial neural network.

14. The method of any preceding claim, further comprising:

applying one or more parameterized unitary operators to transform a plurality of qubits from an unclassified input state to a classified output state;

determining a readout state from measurements of one or more readout qubits in the sorted output state; and

the unclassified input states are classified according to the read states.

15. A method of classification performed using a quantum computer, the method comprising:

transforming a plurality of qubits from an input state to an output state using one or more parameterized unitary operators, the parameters of one or more parameterized qubits being determined using the classifier training method of any of claims 1 to 13;

determining a readout state from measurements of one or more readout qubits in the output state; and

the input states are classified according to the read states.

16. A quantum computing system, comprising:

a plurality of qubits; and

one or more parameterized quantum gates,

wherein the system is configured to perform the method of any of the preceding claims.

17. A quantum computing system, comprising:

a plurality of qubits; and

one or more parameterized quantum gates,

wherein the system is configured to:

preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits;

applying one or more parameterized qubits to the plurality of qubits to transform an input state to an output state;

determining a predicted classification of the input state using the readout state of the one or more readout qubits in the output state;

comparing the predicted classification to known classifications; and

one or more parameters of the parameterized quantum gates are updated based on a comparison of the predicted classification to the known classification.

18. A quantum computing system, comprising:

a plurality of qubits; and

one or more parameterized quantum gates,

wherein the system is configured to:

applying one or more parameterized unitary operators to transform the plurality of qubits from an unclassified input state to a classified output state, the parameters of the one or more parameterized quantum gates being determined using a classifier trained using a method comprising:

preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits;

applying one or more parameterized qubits to the plurality of qubits to transform an input state to an output state;

determining a predicted classification of the input state using the readout state of the one or more readout qubits in the output state;

comparing the predicted classification to known classifications; and

updating one or more parameters of the parameterized quantum gate based on a comparison of the predicted classification to the known classification;

determining a readout state from measurements of one or more readout qubits in the sorted output state; and

the unclassified input states are classified according to the read states.

Technical Field

The present disclosure relates to classification methods that may be implemented on quantum computing systems. The present disclosure also relates to quantum computing systems.

Background

Quantum computers are computing devices that solve certain types of problems faster than classical computers by quantum stacking and entanglement. The building blocks of a quantum computer are qubits. A qubit is actually a two-level system whose states can be in the superposition of its two states, rather than just either of the two states as a classical bit would be.

Classical machine learning is the field of research in which one or more classical computers learn to perform task classes using feedback generated from machine learning processing experience or collected data obtained during the execution of these tasks by the computer.

Disclosure of Invention

Various embodiments of the invention include a method and a system, which are characterized by what is stated in the independent claims. Various embodiments of the invention are disclosed in the dependent claims.

According to a first aspect, the present specification describes a method of training a classifier implemented on a quantum computer, the method comprising: preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits; applying one or more parameterized qubits to a plurality of qubits to transform an input state to an output state; determining a predictive classification of the input state using the readout states of the one or more readout qubits in the output state; comparing the predicted classification to known classifications; and updating one or more parameters of the parameterized quantum gate based on the comparison of the predicted classification to the known classification.

The method may further comprise iterating until one or more threshold conditions are met.

The method may further comprise: determining a readout state of one or more readout qubits, wherein determining the readout state comprises repeatedly: preparing a plurality of qubits in an input state; applying the parameterized quantum gates to the input states; and measuring the readout state of one or more readout qubits. Where θ is a parameter of the parameterized qubit gate and Σ is a generalized Pauli operator that acts on one or more of the plurality of qubits.

Comparing the predicted classification to the known classification may include determining an estimated sample loss.

Updating the one or more parameters may include modifying the parameters to reduce the estimated sample loss.

The method may comprise modifying one or more parameters using a gradient descent method.

The parametric quantum gates may each implement a parametric unitary transform.

Each of the parameterized quantum gates may include one of: a single-quantum-bit quantum gate; a dual-qubit quantum gate; or a three-qubit quantum gate.

One or more of the quantum gates may implement a unitary transform of the form:

exp(iθ∑),

where θ is a parameter of the parameterized quantum gate and Σ is a generalized Pauli operator that acts on one or more of the plurality of qubits.

The input state may include a superposition of binary strings.

The input states may include any quantum state.

The method may include preparing the input state using a classical artificial neural network.

The method may include determining a classifier from the read-out state using a classical artificial neural network.

The method may further comprise: applying one or more parameterized unitary operators to transform a plurality of qubits from an unclassified input state to a classified output state; determining a readout state from measurements of one or more readout qubits in the sorted output state; and classifying the unclassified input state according to the read state.

According to a second aspect, the present specification describes a method of classification performed using a quantum computer, the method comprising: transforming the plurality of qubits from an input state to an output state using one or more parameterized unitary operators, determining parameters of one or more parameterized qubits using the classifier training method of the first aspect; determining a readout state from measurements of one or more readout qubits in the output state; and classifying the input state according to the read state.

According to a third aspect, the present specification describes a quantum computing system comprising: a plurality of qubits; and one or more parameterized quantum gates, wherein the system is configured to perform the method of any of the various aspects described herein.

According to a fourth aspect, the present specification describes a quantum computing system comprising: a plurality of qubits; and one or more parameterized quantum gates, wherein the system is configured to: preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits; applying one or more parameterized qubits to a plurality of qubits to transform an input state to an output state; determining a predictive classification of the input state using the readout states of the one or more readout qubits in the output state; comparing the predicted classification to known classifications; and updating one or more parameters of the parameterized quantum gate based on the comparison of the predicted classification to the known classification.

According to a fifth aspect, the present specification describes a quantum computing system comprising: a plurality of qubits; and one or more parameterized quantum gates, wherein the system is configured to: applying one or more parameterized unitary operators to transform a plurality of qubits from an unclassified input state to a classified output state, the parameters of one or more parameterized quantum gates being determined using a classifier trained using a method comprising: preparing a plurality of qubits in an input state having a known classification, the plurality of qubits including one or more readout qubits; applying one or more parameterized qubits to a plurality of qubits to transform an input state to an output state; determining a predictive classification of the input state using the readout states of the one or more readout qubits in the output state; comparing the predicted classification to known classifications; and updating one or more parameters of the parameterized quantum gate based on the comparison of the predicted classification to the known classification; determining a readout state from measurements of one or more readout qubits in the sorted output state; and classifying the unclassified input states according to the read states.

Drawings

For a more complete understanding of the methods, devices, and systems described herein, reference is now made to the following drawings, in which:

fig. 1 shows a schematic example of a classification method performed using a quantum computer according to an embodiment;

FIG. 2 shows a flow diagram of a method of training a classifier using a quantum computer, according to an embodiment;

FIG. 3 shows a flow diagram of an example of a method of updating quantum gate parameters using gradient descent, according to an embodiment;

FIG. 4 shows a flow diagram of a method for classifying quantum states according to an embodiment; and

fig. 5a and 5b illustrate a classification system including a classical artificial neural network and a quantum neural network classifier according to an embodiment.

Detailed Description

Fig. 1 shows a schematic overview of the operation of a classification system implemented using a quantum computer.

The classification method is performed using a quantum computing system 100 that includes a plurality of qubits 102. Qubit 102 may be, for example (a non-exhaustive list below) a superconducting qubit (e.g., an "Xmon" or "Gmon" qubit), a quantum dot, an ionized atom in an ion trap, or a spin qubit. Qubits 102 may be kept at a temperature low enough to maintain coherence between qubits throughout the execution of a quantum algorithm. In embodiments using superconducting qubits, the temperature is kept below the superconducting critical temperature. In some embodiments, the plurality of qubits 102 may include one or more helper qubits (not shown) for storing an entangled quantum state.

The quantum computing system 100 also includes one or more parameterized qubits 104 for implementing a plurality of qubits 102Generation of one or more parameterized unitary transforms Ull) (also referred to herein as "unitary"). The quantum gate 104 includes quantum circuitry that operates on one or more qubits 102 to perform logical operations. A non-exhaustive list of quantum gates 104 includes Hadamard gates (Hadamard gates), C-NOT gates, phase shift gates, Toffoli gates, and/or controlled U gates. Each quantum gate 104 acts on the input state 106 or the output of the previous quantum gate 104 in turn. Parametric qubit gate 104 acts on qubits 102 to change the state of qubits 102. In the example shown, L qubits 104 are applied to the input states 106 in turn, each of which transforms the state of a plurality of qubits 102.

The system is configured to learn the parameters of the quantum gate 104, which when applied to an input state | ψ, m >106 comprising a state | ψ >108 to be classified and one or more readout qubits | m >110, produces an output state 112 from which a predicted classification l' (z)114 (also referred to herein as a predictive flag function or predictor) of the state | ψ >106 to be classified can be determined (a predictor). A measurement is performed on one or more readout qubits 110 in the plurality of qubits 102 to determine a predicted classification 114 of the input state 106 from the output state 112. In the embodiment shown in fig. 1, only one readout qubit 110 is used, resulting in a binary prediction classifier. In general, however, other types of classifiers may be implemented using any number of readout qubits 110. The qubits representing the states 108 to be classified may be referred to as "data qubits".

The system 100 uses supervised learning to learn the parameters of the quantum gates 104 that can obtain a predicted classification l' (z)114 of the input states 106. A sample state 108 having a known classification l (z) (also referred to herein as a marker function) is selected from a sample data set S for supervised learning, and an input state 106 comprising the sample state 108 and one or more readout qubits 110 is prepared. Starting with an initial set of parameters for the quantum gates 104, one or more quantum gates 104 are applied to the first selection input state 106 to generate the output state 112. The state of one or more readout qubits 110 of the output state 112 is measured to determine a predictive classifier 114 of the sample state 108. The prediction classifier 114 is compared to known classifications of the sample states 108, for example using a sample loss function, and the parameters of the quantum gate 10 are updated using the comparison.

The process is iterated each time using another sample state 108 with a known classification selected from the training data set S until some predetermined threshold condition is met. The resulting parameters of the quantum gate 104 may be used in a quantum computer to implement a classification method for unclassified states. Similar to classical artificial neural networks, trained quantum classifiers can be described as "quantum neural networks".

In contrast to previous proposals for performing machine learning on quantum computers, the systems and methods described herein do not require the use of a specialized quantum version of the classical artificial neural network "perceptron". Further, the methods and systems described herein may be implemented using recently available quantum computing systems. In contrast to classical artificial neural networks, which can only take a classical state as an input, the systems and methods described herein can accept and classify two classical quantum states as inputs. The ability to classify input quantum states in this manner is very useful in quantum metrology, where entangled quantum states are used to make high resolution measurements.

In the near future, it is expected to provide gate model quantum computers with sufficient fidelity to run circuits deep enough to perform tasks that classic computers cannot simulate. One way to design quantum algorithms to run on such devices is to have the architecture of the hardware determine the set of gates to use. Contrary to previous work, the approach described herein establishes a general framework for supervised learning on quantum devices, particularly suitable for implementation on recently available quantum processors.

Fig. 2 shows a flow diagram of a method for training a classifier implemented on a quantum computer according to an embodiment.

In operation 2.1, an initial set of parameters for the quantum gate is provided

Figure BDA0002591703190000051

For use with the quantum gate 104. The initial set of parameters may be chosen, for example, randomly or based on some predefined condition or best guess.

In some embodiments, the sequence of quantum gates 104 includes L unitary operators selected from some experimentally available set of unitary operators. The sequence of quantum gates 104 implements unitary operatorsGiven by:

in this case, the amount of the solvent to be used,

Figure BDA0002591703190000054

is a parameter (theta)LL-1,…θ1) Vector of (1), Ull) Is a unitary operator implemented by the l-th quantum gate.

In general, each parameter θlA plurality of parameters, for example in the form of vectors, may be included. In some embodiments, each quantum gate is characterized by a single scalar-valued parameter. In these embodiments, each quantum gate is parameterized by a single parameter.

In some embodiments, the quantum gate 104 implements a unitary operator of the form:

Ull)=exp(iθll)

where Σ is a generalized Pauli operator that acts on one or more qubits. In other words, Σ is the set from { σ } that acts on one or more of the plurality of qubits 102xyzThe tensor product of the operators of. This form of operator is bounded by a parameter θ of 1 relative to the normlWith a gradient. Therefore, as described below with respect to

Figure BDA0002591703190000061

Will be bounded, avoiding training with classical artificial neural networksThe problem associated with the gradient of amplification during training.

The quantum gate 104 may be implemented in a variety of ways depending on, for example, the type of qubit 102 being used by the system. For example, in superconducting qubit based systems, the quantum gate may be implemented using an intermediate electrical coupling circuit or microwave cavity. In trap spin based quantum computers, an example method of implementing a quantum gate includes applying a radio frequency pulse to a qubit and implementing a multi-qubit gate using spin-spin interactions.

In operation 2.2, an n-qubit sample state | ψ >108 with a known classification is selected from the training data set S. The training data set S includes a plurality of sample states 106, each having a known classification. The selected sample state | ψ >108 is then prepared in operation 2.3 in the input state 106 comprising the selected sample state 106 and one or more readout qubits 110. The qubit 110 can be prepared for readout in a known state. For example, the input state 106 may be prepared in the following form:

|in>=|ψ,m>

where m denotes m readout qubits 110 prepared in a known state.

In operation 2.4, the sequence of parameterized quantum gates 104 is applied to the selected input state 106 using the current set of parameters. The sequence of quantum gates 104 transforms the plurality of qubits 102 from the input state 106 to the output state 112 by applying a unitary transform.

At operation 2.5, the readout state of one or more readout qubits 110 is measured. For example, one or more Pauli operators may be measured on one or more readout qubits 110. In some embodiments, repeated measurements are made on the readout qubit 110 to determine the readout state. In order to perform repeated measurements, operations 2.3 to 2.5 are repeated a predetermined number of times. In other words, the method comprises: repeatedly preparing a plurality of qubits in the input state 106; applying the parameterized quantum gates 104 to the input state 106; and measuring the readout state of one or more readout qubits.

At operation 2.6, a prediction classifier l' (z)114 is determined from measurements of one or more readout qubits 110. In some embodiments, the prediction classifier 108 may be the state of one or more readout qubits 110. For example, in a binary classifier, measurements of the Pauli operator on readout qubits 110 can directly provide the prediction classification 114. In other embodiments, the prediction classifier 114 may be a function of the readout state of one or more readout qubits 110.

In operation 2.7, the predicted classifier 114 of the input state 106 is compared to the known classifiers of the input state 106.

The prediction classifier 114 may be compared to known classifiers using a metric. For example, the prediction classifier 114 may be compared to known classifiers using a sample loss function (or a loss function). The sample loss function provides the "cost" of the unmatched known and predicted classes. The sample loss function may be, for example, a function that has a minimum value when the predictive classifier 114 matches a known classifier. In these examples, the goal of the training method may be to reduce the average sample loss over the training set below a threshold.

There are many examples of sample loss functions that may be used to compare a known classification to a predicted classification 114. For example, for a binary classifier l (ψ) that classifies the input state as either +1 or-1, and initially sets a single readout qubit to 1 on a computational basis, an example sample loss (loss) that can be used is given by:

Figure BDA0002591703190000071

wherein, Yn+1Is applied to the sigma of the read-out qubity. Since the marker function (in this example, is

Figure BDA0002591703190000072

) Bounded between-1 and 1, so the minimum value of the sample loss is zero.

At operation 2.8, a threshold condition is checked. The threshold condition is a condition for determining when to stop the training process. The threshold condition may include one or more of the following: of number of iterations of operations 2.2 to 2.8Limiting; verifying a threshold error rate for the set of states; and/or parametersThe one or more convergence criteria.

At operation 2.9, if the threshold condition is not satisfied, one or more parameters of the quantum gate 106 are updated according to a comparison of the predicted classifier 108 of the input state 106 with known classifiers of the input state 106.

In some embodiments, the predicted classifier of the input state 106 is compared to the known classifier of the sample state 108 and the parameters are updated using a gradient descent method. Fig. 3 shows a flow chart of an example of a method for updating parameters using gradient descent.

In operation 3.1, sample loss is estimated. To estimate the sample loss, one or more readout qubits 110 in the output state 112 are repeatedly measured and the sample loss is calculated from the measurements. The preparation of a copy of the initial state 106 is repeated and acted upon by the quantum gate 104 to produce a copy of the output state 112 and to measure the readout qubits 110 for each copy of the output state 112. In order to estimate the sample loss to within 99% of the probability of a true sample loss, the read-out state is at least 2 ≦ selected2And (5) secondary measurement.

In operation 3.2 one of the unitary gate parameters is changed by a small value. Resulting parameter setAnd the original parameter setDiffering by a small amount in one component. The small amount may for example be a predetermined small amount. Alternatively, the small amount may be randomly selected from a series of values, for example.

In operation 3.3, a new sample loss with changed parameters is determined. To this end, repeated measurements of one or more readout qubits 110 are taken at the output stateOn the copy of (1). A copy of the initial state 106 is prepared and acted upon by the quantum gate 104 to generate a copy of the output state 112, since the "unclonable theorem" prohibits direct copying of the output state; the readout qubits 110 for each copy are measured.

The gradient of the sample loss with respect to the varying component can then be calculated in operation 3.4. For example, the gradient may be determined using a finite difference method.

At operation 3.5, if the gradient of sample loss has not been calculated with respect to at least one of the parameters, the method returns to operation 3.2 and repeats operations 3.2 to 3.5, each time changing a different parameter. In general, for L parameters, these steps are repeated L times to obtain the corresponding

Figure BDA0002591703190000083

Full gradient estimation of

At operation 3.6, the parameters are updated according to the estimated gradient. Given an estimated gradient

Figure BDA0002591703190000085

Passing alongThe direction changes the parameter to update the parameter. For example, the parameters may be updated using the following formula:

Figure BDA0002591703190000087

wherein r < 1 is the "learning rate". The learning rate may be a fixed number. In some embodiments, the learning rate varies as the learning progresses.

Referring again to fig. 2, if the threshold condition is not met, once one or more parameters are updated, the method returns to operation 2.2 and selects another training example (i.e., another sample state 108 with a known classification), and performs operations 2.3 through 2.8 using the updated quantum gate 104 parameters. In embodiments where a limit on the number of iterations is used as a threshold condition, the iteration count is increased by one.

If the threshold condition is satisfied, the updated parameters are stored and/or output at operation 2.10. These "trained" parameters may be used to implement the classification method on a quantum computer, as described with respect to fig. 4.

Fig. 4 shows a flow diagram of a classification method implemented on a quantum computer. The method may use a classifier trained by the method described with respect to fig. 1-3. The classification method may be used as an independent method of classifying the input state. Alternatively, the classification method may be used as a subroutine in an algorithm implemented at least in part on a quantum computer. In some embodiments, the classification method may be considered a single pass through the training method, but without any comparison to known classifications or any update to the weights of the parameterized quantum gates 104. The method may be implemented on a quantum computing system, such as the quantum computing system 100 described with respect to fig. 1.

In operation 4.1, an unclassified input state is received. The unclassified input state includes a plurality of qubits 102. The plurality of qubits 102 includes n qubits representing quantum states 108 to be classified, and one or more readout qubits 110 in known states. In some embodiments, the quantum state is received from a routine running on a quantum or classical computer and/or experimental device. Many other examples are possible. In some embodiments, the method includes preparing the input state 106 according to the received quantum state 108 to be classified.

In operation 4.2, a plurality of parameterized quantum gates 104 are applied to the input state 106 to transform the input state 106 to the output state 112. The parameters of the parameterized quantum gates 104 have been trained using any of the methods described with respect to fig. 1-3.

The quantum gate 104 may be implemented in a variety of ways depending on, for example, the type of qubit 102 being used by the system. For example, in superconducting qubit based systems, the quantum gate may be implemented using an intermediate electrical coupling circuit or microwave cavity. In trap spin based quantum computers, an example method of implementing a quantum gate includes applying a radio frequency pulse to a qubit and implementing a multi-qubit gate using spin-spin interactions.

In some embodiments, the quantum gates 104 used during the classification method are of the same type and implement the same unitary operation as the quantum gates 104 used in the training method. In other embodiments, the quantum gates 104 used during the classification method are of a different type, although the same unitary operation as the quantum gates 104 used in the training method is still implemented using the same parameters.

At operation 4.3, the readout state of one or more readout qubits 110 is measured. For example, one or more Pauli operators may be measured on one or more readout qubits 110. In some embodiments, the read state is repeatedly measured to increase the accuracy of the read state. Repeatedly measuring the readout state includes, for example, applying parameterized quantum gates 104 to a copy of the input state 106 to generate the output state 112; and measuring the readout state of one or more readout qubits 110 in the output state 112.

In operation 4.4, the quantum states to be classified are classified according to the measured readout state. In some embodiments, the classification is provided directly by measurement in the readout state. For example, in a binary classifier, a read state of 1 or-1 may correspond to a classification. In other embodiments, the classification is provided by a function of the measured read states.

By way of illustration, several example embodiments and applications will now be described. For convenience, each of these examples is described with respect to binary classification and a single readout qubit is used, but it will be understood that the methods and systems can be extended to non-binary classification. For example, a plurality of readout qubits may be used to classify the input state into one or more of a plurality of possible classifications.

In some embodiments, the system is configured to learn to classify classical binary states. The input state is taken from the set of binary strings z ═ z1z2…znWherein each z isiIs a binary bit. For example, each binary bit may take one of ± 1. In addition, binary bits can be taken separatelyA value of one of 0 or 1. For a binary string of length n, there is 2nSuch a string. The training data set includes a subset of possible binary strings, each having a known classification l (z), which in this example is considered a binary label. The classification may represent, for example, a subset majority or a subset parity.

During training, a string z is selected from a training data set1. A plurality of qubits 102 is prepared in the input state 106 to represent the selected string. For example, the input state 106 representing the string may be an n +1 qubit state prepared in the computation basis state:

Figure BDA0002591703190000101

where m is the readout qubit prepared in a known state. For example, the qubit 10 may be prepared for readout in one of the binary states ± 1.

The purpose of the training is to make the measurement of the properties of the readout qubit in the output state correspond to the binary classifier l (z). For example, a quantum gate may be trained to measure the Pauli operator on a readout qubit 110 (which may have a value of + -1) to predict the classification of the input string z. Hereinafter, though σyUsed as an example of a Pauli operator, but σ can alternatively be usedxOr σz

The parameterized sequence of quantum gates 106 is then applied to the input states 106 to generate output states 112 given by

Figure BDA0002591703190000102

As described above with respect to fig. 2. At willyIn an embodiment of the measurement operator for reading qubits for use as output states, the sample loss function is in the form of

In the above formCan be used to train parameters

Figure BDA0002591703190000104

Before discussing the specific example of applying the method to a binary string, it will be determined that the quantum neural network is capable of expressing any two valued signature functions, although it may be costly in terms of circuit depth. Exist 2nAn n-bit string of characters, thus havingA possible binary marking function l (z). Given a marker function, please define its operation as the following operator in the computation-based state:

wherein, Xn+1Is applied to the sigma of the read-out qubitxAnd (5) an operator. By rotating the readout qubit by the mark of the string zDouble acting. Correspondingly:

where l (z) is interpreted as operator diagonal on a computational basis. For the binary classifier, since l (z) is +1 or-l, it can be seen that:

Figure BDA0002591703190000113

this means that, at least at some level of abstraction, there is a way to represent any markup function with a quantum circuit.

UlCan be written as a unitary product of two qubits (i.e., realized by a sequence of two qubit quantum gates). For this discussion, switching to Boolean variables is facilitated

Figure BDA0002591703190000114

And consider the labeling function l (z) as (1-2B), where B has a value of 0 or 1. According to bit b1To bnThe Reed-Muller representation of the general B function of (a) can be written as:

Figure BDA0002591703190000115

the addition is mod2, and the coefficients a are both 0 or 1. Note that there is 2nA coefficient, and since each coefficient may have a value of + -1, representsA boolean function. The formula may have an exponential length.

Then, marker dependent unitary UlCan be written as:

viewed as an operator, we see that each term in the Reed-Muller representation of B can be swapped with each of the other terms, based on computing the diagonal of z. U shapelEach term in (B) is multiplied by Xn+1And thus each item can be exchanged with other items. Each non-zero term in the Reed-Muller representation is in UlResulting in a controlled bit flip on the readout qubit 110. To illustrate this using an example, consider a three-bit entry involving bits 2, 7, and 9. This corresponds to the operator:

Figure BDA0002591703190000118

this is a unit cell (identity) unless b is2=b7b 91 in this case it is-iXn+1. Any single qubit unitary controlled to act on qubit n +1 (where the first n bits are controlled) can be written as n2The product of two qubits unitary. Thus, in accordance with havingThe marker function expressed by the Reed-Muller equation for the RM term can be written as the product of the RM exchange n +1 qubit operators, and each of these can be written as n2A plurality of double quantum bits unitary. The quantum representation result is similar to the classical representation theorem, which states that the quantum representation result can be represented by a size of 2nRepresents any boolean flag function on a neural network with a depth of 3. Of course, such a large matrix cannot be represented on a conventional computer. In this case, the method is naturally performed in a Hilbert (Hilbert) space of exponential dimensions, but may require exponential circuit depth to express certain functions.

Having now proven the representation of a binary function, several exemplary embodiments will now be described.

In some embodiments, the marker function l (z) is a binary marker indicating a subset of bits in an input binary string of length nThe parity of (2). The Reed-Muller equation for the subset parity flag is:

wherein, if bit bjIn the subset then aj1, and if bit bjOut of subset then aj0. Plus mod 2. Then, an example unitary to implement the subset parity is given by:

Figure BDA0002591703190000123

wherein, Xn+1Is the Pauli operator σ acting on the readout qubit 110x. Herein, because

Figure BDA0002591703190000124

Factor (a) and Xn+1The addition in the second exponent is automatically mod 2. The circuit consists of a sequence of (at most) n switched dual qubit gates 104, in which qubits are read outIs one of the two qubits upon which each quantum gate 104 acts.

This unitary can be learned using the training methods described herein. From having a random initiationN parameter (v):

Figure BDA0002591703190000125

initially, the optimal parameters may be learned using the method described with respect to FIG. 1, if bit bjIn the subset then

Figure BDA0002591703190000126

And if bit bjOut of subset then θj0. By way of example, from 6 to 16 bits and at random θjInitially, with a random gradient descent, much less than 2 can be usednThe subset parity-check labeling function is learned for every sample, so the function can successfully predict the label of the unseen example. The introduction of a low level of marking noise (e.g., up to 10% marking noise) does not hinder learning.

In some embodiments, the marker function l (z) is a binary marker indicating a subset of bits in an input binary string of length nMajority of subset (c)In the z ═ 1 representation of the input string, if the majority of bits in the subset is +1, then the subset majority is +1, otherwise-1. The subset majority can be written as:

wherein, if bit bjIn the subset then aj1, and if bit bjOut of subset then aj0. Consider unitary:

Figure BDA0002591703190000134

wherein, Xn+1Is the Pauli operator σ acting on the readout qubit 110x,ZjIs the Pauli operator σ acting on the j-th qubitzAnd β is defined belown+1The following are given:

Figure BDA0002591703190000135

so that

Item(s)

Figure BDA0002591703190000137

Is n, so if β were chosen to lie in the range 0 < β < pi/n, e.g., 0.9 pi/n, then the subset majority would be:

Figure BDA0002591703190000138

this means that even if the individual sample loss is not 1 or-1, Y is repeatedly measuredn+1And rounding the expected value up or down to ± 1 also results in a complete classification error.

This unitary can be learned using the training methods described herein. From having a random initiation

Figure BDA0002591703190000139

N parameter (v):

initially, the optimal parameters may be learned using the method described with respect to FIG. 1, if bit bjIn a subsetMiddle value of thetajβ and if bit bjOut of subset then θj=0。

The embodiments described above provide examples of training and using binary classifiers. In general, a binary classifier can be trained to represent any binary function. The quantum gates 104 used can be limited to single-qubit unitary operators.

In some embodiments, the methods and systems may be used to train an image classifier. In these embodiments, the training set S includes a plurality of images labeled with known classifications. For example, in an embodiment of learning how to classify handwritten numbers, the training set includes a plurality of instances of handwritten numbers, each instance having labels corresponding to the numbers that the handwritten number is intended to represent. An example of such a data set is the MNIST data set, which includes 55,000 training samples, which are manually labeled 28 x 28 pixel images representing numbers between 0 and 9.

The input states for image classification include pixel data of the image being classified. For example, in a black and white image, each qubit in the input state may represent whether a pixel in the input image is black or white. In these examples, the input states may include n qubits representing n pixels of an image, and one or more readout qubits prepared in known states. In some embodiments, the classified image includes one or more components/channels, such as color data, brightness, and/or hue, that represent the image. In these embodiments, each pixel in each channel may be represented by a qubit in a plurality of qubits 102.

For image classification, the single qubit quantum gate 104 is taken unitary, where Σ is an X, Y and/or Z operator that acts on any one of the qubits 102. In general, a dual qubit gate is taken as an XY, YZ, ZX, XX, YY, and/or ZZ operator that acts between any pair of different qubits in the plurality of qubits 102.

In some embodiments, a predetermined number of parameterized gates 104 is randomly selected from the set of possible quantum gates 104. For example, a quantum gate between 500 and 1000 may be selected for a binary image classifier. In some embodiments, the initial parameters of the quantum gates 104 may be randomly selected.

In some embodiments, the dual qubit quantum gates 104 used in image classification are limited to ZX or XX types. In some of these embodiments, at least one of the two qubits operated by the dual qubit quantum gate is a readout qubit 110. The layers of the same type of quantum gate 104 may alternate in a quantum computer. For example, the sequence of quantum gates may include three alternating layers of ZX quantum gates and three layers of XX quantum gates. Each layer may include a plurality of quantum gates. Each layer may include a dual qubit quantum gate operating between one or more readout qubits 110 and each other qubit in the plurality of qubits 102. For example, in a binary classifier, each layer may include n dual qubit gates, each acting between a readout qubit 110 and a different one of the n qubits representing the state to be classified.

Although the above embodiments have been described in relation to image classification, it will be appreciated that they may equally be applied to other classification types that receive a character string as input.

In contrast to classical artificial neural networks, the system described herein can accept quantum states (which means n qubit states under arbitrary superposition) as input. The system may be used to train a classifier for quantum states to classify the quantum states according to labels associated with attributes of the quantum states.

Some other embodiments will now be described. In the embodiments described below, binary classifiers of quantum states are used. However, by increasing the number of readout qubits, the method can be extended to other classification types including more than two classifications.

Input state 106 includes n qubits representing the state | ψ > to be classified and one or more readout qubits 110. In the embodiments described below, one readout qubit is used and set to a known initial state |1> on a computational basis, but other initial readout states may be used.

Used in the examples described belowBinary classifiers correspond to Hamiltonian with statesWhether the desired value of (b) is positive or negative. This is equivalent to determining whether or not to do so. Such classifiers can be useful in finding the minimum energy state of a system controlled by a particular hamilton amount. For example, the classifier l (| ψ) is given by the following equation>)

Figure BDA0002591703190000151

Consideration operator

UH(β)=exp(iβ H Xn+1)

Where β is taken to be a small positive number. Then

For sufficiently small beta, this is approximated

2β<ψ|H|ψ>

The expected sign of the mark we predict is consistent with the true mark. In this sense, the signature function has been expressed by a quantum circuit with small classification errors. The error is due to the approximation taken to the small β expansion < ψ | sin (2 β H) | ψ >. However, if we make β much smaller than the inverse of the H norm, the error can be made small.

For example, consider a graph where we have ZZ coupling on each side with coefficients of +1 or-1 chosen randomly

Wherein, and is limited to the sides in the figure and JijIs +1 or-1. Suppose there are M entries in H. We can first pick M angles ij and consider a circuit that implements unitary of the form:

Figure BDA0002591703190000162

when theta isij=βJijThis unitary will provide the marker function. These weights may be learned using the methods described above with respect to fig. 1-3.

Quantum state | ψ>Present in 2nIn the wiferbert space, quantum states are limited, in some embodiments, to quantum states that can be established by applying several qubit unitary to some simple direct product state. In some embodiments, the training state is limited to this form.

For example, eight data qubits and one readout qubit may be trained to classify three canonical graphs (with 12 edges accordingly). In this example, there are twelve parameters θijSequence for forming quantum gate 102

Figure BDA0002591703190000163

The training state may be a direct product state that depends on eight random angles. The state can be formed by rotating each of the eight qubits about the y-axis by an associated random angle, each starting with an eigenstate of an associated X operator. The test state is formed in the same manner. Since the states are randomly selected from the continuum, the probability of the training set and the test set being different is high. After approximately 1000 test states are presented, the quantum network correctly labels 97% of the test states.

In some embodiments, the unitary category may include more parameters. For example, a two-layer unitary where Σ is XX and ZX, where the first operator acts on one of the eight data qubits and the second operator acts on the readout qubit 110. In an example using three canonical graphs as input, the learning process may achieve less than 3% classification error after seeing approximately 1000 training examples.

In some embodiments, the ability of a quantum system to accept quantum states as input may be used to enhance the training of classifiers for traditional input states. For example, with a quantum neural network, the input states may include superimposed conventional data. A single quantum state is a superposition of computational base states, each state representing a single sample in a batch of samples, and a single quantum state can be considered as a quantum code for the batch. Different phases on the components result in different quantum states.

For example, consider a binary classification. The sample space may be divided into samples labeled +1 and samples labeled-1. Taking into account status

Figure BDA0002591703190000171

And

Figure BDA0002591703190000172

wherein N is+And N_Is a normalization factor that is a function of,

Figure BDA0002591703190000173

is the phase. In some examples, all phases are set to zero. Each of these states can be viewed as a batch containing all samples with the same label. An equation giving unitary associated with any marker function is returned. Note that the state | +1>Is +1, and the state | -1>The expected value of (c) is-1. This is because unitary is diagonal on the computational basis of the data qubits, so the cross terms disappear and the phase is independent. Consider now the parameter dependent unitary

Figure BDA0002591703190000174

It is the diagonal on the computational basis of the data qubits. By acting this operator on | +1>Y of the obtained staten+1Is the average over all samples labeled +1 in the predicted label value for the quantum neural network. For state-1>By making this operator act on | -1>Y of the obtained staten+1Is the average over all samples of tag-1 in the predicted tag values of the quantum neural network. In other words, ifDiagonal on the basis of the computation of the data qubits, then

Figure BDA0002591703190000176

Is an empirical risk for the entire sample space. If a parameter can be found which makes it 0

Figure BDA0002591703190000177

The quantum neural network will correctly predict the signature of any input in the training set.

In some embodiments, a set of gates that are diagonal on the computation basis of data qubits is used. Examples of such sets are the generalized Pauli operators ZX and ZZX, where the Z operator acts on the data qubits and the X operator acts on the readout. Using these gates, the empirical risk formula is the empirical risk of the complete data set of the quantum neural network. Empirical risk may be used as a parameter for training a quantum neural network as a sample loss function. Starting from a random selection of parameters, a minimization algorithm (such as gradient descent) may be used to reduce the empirical risk.

In some embodiments, the set of gates may exceed those of the diagonals on a data qubit computation basis. In the case of these embodiments, the first and second,

Figure BDA0002591703190000178

the empirical risk of the quantum neural network acting on the entire sample space can no longer be directly understood. However, driving it low means at least that the states | +1> and | -1> are correctly marked.

Fig. 5a and 5b show examples of quantum neural network classifiers used in conjunction with a classical artificial neural network. In general, the classification methods implemented on the quantum computing system 100 as described herein may be combined with one or more classical artificial neural networks 116. This may improve the accuracy of the classification method.

Classical artificial neural network 116 includes multiple layers of "neurons" 118, each having connections 120 to one or more neurons in each adjacent layer. In the example shown, the classical artificial neural network 116 has three layers, although a fewer or greater number of layers is also possible. These examples also show a fully connected layer, where each neuron 118 is connected to each neuron in an adjacent layer, although a partially connected network is also possible.

Each neuron 118 accepts one or more inputs and outputs a function of the inputs characterized by one or more weights associated with each input. These weights may be trained using standard machine learning techniques to produce the desired output from the neural network 116.

In some embodiments, the state 108 to be classified is input into a classical artificial neural network 116. The output of the classical artificial neural network 116 may be used as an input to the quantum computing system 100 to generate the input state 106 to be classified according to the methods described above. An example of such an embodiment is shown in fig. 5 a.

In some embodiments, the readout state from readout qubits 110 in the quantum computing system 100 is input into a classical artificial neural network 116. A classical artificial neural network may be trained to determine a predictive classification of an input state using a readout state of an output state of one or more readout qubits in a plurality of qubits. An example of such an embodiment is shown in fig. 5 b.

The implementations of quantum themes and quantum operations described in this specification may be implemented in suitable quantum circuits or more generally in quantum computing systems, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. The term "quantum computing system" may include, but is not limited to, a quantum computer, a quantum information processing system, a quantum cryptography system, or a quantum simulator.

The terms quantum information and quantum data refer to information or data carried, held, or stored by a quantum system, with the smallest nontrivial system being a qubit, e.g., a system that defines a unit of quantum information. It is to be understood that the term "qubit" encompasses all quantum systems that can be suitably approximated as two-stage systems in the respective context. Such a quantum system may comprise, for example, a multi-stage system having two or more stages. For example, such systems may include atomic, electronic, photonic, ionic, or superconducting qubits. In many implementations, the computation base states are identified as the ground state and the first excited state, but it will be appreciated that other arrangements are possible in which the computation states are identified with higher-order excited states. It is understood that quantum memory is a device that can store quantum data for long periods of time with high fidelity and efficiency, such as an optical-to-substance interface where light is used for transmission and a substance is used to store and preserve quantum characteristics of quantum data, such as superposition or quantum coherence.

The quantum circuit element may be used to perform quantum processing operations. That is, the quantum circuit element may be configured to perform operations on data in an indeterminate manner using quantum mechanical phenomena such as superposition and entanglement. Certain quantum circuit elements, such as qubits, may be configured to represent and operate on information in more than one state simultaneously. Examples of superconducting quantum circuit elements that may be formed using the processes disclosed herein include circuit elements such as coplanar waveguides, quantum LC oscillators, qubits (e.g., flux qubits or charge qubits), superconducting quantum interference devices (SQUIDs) (e.g., RF-SQUIDs or DCSQUIDs), inductors, capacitors, transmission lines, ground planes, and the like.

In contrast, classical circuit elements typically process data in a deterministic manner. The classical circuit elements may be configured to collectively execute instructions of a computer program by performing basic arithmetic, logical, and/or input/output operations on data, which is represented in analog or digital form. In some implementations, the classical circuit element can be used to send data to and/or receive data from the quantum circuit element through an electrical or electromagnetic connection. Examples of classical circuit elements that can be formed with the processes disclosed herein include fast single flux quantum (RSFQ) devices, Reciprocal Quantum Logic (RQL) devices, and ERSFQ devices, which are energy efficient versions of RSFQ without the use of bias resistors. Other conventional circuit elements may also be formed using the processes disclosed herein.

During operation of a quantum computing system using superconducting quantum circuit elements and/or superconducting classical circuit elements (such as the circuit elements described herein), the superconducting circuit elements are cooled within a cryostat to a temperature that allows the superconducting material to exhibit superconducting properties.

While this specification contains many specific implementation details, these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features specific to particular implementations. Certain features that are described in this specification in the context of separate implementations can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination. Furthermore, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the division of various components in the implementations described above should not be understood as requiring such division in all implementations.

Many implementations have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. Other implementations are within the scope of the following claims.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:资产管理设备和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!