PERFORMING QUANTUM ERROR MITIGATION AT RUNTIME USING TRAINED MACHINE LEARNING MODEL

A method, system, and computer program product for runtime quantum error mitigation. Training data, which includes noisy expectation values and target expectation values (noiseless expectation values), is generated. A machine learning model is then trained using the training data to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. That is, such a machine learning model is trained to generate target expectation values based on inputted noisy expectation values. Upon executing a quantum circuit on a quantum computer creating quantum results, quantum error mitigation is performed on the quantum results at runtime using the trained machine learning model. In this manner, there are significant savings in quantum execution time while improving the accuracy of the results in performing quantum error mitigation on quantum results at runtime without additional mitigation circuits.

TECHNICAL FIELD

The present disclosure relates generally to quantum error mitigation techniques, and more particularly to performing quantum error mitigation at runtime using a trained machine learning model.

BACKGROUND

Quantum computing is a rapidly-emerging technology that harnesses the laws of quantum mechanics to solve problems too complex for classical computers. A quantum computer is a computer that exploits quantum mechanical phenomena. At small scales, physical matter exhibits properties of both particles and waves, and quantum computing leverages this behavior, specifically quantum superposition and entanglement, using specialized hardware that supports the preparation and manipulation of quantum states. Classical physics cannot explain the operation of these quantum devices, and a scalable quantum computer could perform some calculations exponentially faster than any modern “classical” computer.

Current quantum hardware, however, is subject to different sources of noise, the most well-known being qubit decoherence, individual gate errors, and measurement errors. These errors limit the depth of the quantum circuit (i.e., the number of “layers” of quantum gates, executed in parallel, it takes to complete the computation defined by the quantum circuit) that can be implemented. However, even for shallow circuits, noise can lead to faulty estimates. Fortunately, quantum error mitigation provides a collection of tools and methods that allow one to evaluate accurate expectation values (probabilistic expected values of the quantum circuit) from noisy, shallow depth quantum circuits, even before the introduction of fault tolerance.

Quantum error mitigation refers to a series of techniques aimed at reducing (mitigating) the errors that occur in quantum computing algorithms. Such techniques involve running additional mitigation circuits or modified target circuits (target circuit is the quantum circuit executed on the quantum computer creating the quantum results). As a result, the use of quantum error mitigation techniques generally results in longer execution times or requires access to additional qubits for increased accuracy. That is, such quantum error mitigation methods trade additional execution time for increased accuracy.

An example of a quantum error mitigation technique is probabilistic error cancellation where the noise of the target circuit is learned layer by layer and then cancelled in a probabilistic manner with an exponential overhead to control the subsequent spread in the variance of expectation values.

Another example of a quantum error mitigation technique that involves running additional mitigation circuits is zero noise extrapolation. Zero noise extrapolation is an error mitigation technique used to extrapolate the noiseless expectation value (probabilistic expected value of the quantum circuit with zero noise) of an observable from a range of expectation values computed at different noise levels. For example, the noiseless expectation value (also referred to as the “zero-noise” value) is extrapolated by fitting a function (referred to as an “extrapolation function”) to the expectation values of the mitigation circuits measured at different noise levels, where the noise has been tuned by noise factors (indicates the “noisiness” of the quantum circuit, such as difference noise levels) achieved by inserting additional digital quantum gates.

Unfortunately, such techniques involve considerable overhead while increasing the execution time at runtime.

SUMMARY

In one embodiment of the present disclosure, a method for runtime quantum error mitigation comprises generating training data. The method further comprises training a machine learning model using the generated training data to perform quantum error mitigation. The method additionally comprises executing a quantum circuit on a quantum computer creating quantum results. Furthermore, the method comprises performing quantum error mitigation on the quantum results at runtime using the trained quantum machine learning model.

Additionally, in one embodiment of the present disclosure, the method further comprises generating noisy expectation values for the training data by sampling parameters of parameterized circuits with a fixed structure.

Furthermore, in one embodiment of the present disclosure, the parameterized circuits are ansatz circuits.

Additionally, in one embodiment of the present disclosure, the noisy expectation values of the training data are generated by sampling parameters of parameterized circuits using parameterized Hamiltonian time evolution.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises implementing dynamic decoupling and/or twirling in a quantum circuit that generates the noisy expectation values.

Additionally, in one embodiment of the present disclosure, the method further comprises encoding features of the quantum circuit on a noisy quantum device.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises generating target expectation values using the noisy expectation values and the encoded features, where the training data comprises the target expectation values generated using a noiseless simulator or an error mitigated quantum processing unit.

Additionally, in one embodiment of the present disclosure, the machine learning model is selected from the group consisting of a graph neural network model, a multilayer perceptron model, a random forest model, and an ordinary least squares model.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises performing an optimization of the machine learning model using a loss function.

Other forms of the embodiments of the method described above are in a system and in a computer program product.

Accordingly, embodiments of the present disclosure train a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime.

The foregoing has outlined rather generally the features and technical advantages of one or more embodiments of the present disclosure in order that the detailed description of the present disclosure that follows may be better understood. Additional features and advantages of the present disclosure will be described hereinafter which may form the subject of the claims of the present disclosure.

DETAILED DESCRIPTION

In one embodiment of the present disclosure, a method for runtime quantum error mitigation comprises generating training data. The method further comprises training a machine learning model using the generated training data to perform quantum error mitigation. The method additionally comprises executing a quantum circuit on a quantum computer creating quantum results. Furthermore, the method comprises performing quantum error mitigation on the quantum results at runtime using the trained quantum machine learning model.

In this manner, a machine learning model is trained to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime.

Additionally, in one embodiment of the present disclosure, the method further comprises generating noisy expectation values for the training data by sampling parameters of parameterized circuits with a fixed structure.

In this manner, contextual and learnable training data is generated, which includes noisy expectation values for the training data.

Furthermore, in one embodiment of the present disclosure, the parameterized circuits are ansatz circuits.

In this manner, sampling of the parameters of the parameterized circuits can occur for ansatz circuits.

Additionally, in one embodiment of the present disclosure, the noisy expectation values of the training data are generated by sampling parameters of parameterized circuits using parameterized Hamiltonian time evolution.

In this manner, sampling of the parameters of the parameterized circuits is performed using parameterized Hamiltonian time evolution, such as Trotterized spin dynamics.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises implementing dynamic decoupling and/or twirling in a quantum circuit that generates the noisy expectation values.

In this manner, the decoherence (coherent error) in noisy expectation values is suppressed, such as by implementing dynamic decoupling and/or twirling in a quantum circuit that generates the noisy expectation values, in order to make the device noise more easily learned.

Additionally, in one embodiment of the present disclosure, the method further comprises encoding features of the quantum circuit on a noisy quantum device.

In this manner, information about the noisy quantum device can be encoded.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises generating target expectation values using the noisy expectation values and the encoded features, where the training data comprises the target expectation values generated using a noiseless simulator or an error mitigated quantum processing unit.

In this manner, accurate expectation values can be generated and used for training the machine learning model to perform quantum error mitigation on quantum results at runtime.

Additionally, in one embodiment of the present disclosure, the machine learning model is selected from the group consisting of a graph neural network model, a multilayer perceptron model, a random forest model, and an ordinary least squares model.

In this manner, an application-specific statistical model may be selected to be trained.

Furthermore, in one embodiment of the present disclosure, the method additionally comprises performing an optimization of the machine learning model using a loss function.

In this manner, the performance of the machine learning model is improved.

Other forms of the embodiments of the method described above are in a system and in a computer program product.

As stated above, current quantum hardware, however, is subject to different sources of noise, the most well-known being qubit decoherence, individual gate errors, and measurement errors. These errors limit the depth of the quantum circuit (i.e., the number of “layers” of quantum gates, executed in parallel, it takes to complete the computation defined by the quantum circuit) that can be implemented. However, even for shallow circuits, noise can lead to faulty estimates. Fortunately, quantum error mitigation provides a collection of tools and methods that allow one to evaluate accurate expectation values (probabilistic expected values of the quantum circuit) from noisy, shallow depth quantum circuits, even before the introduction of fault tolerance.

