TRAINING OF VARIATIONAL QUANTUM CLASSIFIERS BY PARAMETRIC COORDINATE ASCENT

Information

  • Patent Application
  • 20210256416
  • Publication Number
    20210256416
  • Date Filed
    February 13, 2020
    4 years ago
  • Date Published
    August 19, 2021
    3 years ago
Abstract
Embodiments of the disclosed technology employ parametric coordinate ascent to train a quantum circuit. In certain implementations, parameters (e.g., variational parameters) are learned by coordinate ascent using closed form equations. This strategy helps ensure monotonic convergence to local maxima in parameter space at predictable convergence rates and eliminates the overhead due to hyperparameter sweeps.
Description
FIELD

This application concerns quantum computing.


SUMMARY

This disclosure descries embodiments of a quantum classifier training strategy. In some examples, optimal parameters are learned by coordinate ascent using closed-form equations for absolute conditional maximum of the utility function in one parameter at a time. In such examples, this strategy helps ensures monotonic convergence to local maxima in a parameter space at predictable convergence rates and eliminates overhead due to hyperparameter sweeps. Embodiments of of the strategy use asymptotically fewer measurements and post-selection steps than other possible approaches. Embodiments of the described methods are also applicable to circuit compression. Numerical simulations are also disclosed that demonstrate embodiments of the technology.


In certain embodiments, a circuit classifier is trained based on variational quantum circuits. The training can comprise, for example: receiving a set of labeled data; performing a coordinate-vise ascent to learn the circuit classifier for the labeled data, wherein the coordinate-wise ascent is performed on a classical computing device and thereby trains the circuit classifier; and executing the trained circuit classifier on a quantum computer. In some implementations, the circuit classifier has a structure with variational parameters. The circuit classifier can comprise a plurality of single-qubit and/or two-qubit gates that have variational parameters defining unitary action of the circuit on quantum states. In some examples, the training further comprises modifying variational parameters one at a time. In further examples, the training comprises maximizing a utility function by selection of one or more variational parameters. The utility function can, for example, apply a non-degenerate observable that has two different eigenvalues. In some examples, the variational parameters are fixed one by one, according to a predetermined schedule that visits each parameters at least once. In other examples, the variational parameters are fixed one by one, according to a randomized schedule that visits each parameter at least once. In some examples, the training comprises splitting the training data into smaller batches that are used by the utility function to update the variational quantum circuits.


Some example embodiments comprise receiving a batch of training samples, a variational quantum circuit skeleton for learning one or more variational parameters, and a set of initial values for the variational parameters; by a classical computer, generating a classical description of a quantum program to be implemented by a quantum circuit; by the classical computer, training the quantum circuit described by the quantum program using the batch of training samples and incrementally adjusting the variational parameters to improve prediction of a set of test data; and implementing the trained quantum circuit described by the quantum program on a quantum computing device.


In some examples, one or more of the following are received: parameter tolerance bounds, or a bound on a maximum number of iterations to be performed during the training. In some implementations, the training is performed iteratively by computing analytic expressions for expectation values of the training data to increase a probability of correct identification of training labels. In some implementations, the expectation value is inferred by computing overlaps between quantum states. For example, the overlap computation can be performed by a Hadamard test to infer the real and imaginary components of the overlap. In further examples, the training sample is given by a qubit encoding or an amplitude encoding in which data is represented as amplitudes or phases of a state vector of qubits of the quantum circuit.


Another example embodiment is a system, comprising: a quantum computing device; and a classical computing device in communication with the quantum computing device, the classical computing device being programmed to predict a class label using a quantum computer that applies a trained quantum circuit to a representation of the input data, measures the quantum state, and generates a sampled bit for inferring the class label. In certain implementations, the representation of the input data is given by an amplitude encoding of the data or a qubit encoding of the data. In further implementations, the classical computing device is programmed to train the quantum computer to predict a class label using a pre-trained classifier circuit. In further implementations, the coordinate ascent procedure uses hyperparameters. In some implementations, the set of hyperparameters includes one or more of: (a) a depth of the quantum circuit that is being trained; (b) a size of a mini-batch in training the quantum circuit; (c) a maximum number of iterations used for training; (d) a number of random restarts that are applied in the training. In certain implementations, a program run on a classical computer is used for sweeping through feasible values of hyperparameters and and post-selecting quantum circuit(s) with the optimal hyperparameter choices.


Any of the disclosed embodiments can be implemented by one or more computer-readable media storing computer-executable instructions, which when executed by a computer cause the computer to perform any of the disclosed methods. Also disclosed herein are systems for performing embodiments of the disclosed embodiments comprising a classical computer configured to program, control, and/or measure a quantum computing device.


The foregoing and other objects, features, and advantages of the disclosed technology will become more apparent from the following detailed description, which proceeds with reference to the accompanying figures.





BRIEF DESCRIPTION OF THE FIGURES


FIG. 1 illustrates a generalized example of a suitable classical computing environment in which aspects of the described embodiments can be implemented.



FIG. 2 illustrates an example of a possible network topology (e.g., a client-server network) for implementing a system according to the disclosed technology.



FIG. 3 illustrates another example of a possible network topology (e.g., a distributed computing environment) for implementing a system according to the disclosed technology.



FIG. 4 illustrates an exemplary system for implementing the disclosed technology in which the system includes one or more classical computers in communication with a quantum computing device.



FIG. 5 illustrates an example variational circuit in five qubits.



FIG. 6 illustrates an example subalgorithm for coordinate ascent from an initial parameter setting.



FIG. 7 illustrates an example subalgorithm for improvement along an individual parameter.



FIGS. 8-10 are flow charts showing example methods for performing embodiments of the disclosed technology.





DETAILED DESCRIPTION
I. General Considerations

As used in this application, the singular forms “a,” “an,” and “the” include the plural forms unless the context clearly dictates otherwise. Additionally, the term “includes” means “comprises.” Further, the term “coupled” does not exclude the presence of intermediate elements between the coupled items. Further as used herein, the term “and/or” means any one item or combination of any items in the phrase.


Although the operations of some of the disclosed methods are described in a particular, sequential order for convenient presentation, it should be understood that this manner of description encompasses rearrangement, unless a particular ordering is required by specific language set forth below. For example, operations described sequentially may in some cases be rearranged or performed concurrently. Moreover, for the sake of simplicity, the attached figures may not show the various ways in which the disclosed systems, methods, and apparatus can be used in conjunction with other systems, methods, and apparatus. Additionally, the description sometimes uses terms like “produce” and “provide” to describe the disclosed methods. These terms are high-level abstractions of the actual operations that are performed. The actual operations that correspond to these terms will vary depending on the particular implementation and are readily discernible by one of ordinary skill in the art.