Quantum error mitigation refers to a series of techniques aimed at reducing (mitigating) the errors that occur in quantum computing algorithms. Such techniques involve running additional mitigation circuits or modified target circuits (target circuit is the quantum circuit executed on the quantum computer creating the quantum results). As a result, the use of quantum error mitigation techniques generally results in longer execution times or requires access to additional qubits for increased accuracy. That is, such quantum error mitigation methods trade additional execution time for increased accuracy.

An example of a quantum error mitigation technique is probabilistic error cancellation where the noise of the target circuit is learned layer by layer and then cancelled in a probabilistic manner with an exponential overhead to control the subsequent spread in the variance of expectation values.

Another example of a quantum error mitigation technique that involves running additional mitigation circuits is zero noise extrapolation. Zero noise extrapolation is an error mitigation technique used to extrapolate the noiseless expectation value (probabilistic expected value of the quantum circuit with zero noise) of an observable from a range of expectation values computed at different noise levels. For example, the noiseless expectation value (also referred to as the “zero-noise” value) is extrapolated by fitting a function (referred to as an “extrapolation function”) to the expectation values of the mitigation circuits measured at different noise levels, where the noise has been tuned by noise factors (indicates the “noisiness” of the quantum circuit, such as difference noise levels) achieved by inserting additional digital quantum gates.

Unfortunately, such techniques involve considerable overhead while increasing the execution time at runtime.

The embodiments of the present disclosure provide the means for performing quantum error mitigation with less overhead without increasing the execution time at runtime. In one embodiment, a machine learning model is trained to perform quantum error mitigation to output mitigated expectation values from noisy expectation values. In one embodiment, the machine learning model is trained using noisy expectation values and corresponding target expectation values (noiseless expectation values). In one embodiment, noisy expectation values are generated by sampling parameters of parameterized circuits, such as quantum circuits that are structurally similar to the target quantum circuits (quantum circuits whose quantum results are to be subject to quantum error mitigation). In one embodiment, the decoherence (coherent error) in such noisy expectation values may be suppressed, such as by implementing dynamic decoupling and/or twirling in the quantum circuit that generates the noisy expectation values, in order to make the device noise more easily learned. Furthermore, in one embodiment, features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded. In one embodiment, such features encoded using vectorization. In another embodiment, a graph representing the quantum circuit used in generating the noisy expectation values is generated. Information about the quantum circuit is then encoded as features using the graph. The target expectation values for the training data are then generated, such as by using a noiseless simulator or an error mitigated quantum processing unit, the noisy expectation values, and the encoded features. Such training data (includes both the noisy expectation values and the target expectation values) may then be used to train a machine learning model to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. After training the machine learning model to perform quantum error mitigation, the machine learning model may then be used to perform quantum error mitigation (output mitigated expectation values from noisy expectation values) on quantum results, which includes noisy expectation values, created by executing a quantum circuit on a quantum computer at runtime. By performing quantum error mitigation in such a manner, there are significant savings in quantum execution time while improving the accuracy of the results in performing quantum error mitigation on quantum results at runtime without additional mitigation circuits. These and other features will be discussed in further detail below.

In some embodiments of the present disclosure, the present disclosure comprises a method, system, and computer program product for runtime quantum error mitigation. In one embodiment of the present disclosure, training data, which includes noisy expectation values and target expectation values (noiseless expectation values), is generated. A machine learning model is then trained using the training data to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. That is, such a machine learning model is trained to generate target expectation values based on inputted noisy expectation values. In one embodiment, such machine learning models can include, but are not limited to, a graph neural network model, a multilayer perceptron model, a random forest model, an ordinary least squares model, etc. Upon executing a quantum circuit on a quantum computer creating quantum results, quantum error mitigation is performed on the quantum results at runtime using the trained machine learning model. In this manner, there are significant savings in quantum execution time while improving the accuracy of the results in performing quantum error mitigation on quantum results at runtime without additional mitigation circuits.

In the following description, numerous specific details are set forth to provide a thorough understanding of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure may be practiced without such specific details. In other instances, well-known circuits have been shown in block diagram form in order not to obscure the present disclosure in unnecessary detail. For the most part, details considering timing considerations and the like have been omitted inasmuch as such details are not necessary to obtain a complete understanding of the present disclosure and are within the skills of persons of ordinary skill in the relevant art.

Referring now to the Figures in detail,FIG.1illustrates an embodiment of the present disclosure of a communication system100for practicing the principles of the present disclosure. Communication system100includes a quantum computer101configured to perform quantum computations, such as the types of computations that harness the collective properties of quantum states, such as superposition, interference, and entanglement, as well as a classical computer102in which information is stored in bits that are represented logically by either a 0 (off) or a 1 (on). Examples of classical computer102include, but not limited to, a portable computing unit, a Personal Digital Assistant (PDA), a laptop computer, a mobile device, a tablet personal computer, a smartphone, a mobile phone, a navigation device, a gaming unit, a desktop computer system, a workstation, and the like configured with the capability of connecting to network113(discussed below).

In one embodiment, classical computer102is used to set up the state of quantum bits in quantum computer101and then quantum computer101starts the quantum process. Furthermore, in one embodiment, classical computer102is configured to train a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime as discussed further below.

In one embodiment, a hardware structure103of quantum computer101includes a quantum data plane104, a control and measurement plane105, a control processor plane106, a quantum controller107, and a quantum processor108. While depicted as being located on a single machine, quantum data plane104, control and measurement plane105, and control processor plane106may be distributed across multiple computing machines, such as in a cloud computing architecture, and communicate with quantum controller107, which may be located in close proximity to quantum processor108.

Quantum data plane104includes the physical qubits or quantum bits (basic unit of quantum information in which a qubit is a two-state (or two-level) quantum-mechanical system) and the structures needed to hold them in place. In one embodiment, quantum data plane104contains any support circuitry needed to measure the qubits' state and perform gate operations on the physical qubits for a gate-based system or control the Hamiltonian for an analog computer. In one embodiment, control signals routed to the selected qubit(s) set a state of the Hamiltonian. For gate-based systems, since some qubit operations require two qubits, quantum data plane104provides a programmable “wiring” network that enables two or more qubits to interact.

Control and measurement plane105converts the digital signals of quantum controller107, which indicates what quantum operations are to be performed, to the analog control signals needed to perform the operations on the qubits in quantum data plane104. In one embodiment, control and measurement plane105converts the analog output of the measurements of qubits in quantum data plane104to classical binary data that quantum controller107can handle.

Control processor plane106identifies and triggers the sequence of quantum gate operations and measurements (which are subsequently carried out by control and measurement plane105on quantum data plane104). These sequences execute the program, provided by quantum processor108, for implementing a quantum algorithm.

In one embodiment, control processor plane106runs the quantum error correction algorithm (if quantum computer101is error corrected).

In one embodiment, quantum processor108uses qubits to perform computational tasks. In the particular realms where quantum mechanics operate, particles of matter can exist in multiple states, such as an “on” state, an “off” state, and both “on” and “off” states simultaneously. Quantum processor108harnesses these quantum states of matter to output signals that are usable in data computing.

In one embodiment, quantum processor108performs algorithms which conventional processors are incapable of performing efficiently.

In one embodiment, quantum processor108includes one or more quantum circuits109. Quantum circuits109may collectively or individually be referred to as quantum circuits109or quantum circuit109, respectively. A “quantum circuit109,” as used herein, refers to a model for quantum computation in which a computation is a sequence of quantum logic gates, measurements, initializations of qubits to known values and possibly other actions. A “quantum logic gate,” as used herein, is a reversible unitary transformation on at least one qubit. Quantum logic gates, in contrast to classical logic gates, are all reversible. Examples of quantum logic gates include RX (performs eiθX/2, which corresponds to a rotation of the qubit state around the X-axis by the given angle theta θ on the Bloch sphere), RY (performs eiθY/2, which corresponds to a rotation of the qubit state around the Y-axis by the given angle theta θ on the Bloch sphere), RXX (performs the operation e(−iθX⊗X/2)on the input qubit), RZZ (takes in one input, an angle theta θ expressed in radians, and it acts on two qubits), etc. In one embodiment, quantum circuits109are written such that the horizontal axis is time, starting at the left-hand side and ending at the right-hand side.

Furthermore, in one embodiment, quantum circuit109corresponds to a command structure provided to control processor plane106on how to operate control and measurement plane105to run the algorithm on quantum data plane104/quantum processor108.

Furthermore, quantum computer101includes memory110, which may correspond to quantum memory. In one embodiment, memory110is a set of quantum bits that store quantum states for later retrieval. The state stored in quantum memory110can retain quantum superposition.

In one embodiment, memory110stores an application111that may be configured to implement one or more of the methods described herein in accordance with one or more embodiments. For example, application111may implement a program for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime as discussed further below in connection withFIGS.2-5and7-8. Examples of memory110include light quantum memory, solid quantum memory, gradient echo memory, electromagnetically induced transparency, etc.

Furthermore, in one embodiment, classical computer102includes a “transpiler112,” which as used herein, is configured to rewrite an abstract quantum circuit109into a functionally equivalent one that matches the constraints and characteristics of a specific target quantum device. In one embodiment, transpiler112(e.g., qiskit.transpiler, where Qiskit® is an open-source software development kit for working with quantum computers at the level of circuits, pulses, and algorithms) converts the trained machine learning model upon execution on quantum hardware103to its elementary instructions and maps it to physical qubits.

In one embodiment, quantum machine learning models are based on variational quantum circuits109. Such models consist of data encoding, processing parameterized with trainable parameters, and measurement/post-processing.

In one embodiment, the number of qubits (basic unit of quantum information in which a qubit is a two-state (or two-level) quantum-mechanical system) is determined by the number of features in the data. This processing stage may include multiple layers of parameterized gates. As a result, in one embodiment, the number of trainable parameters is (number of features)*(number of layers).

Furthermore, as shown inFIG.1, classical computer102, which is used to set up the state of quantum bits in quantum computer101, may be connected to quantum computer101via a network113.

Network113may be, for example, a quantum network, a local area network, a wide area network, a wireless wide area network, a circuit-switched telephone network, a Global System for Mobile Communications (GSM) network, a Wireless Application Protocol (WAP) network, a WiFi network, an IEEE 802.11 standards network, a cellular network and various combinations thereof, etc. Other networks, whose descriptions are omitted here for brevity, may also be used in conjunction with system100ofFIG.1without departing from the scope of the present disclosure.

Furthermore, classical computer102is configured to train a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime as discussed further below in connection withFIGS.2-5and7-8. A description of the software components of classical computer102is provided below in connection withFIG.2and a description of the hardware configuration of classical computer102is provided further below in connection withFIG.6.

System100is not to be limited in scope to any one particular network architecture. System100may include any number of quantum computers101, classical computers102, and networks113.

A discussion regarding the software components used by classical computer102for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime is provided below in connection withFIG.2.

FIG.2is a diagram of the software components of classical system102(FIG.1) for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime in accordance with an embodiment of the present disclosure.

Referring toFIG.2, in conjunction withFIG.1, classical computer102includes a learning estimator201configured to generate noisy expectation values for the training data to train the machine learning model to perform quantum error mitigation on quantum results at runtime. In one embodiment, learning estimator201generates such noisy expectation values by sampling parameters of parameterized quantum circuits with a fixed structure. In one embodiment, such parameterized quantum circuits correspond to quantum circuits that are structurally similar to the target quantum circuit. A target quantum circuit, as used herein, refers to the quantum circuit whose quantum results are to be subject to quantum error mitigation.

In one embodiment, learning estimator201generates noisy expectation values by sampling parameters of parameterized quantum circuits with a fixed structure using various software tools, which may include, but are not limited to, Cirq®, Qulacs®, QuCAT, Qiskit®, etc.

In one embodiment, such parameterized circuits are ansatz circuits. An ansatz circuit, as used herein, refers to a circuit with a predetermined circuit geometry and parametrized gates expressing a time-evolution unitary operator. In one embodiment, training such a circuit involves learning the gate parameters through a gradient-descent algorithm where the gradients themselves can be efficiently estimated by the quantum circuit.

For example, using an ansatz circuit, hardware-efficient entangling ansatz may be performed to sample the parameters of parameterized circuits as illustrated inFIG.3.

FIG.3illustrates an example of hardware-efficient entangling ansatz300in accordance with an embodiment of the present disclosure.

As shown inFIG.3, hardware-efficient entangling ansatz300consists of a sequence of single qubit rotation gates301and “entangling” 2-qubit gates302A-302D. Entangling 2-qubit gates302A-302D may collectively or individually be referred to as entangling 2-qubit gates302or entangling 2-qubit gate302, respectively. As further illustrated inFIG.3, each qubit gate301has an angle, θ, as a parameter. It is noted thatFIG.3is not to be limited in scope to the depicted number of single qubit rotation gates301and “entangling” 2-qubit gates302.

Returning toFIG.2, in conjunction withFIGS.1and3, in one embodiment, the noisy expectation values of the training data are generated by sampling parameters of parameterized circuits using Hamiltonian time evolution, such as Trotterized spin dynamics. In one embodiment, Hamiltonians are hermitian operators that are a sum of a large number of individual Hamiltonians Hj. For example, a Hamiltonian H can be equal to H1+H2. This sum of 2 Hamiltonians can be described by the Lie product formula: e−i(H1+H2)t=Iim N→∞(e−iH1t/Ne−iH2t/N)N. Since the limit of this formula is infinite, the series is truncated when implementing this formula on a quantum computer. The truncation introduces error in the simulation that can be bounded by a maximum simulation error ϵ such that ∥e−tHt−U∥≤ϵ. This truncation is known as Trotterization. The Trotterization formula is then e−iHt=(e−iH0t/r*e−iH1t/r . . . ⋅ϵ−tHd-1t/r)r+0 (some polynomial factors). Hence, Trotterization can be exploited to mitigate the Trotter error (error in Trotterization) in digital quantum simulation. In one embodiment, Trotterization is exploited to mitigate the Trotter error in digital quantum simulation via spin dynamics (Trotterized spin dynamics), such as spin dynamics of the transverse-field Ising model as illustrated inFIG.4.

FIG.4illustrates the Trotterized spin dynamics in accordance with an embodiment of the present disclosure. As shown inFIG.4,FIG.4illustrates a quantum circuit400for a 6-spin chain of the single Trotter step. A simulation via a product formula proceeds by dividing the total evolution time into a finite number of steps and performing an approximate simulation of exp(−iHt/r)r times. Each simulation of exp(−iHt/r) is called a Trotter step.

Furthermore, in one embodiment, learning estimator201is configured to make such noise (noisy expectation values) more easily learned, such as by implementing dynamic decoupling and/or twirling in the quantum circuit that generates the noisy expectation values. By performing such dynamic decoupling and/or twirling, the effect of the coherent error is reduced. The result of such a procedure is to make the noise model easier to learn by the machine learning model thereby requiring fewer training circuits and enabling generalization of mitigation capabilities from the training set to the more general classes of circuits.

Dynamic decoupling, as used herein, is an open-loop quantum control technique to exploit fast time-dependent controlled modulation to suppress decoherence. In one embodiment, dynamic decoupling is implemented by a periodic sequence of instantaneous control pulses, the net effect of which is to nearly average to zero undesired system-environment coupling. In one embodiment, learning estimator201utilizes various schemes (e.g., Carr-Purcell, Carr-Purcell-Meiboom-Gill) for designing dynamic decoupling protocols with realistic marginal intensity controlled pulses, achieving high-order error suppression, and achieving compatibility between dynamic decoupling and quantum gates thereby extending the coherence time of the qubits.

Twirling, as used herein, is a technique used for converting arbitrary noise channels into Pauli channels in error threshold estimations of quantum error correction codes. That is, twirling is a technique that “twirls” out the irregularity of an arbitrary error channel, turning it into a Pauli error channel.

In one embodiment, learning estimator201uses various software tools for implementing dynamic decoupling and/or twirling in the quantum circuit that generates the noisy expectation values which can include, but are not limited to, ADAPT, VAQEM, Qiskit®, etc.