II. Example Computing Environments


FIG. 1 illustrates a generalized example of a suitable classical computing environment 100 in which aspects of the described embodiments can be implemented. The computing environment 100 is not intended to suggest any limitation as to the scope of use or functionality of the disclosed technology, as the techniques and tools described herein can be implemented in diverse general-purpose or special-purpose environments that have computing hardware.


With reference to FIG. 1, the computing environment 100 includes at least one processing device 110 and memory 120. In FIG. 1, this most basic configuration 130 is included within a dashed line. The processing device 110 (e.g., a CPU or microprocessor) executes computer-executable instructions. In a multi-processing system, multiple processing devices execute computer-executable instructions to increase processing power. The memory 120 may be volatile memory (e.g., registers, cache, RAM, DRAM, SRAM), non-volatile memory (e.g., ROM, EEPROM, flash memory), or some combination of the two. The memory 120 stores software 180 implementing tools for performing any of the disclosed techniques for operating a quantum computer as described herein. The memory 120 can also store software 180 for synthesizing, generating, or compiling quantum circuits for performing any of the disclosed techniques.


The computing environment can have additional features. For example, the computing environment 100 includes storage 140, one or more input devices 150, one or more output devices 160, and one or more communication connections 170. An interconnection mechanism (not shown), such as a bus, controller, or network, interconnects the components of the computing environment 100. Typically, operating system software (not shown) provides an operating environment for other software executing in the computing environment 100, and coordinates activities of the components of the computing environment 100.


The storage 140 can be removable or non-removable, and includes one or more magnetic disks (e.g., hard drives), solid state drives (e.g., flash drives), magnetic tapes or cassettes, CD-ROMs, DVDs, or any other tangible non-volatile storage medium which can be used to store information and which can be accessed within the computing environment 100. The storage 140 can also store instructions for the software 180 implementing any of the disclosed techniques. The storage 140 can also store instructions for the software 180 for generating and/or synthesizing any of the described techniques, systems, or quantum circuits.


The input device(s) 150 can be a touch input device such as a keyboard, touchscreen, mouse, pen, trackball, a voice input device, a scanning device, or another device that provides input to the computing environment 100. The output device(s) 160 can be a display device (e.g., a computer monitor, laptop display, smartphone display, tablet display, netbook display, or touchscreen), printer, speaker, or another device that provides output from the computing environment 100.


The communication connection(s) 170 enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired or wireless techniques implemented with an electrical, optical, RF, infrared, acoustic, or other carrier.


As noted, the various methods and techniques for performing any of the disclosed technologies, for controlling a quantum computing device, to perform circuit design or compilation/synthesis as disclosed herein can be described in the general context of computer-readable instructions stored on one or more computer-readable media. Computer-readable media are any available media (e.g., memory or storage device) that can be accessed within or by a computing environment. Computer-readable media include tangible computer-readable memory or storage devices, such as memory 120 and/or storage 140, and do not include propagating carrier waves or signals per se (tangible computer-readable memory or storage devices do not include propagating carrier waves or signals per se).


Various embodiments of the methods disclosed herein can also be described in the general context of computer-executable instructions (such as those included in program modules) being executed in a computing environment by a processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, and so on, that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing environment.


An example of a possible network topology 200 (e.g., a client-server network) for implementing a system according to the disclosed technology is depicted in FIG. 2. Networked computing device 220 can be, for example, a computer running a browser or other software connected to a network 212. The computing device 220 can have a computer architecture as shown in FIG. 1 and discussed above. The computing device 220 is not limited to a traditional personal computer but can comprise other computing hardware configured to connect to and communicate with a network 212 (e.g., smart phones, laptop computers, tablet computers or other mobile computing devices, servers, network devices, dedicated devices, and the like). Further, the computing device 220 can comprise an FPGA or other programmable logic device. In the illustrated embodiment, the computing device 220 is configured to communicate with a computing device 230 (e.g., a remote server, such as a server in a cloud computing environment) via a network 212. In the illustrated embodiment, the computing device 220 is configured to transmit input data to the computing device 230, and the computing device 230 is configured to implement a technique for controlling a quantum computing device to perform any of the disclosed embodiments and/or a circuit generation/compilation/synthesis technique for generating quantum circuits for performing any of the techniques disclosed herein. The computing device 230 can output results to the computing device 220. Any of the data received from the computing device 230 can be stored or displayed on the computing device 220 (e.g., displayed as data on a graphical user interface or web page at the computing devices 220). In the illustrated embodiment, the illustrated network 212 can be implemented as a Local Area Network (“LAN”) using wired networking (e.g., the Ethernet IEEE standard 802.3 or other appropriate standard) or wireless networking (e.g. one of the IEEE standards 802.11a, 802.11b, 802.11g, or 802.11n or other appropriate standard). Alternatively, at least part of the network 212 can be the Internet or a similar public network and operate using an appropriate protocol (e.g., the HTTP protocol).


Another example of a possible network topology 300 (e.g., a distributed computing environment) for implementing a system according to the disclosed technology is depicted in FIG. 3. Networked computing device 320 can be, for example, a computer running a browser or other software connected to a network 312. The computing device 320 can have a computer architecture as shown in FIG. 1 and discussed above. In the illustrated embodiment, the computing device 320 is configured to communicate with multiple computing devices 330, 331, 332 (e.g., remote servers or other distributed computing devices, such as one or more servers in a cloud computing environment) via the network 312. In the illustrated embodiment, each of the computing devices 330, 331, 332 in the computing environment 300 is used to perform at least a portion of the disclosed technology and/or at least a portion of the technique for controlling a quantum computing device to perform any of the disclosed embodiments and/or a circuit generation/compilation/synthesis technique for generating quantum circuits for performing any of the techniques disclosed herein. In other words, the computing devices 330, 331, 332 form a distributed computing environment in which aspects of the techniques For performing any of the techniques as disclosed herein and/or quantum circuit generation/compilation/synthesis processes arc shared across multiple computing devices. The computing device 320 is configured to transmit input data to the computing devices 330, 331, 332, which are configured to distributively implement such as process, including performance of any of the disclosed methods or creation of any of the disclosed circuits, and to provide results to the computing device 320. Any of the data received from the computing devices 330, 331, 332 can be stored or displayed on the computing device 320 (e.g., displayed as data on a graphical user interface or web page at the computing devices 320). The illustrated network 312 can be any of the networks discussed above with respect to FIG. 2.