In one embodiment, learning estimator201is configured to encode information about the quantum circuit on the noisy quantum device. In one embodiment, features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using vectorization (converting features of the quantum circuit into vectors). For example, features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using vectorization, such as Word2vec, Doc2Vec, GloVe, etc.

Alternatively, such features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using a graph. In one embodiment, a graph representing the quantum circuit used in generating the noisy expectation values is generated. Information about the quantum circuit is then encoded as features using the graph. As a result, learning estimator201generates a graph representing the quantum circuit used in generating the noisy expectation values, such as shown in Figure S.

FIG.5illustrates a graph501of the quantum circuit used in generating the noisy expectation values as well as a graph506of the encoded features of the quantum circuit in accordance with an embodiment of the present disclosure.

As shown inFIG.5, graph501of the quantum circuit used in generating the noisy expectation values is represented by various qubits502(e.g., q0, q1), quantum gates503(e.g., SX, RZ, CX, X, H), measurement gates504, and resets505(reset the quantum bit to its default state). In one embodiment, such elements or components (e.g., quantum gates503) of graph501of the quantum circuit used in generating the noisy expectation values are obtained by converting the circuit to a DAG (directed acyclic graph) using the DAGCircuit function of Qiskit®.

In one embodiment, learning estimator201generates such a graph501of the quantum circuit used in generating the noisy expectation values using various software tools, which can include, but are not limited to, Azure®, QCVis, Cirq®, etc.

Features of the quantum circuit, such as the quantum circuit of graph501, may then be encoded on a noisy quantum device (see graph506of the encoded features ofFIG.5) using graph501ofFIG.5. Encoding, as used herein, refers to converting the features of the elements (e.g., quantum gates503) of graph501of the quantum circuit (quantum circuit used in generating the noisy expectation values) into a form that is usable for generating the target expectation values (probabilistic expected values of the target quantum circuit) For example, such features that are encoded include the error associated with a quantum gate (e.g. SX), such as the quantum gate error (e.g., 0.001) as illustrated by element507ofFIG.5, which describes the scenario in which the actually induced transformation deviates from |ψU|ψ. Gate errors may result from miscalibration or imperfections in the control hardware and their interactions with the qubits. In another example, such features that are encoded include the operation times of the quantum gates, such as in μs, as illustrated by element508ofFIG.5.

In one embodiment, such features are learned and encoded based on simulations performed on the quantum circuit displayed in graph501.

In one embodiment, learning estimator201encodes such features of the quantum circuit on the noisy quantum device by performing simulations of the quantum circuit displayed in graph501using various software tools, which can include, but are not limited to, Qiskit®, TensorFlow®, Cirq®, Azure®, etc.

In one embodiment, such features are learned and encoded based on iterating over the nodes in the DAG (directed acyclic graph), such as by using the dag.topological_op_nodes( ) function in Qiskit®. The objects returned are DAGNodes and contain the feature information to be encoded by learning estimator201.

Furthermore, in one embodiment, learning estimator201generates target expectation values for the training data using the encoded features of the quantum circuit and the noisy expectation values. Target expectation values, as used herein, refer to the probabilistic expected values of the target quantum circuit.

In one embodiment, learning estimator201generates such target expectation values using a noiseless simulator That is, such target expectation values are generated by simulators that mimic the behavior of a perfect (noiseless) quantum computer using the encoded features of the quantum circuit and the noisy expectation values. Examples of such noiseless simulators can include, but are not limited to, Intel® Quantum Simulator, Qrack®, staq, qsimcirq package in Cirq®, QuEST®, etc.

In one embodiment, learning estimator201generates such target expectation values using an error mitigated quantum processing unit using the encoded features of the quantum circuit and the noisy expectation values. Examples of such quantum processing units that are error mitigated, such as via probabilistic error cancellation and zero noise extrapolation, can include, but are not limited to, Rigetti® 19Q, Google® Bristlecone, Intel® Tangle Lake, IBM Q®, Google® Sycamore, IBM® Eagle, IBM® Osprey, etc.

Classical computer102further includes a training engine202configured to train a machine learning model using the training data, which includes the target expectation values and the noisy expectation values, to generate target expectation values based on inputted noisy expectation values. That is, such a machine learning model is trained to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. In one embodiment, such machine learning models can include, but are not limited to, a graph neural network model, a multilayer perceptron model, a random forest model, an ordinary least squares model, etc.

In one embodiment, the graph neural network model utilizes graph-structured input data with the node and edge features encoding quantum circuit and noise information. In one embodiment, the model consists of multiple layers of message-passing operations, capturing both local and global information within the graph and enabling intricate relationships to be modeled.

In one embodiment, the graph neural network model is utilized for encoding data (e.g., quantum circuits, device noise parameters) into graph structures. In one embodiment, to accomplish data encoding, each quantum circuit is first transpiled into hardware-native gates that adhere to the quantum device's connectivity, and subsequently converted into a directed acyclic graph (DAG). In the graph, each edge signifies a qubit that receives instructions when directed towards a node, while each node corresponds to a gate. These nodes are assigned vectors containing information about the gate type, gate errors as well as the coherence times and readout errors of the qubits on which the gate operates. Additional device and qubit characterizations, such as qubit crosstalk and idling period duration, can be encoded on the edge or node. In one embodiment, the DAG of a quantum circuit, embedded with device and qubit characterizations, is converted into a non-directed acyclic graph and serves as input to the transformer convolution layers of the graph neural network. These message-passing layers iteratively process and aggregate encoded vectors on neighboring nodes and connected 9 edges to update the assigned vector on each node. This enables the exchange of information based on graph connectivity facilitating the extraction of useful information from the nodes which may correspond to the gate sequence. The output, along with the noisy expectation values, is passed through dense layers to generate a graph level prediction, specifically the mitigated expectation values. As a result, after training the layers using backpropagation to minimize the mean squared error between the noisy and ideal expectation values, the graph neural network model learns to perform quantum error mitigation.

In one embodiment, with respect to the multi-layer perceptron model, the model consists of one or more fully-connected layers of neurons. Furthermore, in one embodiment, the model utilizes the same encoding as used for linear regression. Additionally, in one embodiment, the non-linear activation functions enable the approximation of non-linear relationships.

In one embodiment, with respect to the multi-layer perceptron model, nodes within the hidden layers utilize non-linear activation functions, such as the rectified linear unit (ReLU), enabling the multi-layer perceptron model to model non-linear relationships. In one embodiment, the multi-layer perceptron model is constructed with 2 dense layers, a hidden size of 128, the ReLU activation function, and input features identical to those employed in the random forest model (discussed further below).

In one embodiment, to train the multi-layer perceptron model, the mean squared error is minimized between the predicted and true ideal expectation values employing backpropagation to update the neurons. In one embodiment, the batch size is 32, and the optimizer used has an initial learning rate of 0.001. In one embodiment, regularization techniques, such as dropout or weight decay, are used to prevent overfitting.

In one embodiment, the random forest model consists of an ensemble of decision trees and produces a prediction by averaging the predictions from each tree.

In one embodiment, the random forest model, as an ensemble learning method, employs bootstrap aggregating to combine the results produced from many decision trees, which enhances prediction accuracy and mitigates overfitting. Moreover, each decision tree within the random forest utilizes a random subset of features to minimize correlation between trees, further improving prediction accuracy. In one embodiment, the input features to the random forest model are extracted from the quantum circuits and device-specific noise parameters, such as gate counts (parameterized gates are counted in binned angles), gate error rates, and qubit coherence times. In one embodiment, a random forest regressor is trained with a specified large number of decision trees on the training data. Given all the features, the random forest model averages the predictions from all its decision trees to produce an estimate of the ideal expectation value. In one embodiment, 300 tree estimators are used for each observable. In one embodiment, the tree construction process follows a top-down, recursive, and greedy approach, using the Classification and Regression Trees (CART) algorithm. For the splitting criterion, the mean squared error reduction is employed for regressions. Furthermore, in one embodiment, for each tree, at least 2 samples are used to split an internal node, and 1 feature is considered when looking for the best split.

In one embodiment, with respect to linear regression methods, such as the ordinary least squares model, the input features may correspond to vectors, including circuit features, such as the number of two-qubit gates and SX gates, noisy expectation values, and observables. In one embodiment, the ordinary least squares model consists of a linear function that maps input features to mitigated values.

In one embodiment, such a linear regression model, such as the ordinary least squares model, where the relationship between a dependent variable (the ideal expectation value) and one or more independent variables (the features extracted from quantum circuits) is modeled using a linear function.

In one embodiment, the ordinary least squares model extends the feature set to include gate counts where parameterized gates are binned by their parameter. Secondly, the ordinary least squares model does not necessarily require training on Clifford versions of the target circuits, although this option remains available if desired. Instead, the linear regression model is trained which takes these features as input and predicts the ideal expectation values. The model minimizes the sum squared error between the mitigated and the ideal expectation values using a closed-form solution, which is named ordinary least squares (OLS). The linear regression model can also be trained using other methods, such as ridge regression, least absolute shrinkage and selection operator (LASSO), or elastic net. These methods differ in their regularization techniques, which can help prevent overfitting and improve model generalization.

Furthermore, in one embodiment, training engine202builds and trains a machine learning model to perform quantum error mitigation on quantum results at runtime.

In one embodiment, the model is trained to perform quantum error mitigation on quantum results at runtime based on a sample data set that includes the target expectation values and the noisy expectation values. Such a sample data set may be stored in a data structure (e.g., table) residing within the storage device of classical computer102. In one embodiment, such a data structure is populated with the training data discussed above.

Furthermore, in one embodiment, the sample data set discussed above is used by a machine learning algorithm to make predictions or decisions as to the quantum error mitigation to be performed on quantum results at runtime. The algorithm iteratively makes predictions on the sample data set as to the quantum error mitigation to be performed on quantum results at runtime until the predictions achieve the desired accuracy as determined by an expert. Examples of such learning algorithms include nearest neighbor, Naïve Bayes, decision trees, linear regression, support vector machines, and neural networks.

Additionally, classical computer102includes an optimization engine203configured to perform an optimization of the machine learning model, such as by using a loss function, to improve the performance of the machine learning model A loss function measures the difference between the predicted output of a model and the actual output, such as for each training sample. Optimization engine203is then configured to adjust the model's parameters to minimize the loss function. Examples of such loss functions can include, but are not limited to, mean squared error (calculates the average squared difference between the predicted output and the actual output), mean absolute error (measures the average absolute difference between the predicted and true values), cross-entropy (measures the dissimilarity between the predicted probability distribution and the actual probability distribution), etc. Examples of such optimizers used by optimization engine203to perform such optimization (adjust the model's parameters to minimize the loss function) can include, but are not limited to, gradient descent (adjusts the model's parameters by taking the derivative of the loss function with respect to the parameters and updating the parameters in the direction of the negative gradient), stochastic gradient descent (updates the model's parameters after each training sample, rather than after each epoch), adaptive moment estimation (uses the first and second moments of the gradients to adjust the learning rate adaptively), etc.

In one embodiment, the machine learning model is trained by optimization engine203by minimizing a loss function capturing the difference between the predicted mitigated and ideal expectation values computed with a noiseless simulator.

Additionally, classical computer102includes an accelerator engine204configured to execute a quantum circuit on a quantum computer, such as quantum computer101, creating quantum results.

Furthermore, accelerator engine204is configured to perform quantum error mitigation on the quantum results, which include noisy expectation values, at runtime using the trained machine learning model. For example, based on the quantum results which include noisy expectation values, the trained machine learning model is configured to output mitigated expectation values. Accelerator engine204may perform such quantum error mitigation on the quantum results at runtime involving various applications, such as quantum tomography, which characterizes the complete quantum state of a particle or particles through a series of measurements in different bases, and the variational quantum eigensolver, which is a quantum algorithm for quantum chemistry, quantum simulations, and optimization problems.

By performing quantum error mitigation in such a manner, there are significant savings in quantum execution time while improving the accuracy of the results without additional mitigation circuits at runtime. Furthermore, the approach of the present disclosure offers a path to scalability, is noise-model agnostic, and is able to accommodate application-specific requirements of accuracy and generalizability. Additionally, using the approach of the present disclosure, a user may execute fewer quantum circuits and still obtain accurate, error-mitigated expectation values using pre-loaded machine learning models, or, alternatively, such users can train their own machine learning models.

A further description of these and other functions is provided below in connection with the discussion of the method for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime.

Prior to the discussion of the method for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime, a description of the hardware configuration of classical computer102(FIG.1) is provided below in connection withFIG.6.

Referring now toFIG.6, in conjunction withFIG.1,FIG.6illustrates an embodiment of the present disclosure of the hardware configuration of classical computer102which is representative of a hardware environment for practicing the present disclosure.

Computing environment600contains an example of an environment for the execution of at least some of the computer code601involved in performing the inventive methods, such as training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime. In addition to block601, computing environment600includes, for example, classical computer102, network113, such as a wide area network (WAN), end user device (EUD)602, remote server603, public cloud604, and private cloud605. In this embodiment, classical computer102includes processor set606(including processing circuitry607and cache608), communication fabric609, volatile memory610, persistent storage611(including operating system612and block601, as identified above), peripheral device set613(including user interface (UI) device set614, storage615, and Internet of Things (IoT) sensor set616), and network module617. Remote server603includes remote database618. Public cloud604includes gateway619, cloud orchestration module620, host physical machine set621, virtual machine set622, and container set623.

Processor set606includes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitry607may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitry607may implement multiple processor threads and/or multiple processor cores. Cache608is memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set606. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor set may be located “off chip.” In some computing environments, processor set606may be designed for working with qubits and performing quantum computing.

Volatile memory610is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, the volatile memory is characterized by random access, but this is not required unless affirmatively indicated. In classical computer102, the volatile memory610is located in a single package and is internal to classical computer102, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to classical computer102.

Peripheral device set613includes the set of peripheral devices of classical computer102. Data communication connections between the peripheral devices and the other components of classical computer102may be implemented in various ways, such as Bluetooth connections, Near-Field Communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), insertion type connections (for example, secure digital (SD) card), connections made though local area communication networks and even connections made through wide area networks such as the internet. In various embodiments, UI device set614may include components such as a display screen, speaker, microphone, wearable devices (such as goggles and smart watches), keyboard, mouse, printer, touchpad, game controllers, and haptic devices. Storage615is external storage, such as an external hard drive, or insertable storage, such as an SD card. Storage615may be persistent and/or volatile. In some embodiments, storage615may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where classical computer102is required to have a large amount of storage (for example, where classical computer102locally stores and manages a large database) then this storage may be provided by peripheral storage devices designed for storing very large amounts of data, such as a storage area network (SAN) that is shared by multiple, geographically distributed computers. IoT sensor set616is made up of sensors that can be used in Internet of Things applications. For example, one sensor may be a thermometer and another sensor may be a motion detector.

End user device (EUD)602is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates classical computer102), and may take any of the forms discussed above in connection with classical computer102. EUD602typically receives helpful and useful data from the operations of classical computer102. For example, in a hypothetical case where classical computer102is designed to provide a recommendation to an end user, this recommendation would typically be communicated from network module617of classical computer102through WAN113to EUD602. In this way, EUD602can display, or otherwise present, the recommendation to an end user. In some embodiments, EUD602may be a client device, such as thin client, heavy client, mainframe computer, desktop computer and so on.

Remote server603is any computer system that serves at least some data and/or functionality to classical computer102. Remote server603may be controlled and used by the same entity that operates classical computer102. Remote server603represents the machine(s) that collect and store helpful and useful data for use by other computers, such as classical computer102. For example, in a hypothetical case where classical computer102is designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to classical computer102from remote database618of remote server603.