With reference to FIG. 4, an exemplary system for implementing the disclosed technology includes computing environment 400. In computing environment 400, a compiled quantum computer circuit description (including quantum circuits for performing any of the disclosed techniques as disclosed herein) can be used to program (or configure) one or more quantum processing units such that the quantum processing unit(s) implement the circuit described by the quantum computer circuit description.


The environment 400 includes one or more quantum processing units 402 and one or more readout device(s) 408. The quantum processing unit(s) execute quantum circuits that are precompiled and described by the quantum computer circuit description. The quantum processing unit(s) can be one or more of, but are not limited to: (a) a superconducting quantum computer; (b) an ion trap quantum computer; (c) a fault-tolerant architect ire for quantum computing; and/or (d) a topological quantum architecture (e.g., a topological quantum computing device using Majorana zero modes). The precompiled quantum circuits, including any of the disclosed circuits, can be sent into (or otherwise applied to) the quantum processing unit(s) via control lines 406 at the control of quantum processor controller 420. The quantum processor controller (QP controller) 420 can operate in conjunction with a classical processor 410 (e.g., having an architecture as described above with respect to FIG. 1) to implement the desired quantum computing process. In the illustrated example, the QP controller 420 further implements the desired quantum computing process via one or more QP subcontrollers 404 that are specially adapted to control a corresponding one of the quantum processor(s) 402. For instance, in one example, the quantum controller 420 facilitates implementation of the compiled quantum circuit by sending instructions to one or more memories lower-temperature memories), which then pass the instructions to low-temperature control unit(s) (e.g., QP subcontroller(s) 404) that transmit, for instance, pulse sequences representing the gates to the quantum processing unit(s) 402 for implementation. In other examples, the QP controller(s) 420 and QP subcontroller(s) 404 operate to provide appropriate magnetic fields, encoded operations, or other such control signals to the quantum processor(s) to implement the operations of the compiled quantum computer circuit description. The quantum controller(s) can further interact with readout devices 408 to help control and implement the desired quantum computing process (e.g., by reading or measuring out data results from the quantum processing units once available, etc.)


With reference to FIG. 4, compilation is the process of translating a high-level description of a quantum algorithm into a quantum computer circuit description comprising a sequence of quantum operations or gates, which can include the circuits as disclosed herein (e.g., the circuits configured to perform one or more of the procedures as disclosed herein). The compilation can be performed by a compiler 422 using a classical processor 410 (e.g., as shown in FIG. 4) of the environment 400 which loads the high-level description from memory or storage devices 412 and stores the resulting quantum computer circuit description in the memory or storage devices 412.


In other embodiments, compilation and/or verification can be performed remotely by a remote computer 460 (e.g., a computer having a computing environment as described above with respect to FIG. 1) which stores the resulting quantum computer circuit description in one or more memory or storage devices 462 and transmits the quantum computer circuit description to the computing environment 400 for implementation in the quantum processing unit(s) 402. Still further, the remote computer 400 can store the high-level description in the memory or storage devices 462 and transmit the high-level description to the computing environment 400 for compilation and use with the quantum processor(s). In any of these scenarios, results from the computation performed by the quantum processor(s) can be communicated to the remote computer after and/or during the computation process. Still further, the remote computer can communicate with the QP controller(s) 420 such that the quantum computing process (including any compilation, verification, and QP control procedures) can be remotely controlled by the remote computer 460. In general, the remote computer 460 communicates with the QP controller(s) 420, compiler/synthesizer 422, and/or verification tool 423 via communication connections 450. In particular embodiments, the environment 400 can be a cloud computing environment, which provides the quantum processing resources of the environment 400 to one or more remote computers (such as remote computer 460) over a suitable network (which can include the internet).


III. Training of Variational Quantum Classifiers by Parametric Coordinate Ascent
A. Introduction to the Disclosed Technology and Preliminaries

Variational quantum circuits (VQC) is a rapidly developing technology crucial for many machine learning applications. The technology is especially desirable for solutions involving noisy intermediate-scale quantum devices. In this disclosure, embodiments that greatly and substantially simplify and streamline the design of variational quantum circuits for classification are disclosed. These embodiments allow for the closed-form analysis of partial derivatives of a given variational circuit with respect to any chosen parameter.


In more detail, and in comparison to other approaches, embodiments of the disclosed technology: (1) asymptotically reduce the number of training epochs used; (2) within each epoch, asymptotically reduce the number of queries to a quantum coprocessor used; (3) provide for a robust monotonic convergence to a local optima; and/or (4) asymptotically reduce the number of destructive measurements used.


In embodiments of the disclosed technology, simplified variational quantum circuits refer to a composition of generalized rotations R(θ, P)=e−iθP or generalized controlled rotation CR(θ, P, Π)=(Π+Πe−iθP), where Π is a projector, Π is its orthogonal complement (Π2=Π, Π+Π=I), and the P and Π form a commuting pair: [P,Π]=0. The uncontrolled generalized rotation is a special case of the controlled one; R(θ, P)=CR(θ, P, I). It is also noted that the customary option of “controlled” is also a special case, where Π projects onto a certain half-space spanned by a half of the standard computational basis.


Remark 1. The commutativity requirement [P, Π]=0 in the above definition of CR(θ, P, Π) is adopted for convenience only. In the absence of commutativity, one can define CR as CR(θ, P, Π)=(Π+Πe−iθPΠ) which defines a unitary operator in this more general case. Since this would lead to somewhat more intricate mathematics in the ongoing sections, one can adopt the commutativity requirement. It is satisfied in all further scenarios of interest.


In this example description of the coordinate ascent circuit strategy, one can start with the problem of approximating a target unitary operator and then proceed to develop a flavor of the strategy that trains variational quantum classifier circuits. The training of variational quantum classifiers is a desirable goal.


In both undergoing sections and further in this disclosure, the following ansatz for a variational quantum circuit U([θ], [P], [Π]) is used:











U


(


[
θ
]

,

[
P
]

,

[
Π
]


)


=




j
=
1

L



C


R


(


θ
j

,

P
j

,

Π
j


)













(
1
)







where for each j∈[L], θj is a real valued parameter, Pj2=I and Πj2j.


A typical example of a rapidly-entangling variational quantum circuit, in five qubits is shown in FIG. 5. In particular, FIG. 5 shows an example variational circuit in five qubits. The circuit illustrated in FIG. 5 comprises 6 single-qubit gates (G1, . . . , G5; G16) and 10 singly-controlled gates forming two “cyclic blocks”. For example, the leftmost two-qubit gate C51 (G6) can be represented as Π66G6, where Π6=½I4⊗(I−Z). In this example, P6 connotes with G6, because they act on different qubits.


B. Ancilla-Free Operator Approximation by a Variational Quantum Circuit

In this subsection:


Let custom-character be a finite set of data samples, where each sample χ∈custom-character comes with efficient encoding into a vector of |χcustom-character of some Hilbert space custom-character that is common to all the data, samples.


Let A be a unitary operator on the Hilbert space custom-character and the goal is to approximate the action of operator A on the ensemble of the encoded data samples from custom-character.


To do this, one can pick a sufficiently large L and look for a circuit of the form (1) (where all Pj, Πj operate on custom-character) that optimally emulates the action of A on custom-character.


One can define the optimal circuit as a circuit that maximizes (or otherwise improves) the following utility function:













(


[
θ
]

,

[
P
]

,

[
Π
]


)


=


1


𝒟








x





ϵ𝒟











U


(


[
θ
]

,

[
P
]

,

[
Π
]


)



x


Ax



.








(
2
)







This utility function has the upper bound of 1, which is reached if and only if the circuit U([θ], [P], [Π]) provide precise emulation of A on the set custom-character. Otherwise it, measures the mean cosine similarity between images of data samples under the action of U([θ], [P], [Π]) and A respectively.


For a chosen j∈[L], one can split the variational circuit (1) into











U


(


[
θ
]

,

[
P
]

,

[
Π
]


)


=


V
j


C


R


(


θ
j

,

P
j

,

Π
j


)




W
j








where








V
j

=



V
j



(


[
θ
]

,

[
P
]

,

[
Π
]


)


=




k
=
1


j
-
1




C


R


(


θ
k

,

P
k

,

Π
k


)






;









W
j

=



W
j



(


[
θ
]

,

[
P
]

,

[
Π
]


)


=




k
=

j
+
1


L



C


R


(


θ
k

,

P
k

,

Π
k


)






;





(
3
)







and where one can explicitly use the representation






CRj,Pjj)=Πjj(cos(θj)I−i sin(θj)Pj).  (4)


By usual convention, a product expression (as shown above) defaults to an identity operator when the number of factors is less than one.


The dependence of custom-character([θ], [P], [Π]) on θj can now be explicitly written out as:













(


[
θ
]

,

[
P
]

,

[
Π
]


)


=



A
j



(

θ


j


)


+



B
j



(

θ


j


)



cos






(

θ
j

)


+


C
j

(



(

θ


j


)


sin






(

θ
j

)


,






where


:








A
j



(

θ


j


)



=


1


𝒟








x





ϵ𝒟

















V
j



Π
j




W
j


x


Ax







,







B
j



(

θ


j


)


=


1


𝒟








x





ϵ𝒟













V
j



Π
j



W
j


x


Ax







,







C
j



(

θ


j


)


=


1


𝒟








x





ϵ𝒟














V
j



Π
j



P
j



W
j


x


Ax



.












(
5
)







Here, θ˜j is introduced to denote the “punctured” list of parameters, in particular θ˜j=[θ1, . . . , θj−1, θj+1, . . . , θL].


It follows that:
















(


[
θ
]

,

[
P
]

,

[
Π
]


)






θ
j



=



-


B
j



(

θ


j


)




sin






(

θ


j


)


+


C
j

(


(

θ


j


)


cos







(

θ
j

)

.








(
6
)







Since each of the angles θj span the compact smooth circumference S1, the θ*j=argmax0j(custom-character([θ], [P], [Π])|θ˜j) is one of its interior significant points. In other words, one has





tan(θ*j)=Cj˜j)/Bj˜j).


Thus, for any choice of fixed values in θ˜j, one can compute the conditional maximum of the utility function in θj (given these values) in closed form. This eliminates problems related to a bad choice of learning rates, problems with vanishing stochastic gradients, and/or, more generally, problems with slow or unstable convergence of stochastic gradient ascent.


C. Locally Optimal Variational Classifier Circuit

Consider now a mathematical description of a variational quantum classifier. Such a classifier strives to learn an optimal observable such that the expected value of that observable on a data sample predicts the class label to be assigned to that sample.


Let A be some standard observable—for example, a Pauli operator—on custom-character expressed in computational basis and let U([θ])=U([θ], [P], [Π]) be a variational circuit of the form (1). For quantum encoding |χcustom-character of an input data sample, one can look to use






custom-characterU([θ]), [P], [Π])χ|A|U([θ], [P], [Π])χcustom-character,


as the inference expectation.


For simplicity, it is assumed here and below, that the observable A is non-degenerate and has two eigenvalues λ1, λ2custom-character. Suppose, without loss loss of generality, that λ12.


Let custom-character be a finite set of data samples, and custom-character:custom-character∴{λ1, λ2} be a two-level labeling function.


By spectral theorem,






A=λ
1Πλ12Πλ2,


where Πλj, j=1, 2 is the orthogonal projector on the corresponding eigenspace of A, Πλ1λ2=custom-character.


Note that, because λ12 one can rewrite the two projectors as:








Π
λ1

=


1


λ
1

-

λ
2





(

A
-


λ
2




)



,






Π
λ2

=


1


λ
1

-

λ
2






(



λ
1



-
A

)

.







One can infer the class label of an input data sample χ based on the overlap of its quantum encoding |χcustom-character with either of the two eigenspaces of the observable U([θ])AU([θ]).


The mean probability of inferring the right label by this method can be expressed as:










1


𝒟








x





ϵ





𝒟







x






U


(

[
θ
]

)






Π




(
x
)





U


(

[
θ
]

)






x



.






(
7
)







Using the above formulae for projectors this cam be rewritten as:

















1


λ
1

-

λ
2








(


[
θ
]

,

[
P
]

,

[
Π
]


)



+




constant











where


:












(


[
θ
]

,

[
P
]

,

[
Π
]


)


=


1


𝒟





(









(
x
)






=

λ
1







x






U


(

[
θ
]

)






AU


(

[
θ
]

)






x




-








(
x
)






=

λ
2







x






U


(

[
θ
]

)






AU


(

[
θ
]

)






x





)








(
8
)







is what is going to be used as the classifier utility function. Again, because the angle parameters [θ] span a smooth compact manifold, the utility function custom-character([θ], [P], [Π]) desirably reaches a maximum at one of its interior critical points of the parameter space.


For a chosen j∈[L], fix all the parameters in θ˜j=(θ1, . . . , θj−1, θj+1, . . . , θL). In order to find conditional maximum maxθj (custom-character([θ], [P], [Π])|θ˜j) an estimate of the derivative is desirable:













(


[
θ
]

,

[
P
]

,

[
Π
]


)






θ
j



.




Recall the split:






U([θ], [P], [Π])=VjCRj, Pj, Πj)Wj.