Public cloud604is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and/or other computer capabilities, especially data storage (cloud storage) and computing power, without direct active management by the user. Cloud computing typically leverages sharing of resources to achieve coherence and economies of scale. The direct and active management of the computing resources of public cloud604is performed by the computer hardware and/or software of cloud orchestration module620. The computing resources provided by public cloud604are typically implemented by virtual computing environments that run on various computers making up the computers of host physical machine set621, which is the universe of physical computers in and/or available to public cloud604. The virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set622and/or containers from container set623. It is understood that these VCEs may be stored as images and may be transferred among and between the various physical machine hosts, either as images or after instantiation of the VCE. Cloud orchestration module620manages the transfer and storage of images, deploys new instantiations of VCEs and manages active instantiations of VCE deployments. Gateway619is the collection of computer software, hardware, and firmware that allows public cloud604to communicate through WAN113.

Private cloud605is similar to public cloud604, except that the computing resources are only available for use by a single enterprise. While private cloud605is depicted as being in communication with WAN113in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloud604and private cloud605are both part of a larger hybrid cloud.

Block601further includes the software components discussed above in connection withFIGS.2-5to train a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime. In one embodiment, such components may be implemented in hardware. The functions discussed above performed by such components are not generic computer functions. As a result, classical computer102is a particular machine that is the result of implementing specific, non-generic computer functions.

In one embodiment, the functionality of such software components of classical computer102, including the functionality for training a machine learning model to perform quantum error mitigation on quantum results at runtime with less overhead and without increasing the execution time at runtime, may be embodied in an application specific integrated circuit.

As stated above, current quantum hardware, however, is subject to different sources of noise, the most well-known being qubit decoherence, individual gate errors, and measurement errors. These errors limit the depth of the quantum circuit (i.e., the number of “layers” of quantum gates, executed in parallel, it takes to complete the computation defined by the quantum circuit) that can be implemented. However, even for shallow circuits, noise can lead to faulty estimates. Fortunately, quantum error mitigation provides a collection of tools and methods that allow one to evaluate accurate expectation values (probabilistic expected values of the quantum circuit) from noisy, shallow depth quantum circuits, even before the introduction of fault tolerance. Quantum error mitigation refers to a series of techniques aimed at reducing (mitigating) the errors that occur in quantum computing algorithms. Such techniques involve running additional mitigation circuits or modified target circuits (target circuit is the quantum circuit executed on the quantum computer creating the quantum results). As a result, the use of quantum error mitigation techniques generally results in longer execution times or requires access to additional qubits for increased accuracy. That is, such quantum error mitigation methods trade additional execution time for increased accuracy. An example of a quantum error mitigation technique is probabilistic error cancellation where the noise of the target circuit is learned layer by layer and then cancelled in a probabilistic manner with an exponential overhead to control the subsequent spread in the variance of expectation values. Another example of a quantum error mitigation technique that involves running additional mitigation circuits is zero noise extrapolation. Zero noise extrapolation is an error mitigation technique used to extrapolate the noiseless expectation value (probabilistic expected value of the quantum circuit with zero noise) of an observable from a range of expectation values computed at different noise levels. For example, the noiseless expectation value (also referred to as the “zero-noise” value) is extrapolated by fitting a function (referred to as an “extrapolation function”) to the expectation values of the mitigation circuits measured at different noise levels, where the noise has been tuned by noise factors (indicates the “noisiness” of the quantum circuit, such as difference noise levels) achieved by inserting additional digital quantum gates. Unfortunately, such techniques involve considerable overhead while increasing the execution time at runtime.

The embodiments of the present disclosure provide the means for performing quantum error mitigation with less overhead without increasing the execution time at runtime as discussed below in connection withFIGS.7-8.FIG.7is a flowchart of a method for training a machine learning model to perform quantum error mitigation on quantum results at runtime.FIG.8is a flowchart of a method for performing quantum error mitigation on the quantum results at runtime using the trained machine learning model.

As stated above,FIG.7is a flowchart of a method700for training a machine learning model to perform quantum error mitigation on quantum results at runtime in accordance with an embodiment of the present disclosure.

Referring toFIG.7, in conjunction withFIGS.1-6, in step701, learning estimator201of classical computer102generates noisy expectation values for the training data to train the machine learning model to perform quantum error mitigation on quantum results at runtime. In one embodiment, learning estimator201generates such noisy expectation values by sampling parameters of parameterized quantum circuits with a fixed structure. In one embodiment, such parameterized quantum circuits correspond to quantum circuits that are structurally similar to the target quantum circuit. A target quantum circuit, as used herein, refers to the quantum circuit whose quantum results are to be subject to quantum error mitigation.

As discussed above, in one embodiment, learning estimator201generates noisy expectation values by sampling parameters of parameterized quantum circuits with a fixed structure using various software tools, which may include, but are not limited to, Cirq®, Qulacs®, QuCAT, Qiskit®, etc.

In one embodiment, such parameterized circuits are ansatz circuits. An ansatz circuit, as used herein, refers to a circuit with a predetermined circuit geometry and parametrized gates expressing a time-evolution unitary operator. In one embodiment, training such a circuit involves learning the gate parameters through a gradient-descent algorithm where the gradients themselves can be efficiently estimated by the quantum circuit.

For example, using an ansatz circuit, hardware-efficient entangling ansatz may be performed to sample the parameters of parameterized circuits as illustrated inFIG.3.

As shown inFIG.3, hardware-efficient entangling ansatz300consists of a sequence of single qubit rotation gates301and “entangling” 2-qubit gates302A-302D. As further illustrated inFIG.3, each qubit gate301has an angle, θ, as a parameter.

Furthermore, in one embodiment, the noisy expectation values of the training data are generated by sampling parameters of parameterized circuits using Hamiltonian time evolution, such as Trotterized spin dynamics. In one embodiment, Hamiltonians are hermitian operators that are a sum of a large number of individual Hamiltonians Hj. For example, a Hamiltonian H can be equal to H1+H2. This sum of 2 Hamiltonians can be described by the Lie product formula: e−t(H1+H2)t=Iim N→∞(e−iH1t/e−iH2t/N)N. Since the limit of this formula is infinite, the series is truncated when implementing this formula on a quantum computer. The truncation introduces error in the simulation that can be bounded by a maximum simulation error ϵ such that ∥e−iHt−U∥≤ϵ.This truncation is known as Trotterization. The Trotterization formula is then e−iHt=(e−iH0t/r*e−iH1t/r . . . ⋅c−thd-1t/r)r+0 (some polynomial factors). Hence, Trotterization can be exploited to mitigate the Trotter error (error in Trotterization) in digital quantum simulation. In one embodiment, Trotterization is exploited to mitigate the Trotter error in digital quantum simulation via spin dynamics (Trotterized spin dynamics), such as spin dynamics of the transverse-field Ising model as illustrated inFIG.4.

As shown inFIG.4,FIG.4illustrates a quantum circuit400for a 6-spin chain of the single Trotter step. A simulation via a product formula proceeds by dividing the total evolution time into a finite number of steps and performing an approximate simulation of exp(−iHt/r)r times. Each simulation of exp(−iHt/r) is called a Trotter step.

In step702, learning estimator201of classical computer102implements dynamical decoupling and/or twirling in the quantum circuit that generates the noisy expectation values to make such noise (noisy expectation values) more easily learned. By performing such dynamic decoupling and/or twirling, the effect of the coherent error is reduced. The result of such a procedure is to make the noise model easier to learn by the machine learning model thereby requiring fewer training circuits and enabling generalization of mitigation capabilities from the training set to the more general classes of circuits.

As stated above, dynamic decoupling, as used herein, is an open-loop quantum control technique to exploit fast time-dependent controlled modulation to suppress decoherence. In one embodiment, dynamic decoupling is implemented by a periodic sequence of instantaneous control pulses, the net effect of which is to nearly average to zero undesired system-environment coupling. In one embodiment, learning estimator201utilizes various schemes (e.g., Carr-Purcell, Carr-Purcell-Meiboom-Gill) for designing dynamic decoupling protocols with realistic marginal intensity controlled pulses, achieving high-order error suppression, and achieving compatibility between dynamic decoupling and quantum gates thereby extending the coherence time of the qubits.

Twirling, as used herein, is a technique used for converting arbitrary noise channels into Pauli channels in error threshold estimations of quantum error correction codes. That is, twirling is a technique that “twirls” out the irregularity of an arbitrary error channel, turning it into a Pauli error channel.