In view of explicit representation (4), one can rewrite each term of equation (8) as follows:






custom-character
custom-characterχ|U([θ])AU([θ])|χcustom-character=custom-charactercustom-characterVjjj(cos(θj)I−i sin(θj)Pj))Wjχ|A|Vjjj(cos(θj)I−i sin(θj)Pj))Wjχcustom-character





and





aj˜j,χ)+bj˜j,χ)cos(θj)+cj((θ˜j,χ)sin(θj)+dj˜j,χ)cos2j)+ej˜j,χ)sin(θj)cos(θj)+fj˜j,χ)sin2j)





where:






a
j˜j,χ)=custom-character(VjΠjWjχ|A|VjΠjWjχcustom-character,






b
j˜j,χ)=2custom-character(VjjWjχ|A|VjΠjWjχcustom-character,






c
j˜j,χ)=2ℑ(VjΠjPjWjχ|A|VjΠjWjχcustom-character,






d
j˜j,χ)=custom-character(VjΠjWjχ|A|VjΠjWjχcustom-character,






e
j˜j,χ)=2ℑcustom-characterVjΠjPjWjχ|A|VjΠjWjχcustom-character






f
j˜j,χ)=custom-charactercustom-characterViΠjPjWjχ|A|VjΠjPjWjχcustom-character.


Hence,










(


[
θ
]

,

[
P
]

,

[
Π
]


)





θ
j



=



-


B
j



(

θ


j


)




sin






(

θ
j

)


+



C
j



(

θ


j


)



cos






(

θ
j

)


+

2


(



F
j



(

θ


j


)


-


D
j



(

θ


j


)



)


sin






(

θ
j

)


cos






(

θ
j

)


+



E
j



(

θ


j


)




(



cos
2



(

θ
j

)


-


sin
2



(

θ
j

)



)







where, for each (S, s)∈{(B, b), (C, c), (D, d), (E, e), (F, f)}:








S
j



(

θ


j


)


=


1


𝒟






(









(
x
)






=

λ
1






s
j



(


θ


j


,
x

)



-








(
x
)






=

λ
2






s
j



(


θ


j


,
x

)




)

.






In order to obtain closed-form solutions at the critical points, where
















(


[
θ
]

,

[
P
]

,

[
Π
]


)






θ
j



=
0




(
9
)







one can introduce the intermediate variable t=tan(θj/2) and, by direct manipulation find that (9) is equivalent to





(Ej˜j)−Cj˜j))t4−2(Bj˜j)−2Dj˜j)+2Fj˜j))t3−6Ej˜j)t2−  (10)





2(Bj˜j)+2Dj˜j)−2Fj˜j))t+(Ej˜j)+Cj˜j))=0  (11)


Therefore, in certain cases, there are at most four candidate values for conditional argmax of custom-character([θ], [P], [Π]) that can be inspected in a purely classical loop once the coefficients in (9) are collected. In principle, these candidates could be written out in closed form using Ferrari or Euler formulae). However, note that, in certain embodiments, the focus is on real roots of the quartic in t, and note also that the coefficients of that quartic are typically noisy—therefore an approximate search for real only roots is well-justified.


When j-th factor of U(θ) is an uncontrolled unitary, e.g. Πj=custom-character, Πj=0, then the (9) collapses into a much simpler equation that has been discussed, for instance, in M. Ostaszewski and E. Grant and M. Benedetti, “Quantum circuit structure learning,” (2019), ArXiv 1905.09692.


1. Remark on Projectors and Expectations

In the definition of generalized controlled rotation CR(θ, P, Π)=(Π+Πe−iθP) above, a general notion of a projector is allowed. To make the preceding computations constructive, however, it is desirable to bind the projector with a unitary operator that is efficiently computed.


For example, suppose G is some easy to compute unitary gate with two eigenvalues μ1, μ2, and






G=μ
1Π12Π2


is the spectral decomposition of G (with Π1, Π2 being the projectors onto the corresponding eigenspaces).


Then







Π
=


Π
2

=


1


μ
1

-

μ
2





(



μ
1



-
G

)




;







Π


=


Π
1

=


1


μ
1

-

μ
2






(

G
-


μ
2




)

.







Under this assumption, any overlap involving projectors can be computed as a linear combination of purely unitary expectations. For example, in the above derivation








d
j



(


θ


j


,
x

)


=







V
j


Π






W
j


x



A




V
j


Π






W
j


x




=


1


μ
1

-

μ
2