In one embodiment, learning estimator201uses various software tools for implementing dynamic decoupling and/or twirling in the quantum circuit that generates the noisy expectation values which can include, but are not limited to, ADAPT, VAQEM, Qiskit®, etc.

In step703, learning estimator201of classical computer102encodes the features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device.

As discussed above, in one embodiment, learning estimator201is configured to encode information about the quantum circuit on the noisy quantum device. In one embodiment, features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using vectorization (converting features of the quantum circuit into vectors). For example, features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using vectorization, such as Word2vec, Doc2Vec, GloVe, etc.

Alternatively, such features of the quantum circuit (quantum circuit used in generating the noisy expectation values) on a noisy quantum device are encoded using a graph. In one embodiment, a graph representing the quantum circuit used in generating the noisy expectation values is generated. Information about the quantum circuit is then encoded as features using the graph. As a result, learning estimator201generates a graph representing the quantum circuit used in generating the noisy expectation values, such as shown inFIG.5.

As shown inFIG.5, graph501of the quantum circuit used in generating the noisy expectation values is represented by various qubits502(e.g., q0, q1), quantum gates503(e.g., SX, RZ, CX, X, H), measurement gates504, and resets505(reset the quantum bit to its default state). In one embodiment, such elements or components (e.g., quantum gates503) of graph501of the quantum circuit used in generating the noisy expectation values are obtained by converting the circuit to a DAG (directed acyclic graph) using the DAGCircuit function of Qiskit®.

In one embodiment, learning estimator201generates such a graph501of the quantum circuit used in generating the noisy expectation values using various software tools, which can include, but are not limited to, Azure®, QCVis, Cirq®, etc.

In one embodiment, earning estimator201encodes the features of the quantum circuit (see encoded features506ofFIG.5) on a noisy quantum device using the graph, such as graph501ofFIG.5. Encoding, as used herein, refers to converting the features of the elements (e.g., quantum gates503) of graph501of the quantum circuit (quantum circuit used in generating the noisy expectation values) into a form that is usable for generating the target expectation values (probabilistic expected values of the target quantum circuit). For example, such features that are encoded include the error associated with a quantum gate (e.g., SX), such as the quantum gate error (e.g., 0.001) as illustrated by element507ofFIG.5, which describes the scenario in which the actually induced transformation deviates from |ψU|ψ. Gate errors may result from miscalibration or imperfections in the control hardware and their interactions with the qubits. In another example, such features that are encoded include the operation times of the quantum gates, such as in μs, as illustrated by element508ofFIG.5.

As discussed above, in one embodiment, such features are learned and encoded based on simulations performed on the quantum circuit displayed in graph501.

In one embodiment, learning estimator201encodes such features of the quantum circuit on the noisy quantum device by performing simulations of the quantum circuit displayed in graph501using various software tools, which can include, but are not limited to, Qiskit®, TensorFlow®, Cirq®, Azure®, etc.

In one embodiment, such features are learned and encoded based on iterating over the nodes in the DAG (directed acyclic graph), such as by using the dag.topological_op_nodes( ) function in Qiskit®. The objects returned are DAGNodes and contain the feature information to be encoded by learning estimator201.

In step704, learning estimator201of classical computer102generates the target expectation values for the training data using the encoded features of the quantum circuit and the noisy expectation values. Target expectation values, as used herein, refer to the probabilistic expected values of the target quantum circuit.

As stated above, in one embodiment, learning estimator201generates such target expectation values using a noiseless simulator. That is, such target expectation values are generated by simulators that mimic the behavior of a perfect (noiseless) quantum computer using the encoded features of the quantum circuit and the noisy expectation values. Examples of such noiseless simulators can include, but are not limited to, Intel® Quantum Simulator, Qrack®, staq, qsimcirq package in Cirq®, QuEST®, etc.

In one embodiment, learning estimator201generates such target expectation values using an error mitigated quantum processing unit using the encoded features of the quantum circuit and the noisy expectation values. Examples of such quantum processing units that are error mitigated, such as via probabilistic error cancellation and zero noise extrapolation, can include, but are not limited to, Rigetti® 19Q, Google® Bristlecone, Intel® Tangle Lake, IBM Q®. Google® Sycamore, IBM® Eagle, IBM® Osprey, etc.

In step70S, training engine202of classical computer102trains a machine learning model using the training data, which includes the target expectation values and the noisy expectation values, to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. That is, such a machine learning model is trained to generate target expectation values based on inputted noisy expectation values. In one embodiment, such machine learning models can include, but are not limited to, a graph neural network model, a multilayer perceptron model, a random forest model, an ordinary least squares model, etc.

As stated above, in one embodiment, the graph neural network model utilizes graph-structured input data with the node and edge features encoding quantum circuit and noise information. In one embodiment, the model consists of multiple layers of message-passing operations, capturing both local and global information within the graph and enabling intricate relationships to be modeled.

In one embodiment, the graph neural network model is utilized for encoding data (e.g., quantum circuits, device noise parameters) into graph structures. In one embodiment, to accomplish data encoding, each quantum circuit is first transpiled into hardware-native gates that adhere to the quantum device's connectivity, and subsequently converted into a directed acyclic graph (DAG). In the graph, each edge signifies a qubit that receives instructions when directed towards a node, while each node corresponds to a gate. These nodes are assigned vectors containing information about the gate type, gate errors as well as the coherence times and readout errors of the qubits on which the gate operates. Additional device and qubit characterizations, such as qubit crosstalk and idling period duration, can be encoded on the edge or node. In one embodiment, the DAG of a quantum circuit, embedded with device and qubit characterizations, is converted into a non-directed acyclic graph and serves as input to the transformer convolution layers of the graph neural network. These message-passing layers iteratively process and aggregate encoded vectors on neighboring nodes and connected 9 edges to update the assigned vector on each node. This enables the exchange of information based on graph connectivity facilitating the extraction of useful information from the nodes which may correspond to the gate sequence. The output, along with the noisy expectation values, is passed through dense layers to generate a graph level prediction, specifically the mitigated expectation values. As a result, after training the layers using backpropagation to minimize the mean squared error between the noisy and ideal expectation values, the graph neural network model learns to perform quantum error mitigation.

In one embodiment, with respect to the multi-layer perceptron model, the model consists of one or more fully-connected layers of neurons. Furthermore, in one embodiment, the model utilizes the same encoding as used for linear regression. Additionally, in one embodiment, the non-linear activation functions enable the approximation of non-linear relationships.

In one embodiment, with respect to the multi-layer perceptron model, nodes within the hidden layers utilize non-linear activation functions, such as the rectified linear unit (ReLU), enabling the multi-layer perceptron model to model non-linear relationships. In one embodiment, the multi-layer perceptron model is constructed with 2 dense layers, a hidden size of 128, the ReLU activation function, and input features identical to those employed in the random forest model (discussed further below).

In one embodiment, to train the multi-layer perceptron model, the mean squared error is minimized between the predicted and true ideal expectation values employing backpropagation to update the neurons. In one embodiment, the batch size is 32, and the optimizer used has an initial learning rate of 0.001. In one embodiment, regularization techniques, such as dropout or weight decay, are used to prevent overfitting.

In one embodiment, the random forest model consists of an ensemble of decision trees and produces a prediction by averaging the predictions from each tree.

In one embodiment, the random forest model, as an ensemble learning method, employs bootstrap aggregating to combine the results produced from many decision trees, which enhances prediction accuracy and mitigates overfitting. Moreover, each decision tree within the random forest utilizes a random subset of features to minimize correlation between trees, further improving prediction accuracy. In one embodiment, the input features to the random forest model are extracted from the quantum circuits and device-specific noise parameters, such as gate counts (parameterized gates are counted in binned angles), gate error rates, and qubit coherence times. In one embodiment, a random forest regressor is trained with a specified large number of decision trees on the training data. Given all the features, the random forest model averages the predictions from all its decision trees to produce an estimate of the ideal expectation value. In one embodiment, 300 tree estimators are used for each observable. In one embodiment, the tree construction process follows a top-down, recursive, and greedy approach, using the Classification and Regression Trees (CART) algorithm. For the splitting criterion, the mean squared error reduction is employed for regressions. Furthermore, in one embodiment, for each tree, at least 2 samples are used to split an internal node, and 1 feature is considered when looking for the best split.