(






μ
1



2







V
j



W
j


x



A




V
j



W
j


x




+






V
j



GW
j


x



A




V
j



GW
j


x




-

2











(


μ
1






V
j



W
j


x



A




V
j



GW
j


x




)










In particular, a one-qubit control on the qubit number c can be written up with Gc=I⊗ . . . ⊗Zc⊗ . . . ⊗I that has eigenvalues μ1=1, μ2=−1. Here for Π=Π2, has:








d
j



(


θ


j


,
x

)


=







V
j


Π






W
j


x



A




V
j


Π






W
j


x




=







1
4



(







V
j



W
j


x



A




V
j



W
j


x






+
j




G
c



W
j


x



A




V
j



G
c



W
j


x





-

2



(




V
j



W
j


x



A




V
j



G
c



W
j


x



)








Similarly, if one wants projectors Π, Π to implement two-level control with control qubits c1, c2, then one uses the two-qubit controlled Z gate CZc1,c2 on these qubits as the requisite unitary gate Gc1,c2.


Any number of control levels can be implemented in this fashion.


In many of the disclosed embodiments, variational circuits are comprised (and, in some cases, solely) from the single-cubit and two-qubit gates. However the above discussion explains how these designs can be readily generalized (if needed) to involve more sophisticated multi-cubits unitaries.


D. Ancilla-Free and Ancilla-Assisted Approximate Amplitude Encoding

Let χ=be [χ1, . . . , χN] some classically defined vector in custom-characterN. Assume, for simplicity, that N=2n where n is some integer. An quantum amplitude encoding of χ is a quantum state |χcustom-character such that the probability of measuring some |jcustom-character, j∈[N] in this state is χj2/|χ|2. The task of a desirable amplitude encoding given χ is the task of finding such quantum circuit Cχ that constructs a quantum amplitude encoding of χ from some non-informative “free” state, for example Cχ|0custom-character=|χζ.


It is known that for vector χ in a general position, a desirable encoder circuit Cχ will contain Ω(N) single- and two-qubit gates. Since in an interesting machine learning training loop, encoder circuits for the classical data samples will be invoked millions, if not billions of times, it makes sense to, in some embodiments, preprocess the classical samples once and associate the shortest possible amplitude encoder circuit with each data, sample. Due to the above-mentioned asymptotic lower bound in Ω(N), there is a limit on how much an encoder circuit can be compressed. Since the data in a machine learning problem is almost always inherently noisy and since the inference in such problems is almost never expected to be perfect, it makes sense to look for resource-optimal approximate quantum encoders for classical data.


For example, suppose f>>0 is the desired fidelity of an approximate encoding. If Cχ is an n-qubit exact encoder for χ, Cχ|0custom-character=|χcustom-character and if {tilde over (C)}χ is an inexact encoder than the fidelity goal can be written as






custom-character
custom-characterCχ0|{tilde over (C)}χ0custom-character>f


Assuming, again that dim χ=N=2n and both circuits C and {tilde over (C)} are n-qubit circuits, one can frame the task of approximate quantum encoding as the task of finding a variational quantum circuit {tilde over (C)} that approximates the known fixed unitary operator C on a one-sample reference set S0={[1, 0, . . . , 0]}. In this setting, the problem of finding a desirable (e.g., optimal) {tilde over (C)} is a special case of an operator approximation problem that has been solved in section IIIB.


In many cases, however, the desired approximate encoder circuit {tilde over (C)} can be made quadratically shorter if one were allowed to use clean ancillary qubits.


In some embodiments, for instance, suppose one added m clean ancillary qubits to the register and the goal now is to approximately emulate the fixed n-qubit unitary operator Cχ using a circuit {tilde over (C)}on the full register of n+m qubits. The emulation task can be defined as the task of approximating some product state |χcustom-character⊗|αcustom-character where |αcustom-character is an arbitrary m-qubit ancillary state. In case one wanted to represent the desired encoding |χcustom-character exactly, then one would have (Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m)=|0custom-character⊗n⊗|αcustom-character. Thus, the exact encoding the state (Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m) lies entirely the 2m dimensional subspace custom-characterα spanned by the states of the from |0custom-character⊗n⊗|αcustom-character. In the approximate encoding setting one wants the overlap of the (Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m) with the subspace custom-characterα to be as close to 1 as possible.


Let Πα be the orthogonal projector of the full 2n+m-dimensional state space on the sub-space custom-characterα. Let f be some fidelity threshold that is asymptotically close to 1. Then ultimately the approximate emulator circuit {tilde over (C)} at fidelity f can be defined as a one satisfying the condition





∥Πα(Cχ⊗Im)C{tilde over (C)}|0)⊗(n+m)2>f


In order to derive an embeddable unitary version of this condition consider the n-qubit reflection operator custom-character that flips the amplitude sign of the single basis state |0custom-character⊗n (naturally, custom-character is an adjoint of the (n−1)-time controlled Pauli Z). Then Πα=½(In+mcustom-character⊗Im), ∥Πα(Cχ554⊗Im){tilde over (C)}|0custom-character⊗(n+m)2≤½(1−custom-charactercustom-character(Cχ554⊗Im){tilde over (C)}|0custom-character(n+m)|(R|0custom-character⊗Im) (Cχ554 ⊗Im){tilde over (C)}|0custom-character⊗(n+m)custom-character) and the task of approximating to fidelity f can be reinterpreted as task of minimizing custom-charactercustom-character(Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m)|R|0custom-character⊗Im(Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m)custom-character so that






custom-character
custom-character(Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m)|(R|0custom-character⊗Im)(Cχ⊗Im){tilde over (C)}|0custom-character⊗(n+m)custom-character1−2f  (12)


If one can choose a trainable template for the desired {tilde over (C)} according to the ansatz (1) then (12) can be solved with the tools developed in section IIIC with the stipulation that the sample set now consists of the single “sample” |0custom-character⊗(n+m).


In practice, the ancilla count m=2 is almost always sufficient for quadratic compression of an approximate state encoder, compared to ancilla-free approximations of the same encoder.


IV. Training Algorithm

Embodiments of the disclosed technology are not dependant on learning rate scheduling and do not require asymptotically significant number of epochs to converge.


However, since embodiments of the disclosed variational circuit learning technique prove (e.g., optimize) essentially the same utility function with the same optimization landscape, the technique may not provide a different principled resolution to the problem of finding the global optimum. (The problem of global optimization over non-convex landscapes is, in general, NP hard.) Therefore, it is desirable to explore the global utility function landscape either by adhoc sampling in the parameter space or by more sophisticated strategies, such as simulated annealing or Bayesian inference.


Here, one can start with the subalgorithm that obtains an approximation of some local maximum of the utility function that is, in some sense, close to a given starting point in the parameter space. The pseudo-code for the algorithm is shown in FIG. 6. In particular, FIG. 6 shows a subalgorithm for coordinate ascent from an initial parameter setting.


The argmaxσj(custom-characterS(σ)) is computed using mathematics developed in section IIIC. In FIG. 7, this computation is in the form of pseudo-code. In particular, FIG. 7 at 700 shows pseudo-code for a subalgorithm for maximizing along an individual parameter.


V. Algorithm Complexity

In order to compare the coordinate ascent algorithm to other algorithms, one can measure performance in terms of quantum overlap values computed. Given a measurable observable A and some small tolerance value δ>0 the computation unit that is referred to as a quantum overlap unit is the task of computing ether custom-charactercustom-characterχ|A|ycustom-character or custom-charactercustom-characterχ|A|ycustom-character, where quantum states χ and y can be prepared at some constant cost cprep. (The preparation cost will be roughly the same for all the data samples involved in estimating the quantum utility function custom-character(θ).)


Given the circuits Cχ, Cy to prepare quantum encodings of the two data samples, |χcustom-character=Cχ|0custom-character, |ycustom-character=|0custom-character, then either custom-character or custom-character of the overlap can be estimated by estimating custom-character0|CχACy|0custom-character to required precision a using one ancillary quint and a version of Hadamard test. In this context, the cost of an instance of the Hadamard test is fixed and it is desirable to use O(1/δ2) instances of the test to estimate either the real or imaginary part of the overlap.


In some embodiments, for a selected parameter index j∈[0. . . (L−1)], the corresponding coefficients are Bj, Cj, Dj, Ej, Fj that inform equations (9). And (10) are aggregated over the entire sample set S1 and thus the overall cost of generating these coefficients is in O(custom-character2). It is noted that the values of the coefficients Bj, Cj, Dj, Ej, Fj can be collected independently given a sufficient width of the quantum register. Further parallelization is possible by computing the constituent overlaps simultaneously. (For example custom-charactercustom-characterVjWjχ|A|VjWjχcustom-charactercustom-charactercustom-characterVjGWjχ|A|VjGWjχcustom-character and custom-character1custom-characterVjWjχ|A|VjGWjχcustom-character that inform the coefficient dj can be computed simultaneously.) Possible shortage of qubits for complete parallelization affects only the constant of the complexity term O(|custom-character|/δ2), but not the shape of this term.


In a typical scenario, each of the trainable parameters is visited at least once. The cost of one complete iteration over the parameter set is thus in O(L|custom-character|/δ2). Maximation with respect to several parameters is strongly related to commutation relations between the constituent quantum gates.


Consider the task of estimating a local optimum of the utility function to a precision δ by coordinate ascent starting at some initial guess θ[0]. This task will be referred to as a sprite(θ[0], δ). It is currently understood that for a θ[0] in general position the sprite(θ[0], δ) requires an iteration count limit maxIter in O(log(1/δ)). The numerical simulations corroborate this understanding. With this understanding, the overall cost of exploring one local maximum of the utility is in O(L|custom-character|log(1/δ)/δ2) when measured as a total count of the required number of the instances of Hadamard test.


It is notable that the sequence of improvements of the utility function under coordinate ascent is almost strictly monotonic. Ideally, if all the quantum gates and measurement are completely precise and if all the required state overlaps are computed with infinite precision, then the utility function can never decrease upon a coordinate update. In practice due to accumulated imprecision, the utility function can occasionally experience small regressions by some amount in O(δ). In practice such regressions are observed infrequently.


Embodiments of the disclosed technology present one or more advantages over other techniques. For example:


First, in other approaches, convergence can be sensitive to the choice of learning rate. Poor choices of learning rates or learning schedules can lead to a non-converging process. But, given that when a convergence is established, the precision of the achieved proxy to a local minimum depends strongly on the learning rate strategy. Therefore, to achieve a sufficient precision one typically needs to perform sweeps and model selection over significant (often, rather large) numbers of candidate learning rate strategies.


Second, some other approaches suffer from a pathology known as a “vanishing gradient”. This happens at parameter configurations where the cost function forms saddle points or “barren plateaus’. There are often no succinct criteria to distinguish true local minima from temporary gridlocks caused by vanishing gradients. This may lead to practical obstacles for reaching global minimum in otherwise common scenarios. Coordinate methods are much less susceptible to problems of this kind.


VI. Numerical Experiments
A. Further Example Implementations
i. Approximate State Preparation

Suppose the dimensionality of feature vectors that represent classical data samples is N˜2n. The information-theoretical lower bound for the number of parameters required for preparing a faithful amplitude encoding of a random N-dimensional vector is N. However, meaningful data vectors seldom have maximum entropy. It should be understood that the number of parameterized quantum gates required for preparing a high-fidelity encoding of a classical vector scales with O(entropy*log(N)) assuming constant number of available ancillary quoits.


A motivation for this understanding is given by the following:


Proposition 2. Let n be the desired qubit count. Given a k-sparse vector in custom-character2n (e.g., a real-valued vector with k non-zero elements), an n-qubit quantum amplitude encoding of this vector can be prepared by a quantum circuit with O(k n) single and two-qubit quantum gates using a quantum register with at most (n+2) (i.e., assuming at most two additional ancillary qubits).


Proof. Recall that a two-level RY rotation custom-character(θ) rotates the span(|jcustom-character, |custom-charactercustom-character) as follows: |jcustom-charactercustom-charactercos(θ/2)|jcustom-character+sin(θ/2)|custom-character; |custom-charactercustom-charactercustom-character−sin(θ/2)|j+cos(θ/2)|custom-character). It leaves the orthogonal complement of the span(|jcustom-character, |custom-character) stationary.