In one embodiment, with respect to linear regression methods, such as the ordinary least squares model, the input features may correspond to vectors, including circuit features, such as the number of two-qubit gates and SX gates, noisy expectation values, and observables. In one embodiment, the ordinary least squares model consists of a linear function that maps input features to mitigated values.

In one embodiment, such a linear regression model, such as the ordinary least squares model, where the relationship between a dependent variable (the ideal expectation value) and one or more independent variables (the features extracted from quantum circuits) is modeled using a linear function.

In one embodiment, the ordinary least squares model extends the feature set to include gate counts where parameterized gates are binned by their parameter. Secondly, the ordinary least squares model does not necessarily require training on Clifford versions of the target circuits, although this option remains available if desired. Instead, the linear regression model is trained which takes these features as input and predicts the ideal expectation values. The model minimizes the sum squared error between the mitigated and the ideal expectation values using a closed-form solution, which is named ordinary least squares (OLS). The linear regression model can also be trained using other methods, such as ridge regression, least absolute shrinkage and selection operator (LASSO), or elastic net. These methods differ in their regularization techniques, which can help prevent overfitting and improve model generalization.

Furthermore, as discussed above, in one embodiment, training engine202builds and trains a machine learning model to perform quantum error mitigation on quantum results at runtime.

In one embodiment, the model is trained to perform quantum error mitigation on quantum results at runtime based on a sample data set that includes the target expectation values and the noisy expectation values. Such a sample data set may be stored in a data structure (e.g., table) residing within the storage device (e.g., storage device611,615) of classical computer102. In one embodiment, such a data structure is populated with the training data discussed above.

Furthermore, in one embodiment, the sample data set discussed above is used by a machine learning algorithm to make predictions or decisions as to the quantum error mitigation to be performed on quantum results at runtime. The algorithm iteratively makes predictions on the sample data set as to the quantum error mitigation to be performed on quantum results at runtime until the predictions achieve the desired accuracy as determined by an expert. Examples of such learning algorithms include nearest neighbor, Naïve Bayes, decision trees, linear regression, support vector machines, and neural networks.

In step706, optimization engine203of classical computer102performs an optimization of the machine learning model, such as by using a loss function, to improve the performance of the machine learning model.

As stated above, a loss function measures the difference between the predicted output of a model and the actual output, such as for each training sample. Optimization engine203is then configured to adjust the model's parameters to minimize the loss function. Examples of such loss functions can include, but are not limited to, mean squared error (calculates the average squared difference between the predicted output and the actual output), mean absolute error (measures the average absolute difference between the predicted and true values), cross-entropy (measures the dissimilarity between the predicted probability distribution and the actual probability distribution), etc. Examples of such optimizers used by optimization engine203to perform such optimization (adjust the model's parameters to minimize the loss function) can include, but are not limited to, gradient descent (adjusts the model's parameters by taking the derivative of the loss function with respect to the parameters and updating the parameters in the direction of the negative gradient), stochastic gradient descent (updates the model's parameters after each training sample, rather than after each epoch), adaptive moment estimation (uses the first and second moments of the gradients to adjust the learning rate adaptively), etc.

In one embodiment, the machine learning model is trained by optimization engine203by minimizing a loss function capturing the difference between the predicted mitigated and ideal expectation values computed with a noiseless simulator.

Upon training the machine learning model to perform quantum error mitigation, such a trained machine learning model may be used to perform quantum error mitigation on quantum results at runtime as discussed below in connection withFIG.8.

FIG.8is a flowchart of a method800for performing quantum error mitigation on the quantum results at runtime using the trained machine learning model in accordance with an embodiment of the present disclosure.

Referring toFIG.8, in conjunction withFIGS.1-7, in step801, accelerator engine204of classical computer102executes a quantum circuit on a quantum computer, such as quantum computer101, creating quantum results.

In step802, accelerator engine204of classical computer102performs quantum error mitigation on the quantum results, which include noisy expectation values, at runtime using the trained machine learning model.

As discussed above, for example, based on the quantum results which include noisy expectation values, the trained machine learning model is configured to output mitigated expectation values. Accelerator engine204may perform such quantum error mitigation on the quantum results at runtime involving various applications, such as quantum tomography, which characterizes the complete quantum state of a particle or particles through a series of measurements in different bases, and the variational quantum eigensolver, which is a quantum algorithm for quantum chemistry, quantum simulations, and optimization problems.

By performing quantum error mitigation in such a manner, there are significant savings in quantum execution time while improving the accuracy of the results without additional mitigation circuits at runtime. Furthermore, the approach of the present disclosure offers a path to scalability, is noise-model agnostic, and is able to accommodate application-specific requirements of accuracy and generalizability. Additionally, using the approach of the present disclosure, a user may execute fewer quantum circuits and still obtain accurate, error-mitigated expectation values using pre-loaded machine learning models, or, alternatively, such users can train their own machine learning models.

Furthermore, the principles of the present disclosure improve the technology or technical field involving quantum error mitigation techniques.

As discussed above, current quantum hardware, however, is subject to different sources of noise, the most well-known being qubit decoherence, individual gate errors, and measurement errors. These errors limit the depth of the quantum circuit (i.e., the number of “layers” of quantum gates, executed in parallel, it takes to complete the computation defined by the quantum circuit) that can be implemented. However, even for shallow circuits, noise can lead to faulty estimates. Fortunately, quantum error mitigation provides a collection of tools and methods that allow one to evaluate accurate expectation values (probabilistic expected values of the quantum circuit) from noisy, shallow depth quantum circuits, even before the introduction of fault tolerance. Quantum error mitigation refers to a series of techniques aimed at reducing (mitigating) the errors that occur in quantum computing algorithms. Such techniques involve running additional mitigation circuits or modified target circuits (target circuit is the quantum circuit executed on the quantum computer creating the quantum results). As a result, the use of quantum error mitigation techniques generally results in longer execution times or requires access to additional qubits for increased accuracy. That is, such quantum error mitigation methods trade additional execution time for increased accuracy. An example of a quantum error mitigation technique is probabilistic error cancellation where the noise of the target circuit is learned layer by layer and then cancelled in a probabilistic manner with an exponential overhead to control the subsequent spread in the variance of expectation values. Another example of a quantum error mitigation technique that involves running additional mitigation circuits is zero noise extrapolation. Zero noise extrapolation is an error mitigation technique used to extrapolate the noiseless expectation value (probabilistic expected value of the quantum circuit with zero noise) of an observable from a range of expectation values computed at different noise levels. For example, the noiseless expectation value (also referred to as the “zero-noise” value) is extrapolated by fitting a function (referred to as an “extrapolation function”) to the expectation values of the mitigation circuits measured at different noise levels, where the noise has been tuned by noise factors (indicates the “noisiness” of the quantum circuit, such as difference noise levels) achieved by inserting additional digital quantum gates. Unfortunately, such techniques involve considerable overhead while increasing the execution time at runtime.

Embodiments of the present disclosure improve such technology by generating training data, which includes noisy expectation values and target expectation values (noiseless expectation values). A machine learning model is then trained using the training data to perform quantum error mitigation based on learning the relationships between target and noisy expectation values. That is, such a machine learning model is trained to generate target expectation values based on inputted noisy expectation values. In one embodiment, such machine learning models can include, but are not limited to, a graph neural network model, a multilayer perceptron model, a random forest model, an ordinary least squares model, etc. Upon executing a quantum circuit on a quantum computer creating quantum results, quantum error mitigation is performed on the quantum results at runtime using the trained machine learning model. In this manner, there are significant savings in quantum execution time while improving the accuracy of the results in performing quantum error mitigation on quantum results at runtime without additional mitigation circuits. Furthermore, in this manner, there is an improvement in the technical field involving quantum error mitigation techniques.

The technical solution provided by the present disclosure cannot be performed in the human mind or by a human using a pen and paper. That is, the technical solution provided by the present disclosure could not be accomplished in the human mind or by a human using a pen and paper in any reasonable amount of time and with any reasonable expectation of accuracy without the use of a computer.