It is obvious that a quantum encoding of a k-sparse vector can be prepared starting from |0custom-charactercustom-character0| by consecutive use of at most k two-level RY rotations.


It is now desirable to estimate the cost of the custom-character(θ) for an angle θ in general position. Because an asymptotic argument is being made, one can take n>5 in order to use a lemma from A. Barenco and et al., Phys. Rev. A 52, 3457 (1995). Since RY (θ)=S H RZ(θ) H S, the cost of custom-character(θ) is asymptotically the same as that of custom-character(θ). The latter is however an (n−1) times multiplexed single-qubit diagonal unitary RZ(θ). It is well known that with one clean ancillary qubit the latter can be emulated with two single qubit RZ rotations and three n-times multiplexed X gates using an (n+1)-qubit quantum register. With one additional ancillary qubit each of these ((n+2)−2) times multiplexed X gates can be emulated using O(n) 3-qubit Toffoli gates. Since a 3-qubit Toffoli gate has an exact representation of constant depth and size, the understanding as described above follows.


While it can be shown that Θ(k n) is asymptotically optimal gate cost of quantum encoding for k-sparse vectors, a question of practical importance for quantum machine learning is developing a methods for the best effective approximate state preparation. The goal here can be described as that of finding efficiently computable constant cprep such that for small positive δ>0 a δ-approximation of the desired encoding of a k-sparse vector can be prepared using a a circuit with at most cprepk n log2(1/δ) single and two-qubit rotation gates.


One can do this using methods developed in section IIID.


VII. Example Embodiments


FIG. 8 is a flow chart 800 illustrating a method in accordance with the disclosed technology. The particular operations and sequence of operations should not be construed as limiting, as they can be performed alone or in any combination, subcombination, and/or sequence with one another. Additionally, the illustrated operations can be performed together with one or more other operations.


In FIG. 8, a circuit classifier is trained based on variational quantum circuits. In the illustrated embodiment, and at 810, a set of labeled data is received (e.g., by a classical computer); at 812, a coordinate-wise ascent is performed to learn the circuit classifier for the labeled data. In some examples, the coordinate-wise ascent is performed on a classical computing device which thereby trains the circuit classifier. At 814, the trained circuit classifier is executed on a quantum computer. In some implementations, the circuit classifier has a structure with variational parameters. The circuit classifier can comprise a plurality of single-qubit and/or two-qubit gates that have variational parameters defining unitary action of the circuit on quantum states. In some examples, the training further comprises modifying all but one of the variational parameters. In further examples, the training comprises maximizing a utility function by selection of one or more variational parameters. The utility function can, for example, apply a non-degenerate observable that has exactly two different eigenvalues. In some examples, the variational parameters are fixed one by one, according to a predetermined schedule that visits each parameters at least once. In other examples, the variational parameters are fixed one by one, according to a randomized schedule that visits each parameters at least once. In some examples, the training comprises splitting the training data into smaller batches that are used by the utility function to update the variational quantum circuits.



FIG. 9 is a flow chart 900 illustrating a further method in accordance with the disclosed technology. The particular operations and sequence of operations should not be construed as limiting, as they can be performed alone or in any combination, subcombination, and/or sequence with one another. Additionally, the illustrated operations can be performed together with one or more other operations.


In FIG. 9, and at 910, by a classical computer, a batch of training samples, a variational quantum circuit skeleton for learning one or more variational parameters, and a set of initial values for the variational parameters are received. At 912, and by the classical computer, a classical description of a quantum program is generated to be implemented by a quantum circuit. At 914, and by the classical computer, the quantum circuit described by the quantum program is trained using the batch of training samples and incrementally adjusting the variational parameters to improve prediction of a set of test data. At 916, the trained quantum circuit described by the quantum program is implemented on a quantum computing device.


In some examples, the method further comprises receiving one or more of parameter tolerance bounds, and/or a bound on a maximum number of iterations to be performed during the training. In some implementations, the training is performed iteratively by computing analytic expressions for expectation values of the training data to increase a probability of correct identification of training labels. In some implementations, the expectation value is inferred by computing overlaps between quantum states. For example, the overlap computation can be performed by a Hadamard test to infer the real and imaginary components of the overlap. In further examples, the training sample is given by a qubit encoding or an amplitude encoding in which data is represented as amplitudes or phases of a state vector of qubits of the quantum circuit.



FIG. 10 is a flow chart 1000 illustrating a further method in accordance with the disclosed technology. The particular operations and sequence of operations should not be construed as limiting, they can be performed alone or in any combination, subcombination, and/or sequence with one another. Additionally, the illustrated operations can be performed together with one or more other operations.


The method of FIG. 10 can be performed, for example, by a system comprising a quantum computing device and a classical computing device in communication with the quantum computing device. In the illustrated method, and at 1010, a trained quantum circuit is applied to a representation of input data. At 1012, the quantum state is measured. At 1014, a sampled bit for inferring the class label is generated.


In certain implementations, the representation of the input data is given by an amplitude encoding of the data or a qubit encoding of the data. In further implementations, the classical computing device is programmed to train the quantum computer to predict a class label using a pre-trained classifier circuit. In further implementations, the coordinate ascent procedure uses hyperparameters. In some implementations, the set of hyperparameters includes one or more of: (a) a depth of the quantum circuit that is being trained: (b) a size of a mini-batch in training the quantum circuit; (c) a maximum number of iterations used for training; (d) number of random restarts that are applied un the training. In certain implementations, a program run on a classical computer is used for sweeping through feasible values of hyperparameters and and post-selecting quantum circuit(s) with the optimal hyperparameter choices.


VIII. Concluding Remarks

Having described and illustrated the principles of the disclosed technology with reference to the illustrated embodiments, it will be recognized that the illustrated embodiments can be modified in arrangement and detail without departing from such principles. For instance, elements of the illustrated embodiments shown in software may be implemented hardware and vice-versa. Also, the technologies from any example can be combined with the technologies described in any one or more of the other examples. For example, alternative embodiments can use a stochastic gradient descent approach that converges to a local minima. It will be appreciated that procedures and functions such as those described with reference to the illustrated examples can be implemented in a single hardware or software module, or separate modules can be provided. The particular arrangements above are provided for convenient illustration, and other arrangements can be used.

Claims
  • 1. A method comprising: training a circuit classifier based on variational quantum circuits, wherein the training comprises receiving a set of labeled data and performing a coordinate-wise ascent to learn the circuit classifier for the labeled data, wherein the coordinate-wise ascent is performed on a classical computing device and thereby trains the circuit classifier; andexecuting the trained circuit classifier on a quantum computer.
  • 2. The method of claim 1, wherein the circuit classifier has a structure with variational parameters.
  • 3. The method of claim 2, wherein the circuit classifier comprises a plurality of single-qubit and/or two-qubit gates that have variational parameters defining unitary action of the circuit on quantum states.
  • 4. The method of claim 2, further comprising modifying all but one of the variational parameters.
  • 5. The method of claim 2, maximizing utility function by selection of one or more variational parameters.
  • 6. The method of claim 5, wherein the utility function applies a non-degenerate observable that has exactly two different eigenvalues.
  • 7. The method of claim 2, wherein the variational parameters are fixed one by one, according to a predetermined schedule that visits each parameters at least once.
  • 8. The method of claim 2, wherein the variational parameters are fixed one by one, according to a randomized schedule that visits each parameters at least once.
  • 9. The method of claim 2, wherein the training comprises splitting the training data into smaller batches that are used by the utility function to update the variational quantum circuits.
  • 10. A computer-implemented method, comprising: receiving a plurality of training samples, a variational quantum circuit skeleton for learning one or more variational parameters, and a set of initial values for the variational parameters;by a classical computer, generating a classical description of a quantum program to be implemented by a quantum circuit;by the classical computer, training the quantum circuit described by the quantum program using the plurality of training samples and incrementally adjusting the variational parameters to improve prediction of a set of test data; andimplementing the trained quantum circuit described by the quantum program on a quantum computing device.
  • 11. The computer-implemented method of claim 10, wherein the receiving further comprises receiving one or more of parameter tolerance bounds, and/or a bound on a maximum number of iterations to be performed during the training.
  • 12. The computer-implemented method of claim 10, wherein the training is performed iteratively by computing analytic expressions for expectation values of the training data to increase a probability of correct identification of training labels.
  • 13. The computer-implemented method of claim 12, wherein the expectation value is inferred by computing overlaps between quantum states.
  • 14. The computer-implemented method of claim 13, wherein the overlap computation is performed by the Hadamard test to infer the real and imaginary components of the overlap.
  • 15. The computer-implemented method of claim 14, wherein the training sample is given by a qubit encoding or an amplitude encoding in which data is represented as amplitudes or phases of a state vector of qubits of the quantum circuit.
  • 16. A system, comprising: a quantum computing device; anda classical computing device in communication with the quantum computing device, the classical computing device being programmed to predict a class label using a quantum computer that applies a trained quantum circuit to a representation of the input data, measures the quantum state, and generates a sampled bit for inferring the class label.
  • 17. The system of claim 16, wherein the representation of the input data is given by an amplitude encoding of the data or a qubit encoding of the data.
  • 18. The system of claim 16, wherein the classical computing device is programmed to train the quantum computer to predict class label using pre-trained classifier circuit.
  • 19. The system of claim 18, wherein the coordinate ascent procedure uses hyperparameters.
  • 20. The system of claim 19, wherein the set of hyperparameters includes one or more of: (a) a depth of the quantum circuit that is being trained; (b) a size of a mini-batch in training the quantum circuit; (c) a maximum number of iterations used for training; (d) a number of random restarts that are applied in the training.