Systems and methods for efficient error mitigation in quantum circuit execution using parity checks and classical feedback

Systems and methods for efficient error mitigation in quantum circuit execution using parity checks and classical feedback are disclosed. A method may include a quantum computer: executing a quantum optimization algorithm comprising measurement points for measuring a quantum state parity, and termination instructions for stopping execution of the quantum optimization algorithm; preparing the quantum state; executing a first step of the quantum optimization algorithm; measuring a first parity of the quantum state; returning the first parity to a classical computer program; executing a second step of the quantum optimization algorithm; measuring a second parity of the quantum state; returning the second parity to the classical computer program that is configured to compare the first parity and the second parity; receiving an instruction to execute the termination instructions from the classical computer program in response to first parity and the second parity being different; and executing the termination instructions.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments are generally directed to systems and methods for efficient error mitigation in quantum circuit execution using parity checks and classical feedback.

2. Description of the Related Art

Solving optimization algorithms, like portfolio optimization, is a promising use case of quantum computers. Because of experimental or hardware noise, quantum algorithms often fail to reach optimal solutions. To counter the accumulation of hardware noise, error mitigation techniques are used to discard bad or corrupted data. This is often referred to as “post-selection.” Error detection and mitigation techniques based on rejecting bad samples require the quantum circuit to be fully executed before the data can be processed, which is costly in time and money.

SUMMARY OF THE INVENTION

Systems and methods for efficient error mitigation in quantum circuit execution using parity checks and classical feedback are disclosed. According to one embodiment, a method for efficient error mitigation in quantum circuit execution may include: (1) executing, by a quantum computer, a quantum circuit for a quantum optimization algorithm, the quantum circuit comprising a plurality of measurement points for measuring a parity of a quantum state, and termination instructions for stopping execution of the quantum optimization algorithm; (2) preparing, by the quantum computer, the quantum state; (3) executing, by the quantum computer, a first step of the quantum optimization algorithm; (4) measuring, by the quantum computer, a first parity of the quantum state; (5) returning, by the quantum computer, the first parity to a classical computer program; (6) executing, by the quantum computer, a second step of the quantum optimization algorithm; (7) measuring, by the quantum computer, a second parity of the quantum state; (8) returning, by the quantum computer, the second parity to the classical computer program, wherein the classical computer program is configured to compare the first parity and the second parity; (9) receiving, by the quantum computer, an instruction to execute the termination instructions from the classical computer program in response to first parity and the second parity being different; and (10) executing, by the quantum computer, the termination instructions.

In one embodiment, the quantum state is a Dicke state.

In one embodiment, the quantum computer measures the first parity and the second parity by: initializing an auxiliary qubit; applying a Hadamard gate; applying a control on the auxiliary qubit; applying a Hadamard gate a second time; and measuring the auxiliary qubit.

In one embodiment, the quantum optimization algorithm comprises the Quantum Approximate Optimization Algorithm.

In one embodiment, the method may also include continuing to execute, by the quantum computer, the quantum optimization algorithm in response to the first parity of the quantum state and the second parity of the quantum state being the same.

According to another embodiment, a method for efficient error mitigation in quantum circuit execution may include: (1) executing, by a quantum computer, a quantum circuit for a quantum optimization algorithm, the quantum circuit comprising a plurality of measurement points for measuring a parity of a quantum state, and termination instructions for stopping execution of the quantum optimization algorithm; (2) measuring, by the quantum computer, a first parity of the quantum state; (3) returning, by the quantum computer, the first parity to a classical computer program; (4) executing, by the quantum computer, a phase operator; (5) measuring, by the quantum computer, a second parity of the quantum state; (6) returning, by the quantum computer, the second parity to the classical computer program, wherein the classical computer program is configured to compare the first parity and the second parity; (7) receiving, by the quantum computer, an instruction to execute the termination instructions from the classical computer program in response to first parity and the second parity being different; and (8) executing, by the quantum computer, the termination instructions.

In one embodiment, the phase operator comprises a product of ZZ gates.

In one embodiment, the first parity of the quantum state and the second parity of the quantum state are measured by an operator comprising a tensor product of single-qubit Pauli Z operators.

In one embodiment, the quantum optimization algorithm comprises the Quantum Approximate Optimization Algorithm.

In one embodiment, the method may also include continuing to execute, by the quantum computer, the quantum optimization algorithm in response to the first parity of the quantum state and the second parity of the quantum state being unchanged.

According to another embodiment, a method for efficient error mitigation in quantum circuit execution may include: (1) executing, by a quantum computer, a first step in a quantum optimization algorithm comprising measurement points for measuring a parity of integer variable states and termination instructions for stopping execution of the quantum optimization algorithm, wherein integers in the quantum optimization algorithm are represented using one-hot encoding; (2) measuring, by the quantum computer, a parity for each of the integer variables; (3) returning, by the quantum computer, the parities to a classical computer program, wherein the classical computer program is configured to evaluate the parities; (4) receiving, by the quantum computer, an instruction to execute the termination instructions from the classical computer program in response to one of the parities having a value other than a first value; and (5) executing, by the quantum computer, the termination instructions.

In one embodiment, the value is −1.

In one embodiment, the quantum optimization algorithm comprises the Quantum Approximate Optimization Algorithm.

In one embodiment, the parity for each of the integer variables is measured using an operator comprising a tensor product of single-qubit Pauli Z operators.

In one embodiment, the method may also include continuing to execute, by the quantum computer, the quantum optimization algorithm in response to the parities having the first value.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments generally relate to systems and methods for efficient error mitigation in quantum circuit execution using parity checks and classical feedback.

Embodiments allow for the detection of errors early in the execution. When an error is detected, execution is terminated and then restarted. This conserves quantum computing resources by avoiding the running the remainder of the execution.

For example, embodiments may terminate the execution of a quantum optimization algorithm that is executing on a quantum computer upon discovery of an error from a measurement, such as the measurement outcome of a parity check. The user may specify the particular optimization problem properties that will be used to create the parity checks for the conditions upon which the early termination will happen.

In embodiments, a termination instruction may be included in a classical program that is provided alongside the quantum computer program (or quantum circuit). The user may specify the conditions (e.g., a parity check producing an incorrect outcome). The classical program may process the measurement outcomes and, based on them, may send the “terminate” instruction to the quantum computer.

Referring toFIG.1, a system for efficient error mitigation in quantum circuit execution using parity checks and classical feedback is disclosed according to an embodiment. System100may include quantum computer110that may execute quantum circuit112. Quantum computer110may be a device that performs quantum computations, such as those based on the collective properties of quantum states including superposition, interference, and entanglement. Quantum dictionary114may include a plurality of quantum computing patterns. Examples of quantum dictionaries are provided in U.S. Provisional Patent Application Ser. No. 63/055,688 filed Jul. 23, 2020, and in Gilliam, et al., “Foundational patterns for efficient quantum computing” (2019), available at arXiv: 1907.11513, the disclosures of which are hereby incorporated by reference in their entireties.

Quantum dictionary114may replace the manual creation of the quantum state with an automated process, and may create a quantum data structure that is capable of representing multiple problem sets. By standardizing the encoding manner, oracles may also be standardized, making it more efficient.

Classical computer120may be any suitable general purpose computing device, including servers, workstations, desktop, notebook, laptop, or tablet computers, etc. For example, classical computer120may be a microprocessor-based device. Classical computer120may interface with quantum circuit112using classical computer program125, which may provide input to, and receive output from, quantum computer110. In one embodiment, classical computer program125may generate one or more quantum circuits112, may transpile the quantum circuit(s)112to machine-readable instructions, and may then send the transpiled circuit(s)112to quantum computer110for execution. Classical computer program125may also select one or more quantum dictionary patterns from quantum dictionary114and may provide the quantum dictionary pattern(s) to quantum computer110. Classical computer program125may also receive the results of the execution of the one or more quantum circuits112.

In one embodiment, classical computer program125may include logic to cause the execution of the quantum circuit to stop in certain circumstances. In one embodiment, classical computer program125may receive measurements of the parity of a state of a quantum circuit during the execution of a quantum optimization algorithm. The measurements may be performed by quantum circuit112. For example, classical computer program125may receive measurements of the Dicke state during execution of the Quantum Approximate Optimization Algorithm (QAOA) after each step. An example of the QAOA is described in Farhi, Edward et al., “A Quantum Approximate Optimization Algorithm,” (2014) available at arxiv.org/abs/1411.4028, the disclosure of which is hereby incorporated, by reference, in its entirety.

In another embodiment, classical computer program125may receive measurements for a parity of a quantum state before and after execution of a unitary by measuring an ancilla bit. And in another embodiment, classical computer program125may receive measurements of an operator composed of a tensor product of single-qubit Pauli Z operators (e.g., ⊗iZi) for each integer variable in a one-hot encoded optimization problem periodically (e.g., after each step of the execution of the quantum optimization algorithm).

If classical computer program125identifies an error in a measurement, it may stop execution of the quantum circuit by the quantum computer, thereby saving quantum computing resources. For example, the quantum circuit may include an exit instruction that causes the quantum computer to stop execution of the quantum circuit.

In one embodiment, more than one classical computer program125may be provided. For example, a first classical computer program125may receive the quantum computer program, transpile the quantum computer program into a quantum circuit, and provide the quantum circuit to quantum computer110, and a second classical computer program125may receive measurements from quantum computer110, determine whether the measurements indicate an error, and communicate an instruction to terminate execution of the quantum circuit as needed.

Data source(s)130may include one or more sources of data. For example, data source(s)130may provide input data, such as the problem to be solved (e.g., an optimization problem), an identification of the desired quantum computer110to execute quantum circuit112, information on quantum computer110(e.g., the number of qubits, fidelity, etc.).

Referring toFIG.2, a method for efficient error mitigation in quantum circuit execution using parity-based state verification is disclosed according to one embodiment. Optimization problems often include constraints, such as a constraint on a variable that is included in the output set. For example, in a portfolio optimization problem, there may be a constraint on the number of assets that may be included in a final portfolio. Thus, embodiments may fix a variable, resulting in a constrained optimization problem.

For example, constraints may be enforced in the quantum circuit through the selection of the operations that are included in the quantum circuit. In the case of quantum optimization algorithm, the central operations may be the initial state preparation operator (e.g., preparation of the Dicke state) and the mixer operator (e.g., the XY mixer). An example of the XY mixer is disclosed in Hadfield et al., “From the quantum approximate optimization algorithm to a quantum alternating operator ansatz.” Algorithms 12(2) (2019) available at doi.org/10.3390/a12020034), the disclosure of which is hereby incorporated, by reference, in its entirety.

In step205, a classical computer program may receive a quantum computer program for an optimization problem. In one embodiment, the quantum computer program may include measurement points for measuring a parity of the Dicke state and termination instructions for terminating execution of the quantum circuit.

In step210, the classical computer may transpile the quantum computer program into a quantum circuit and may provide the quantum circuit to a quantum computer for execution.

In step215, the quantum computer may prepare a quantum state, such as a Dicke state. The Dicke state is a linear superposition of states with a given Hamming weight ψd∝Σx∈{0,1}n:|x|=d|x.

In step220, the quantum computer may execute a first step of the quantum optimization algorithm with a mixer, such as an XY mixer or any other Hamming Weight preserving mixer. For example, for the QAOA, the quantum circuit may include three operations: initial state preparation, phase operator, and the mixer operator. The phase and mixer operator are repeated, with pair of operators forming a “layer”. The mixers “mix” probability amplitudes and are required for non-trivial dynamics.

In step225, the quantum computer program may measure a parity of the Dicke state (+1 if even, −1 otherwise) and return the measurement to the classical computer program. In one embodiment, an operator composed of a tensor product of single-qubit Pauli Z operators (e.g., ⊗iZi) may be measured.

For example, to perform the measurement, the quantum computer program may initialize an auxiliary qubit (e.g., an ancilla) in the |0> state, apply a Hadamard gate, apply the operator composed of a tensor product of single-qubit Pauli Z operators (e.g., ⊗iZi) on the auxiliary qubit, apply a Hadamard gate a second time, and then measure the auxiliary qubit. The measurement of the auxiliary qubit may be returned to the classical computer program.

In step230, the quantum computer program may execute a next step (e.g., a second step, a third step, etc.) of the quantum optimization algorithm.

In step235, the quantum computer program may measure a parity of the Dicke state (+1 if even, −1 otherwise) and return the measurement to the classical computer program. This may be similar to step225, above.

In step240, the classical computer program may review the measurements to see if the parity has changed. If the parity has changed, indicating an error, in step245the classical computer program may instruct the quantum circuit to stop execution of the quantum circuit by, for example, instructing the quantum circuit to execute a termination instruction.

If the parity has not changed, in step250, a check is made to see if there are additional steps remaining in the quantum optimization algorithm execution. If there are, the process returns to step230, and the quantum computer continues executing the quantum program.

If there are no additional steps to execute, in step255, the results of the quantum optimization algorithm are returned to the classical computer program.

Referring toFIG.3, a method for efficient error mitigation in quantum circuit execution using symmetry-based unitary verification is disclosed according to another embodiment. The quantum steps applied iteratively as a part of the optimization procedure exhibit certain symmetries. For instance, in quantum optimization algorithm, the “phase operator” uses many two-qubit gates that are susceptible to noise. The phase operator, however, preserves the parity (or the number of ones) in any quantum state. Thus, embodiments measure the parity of the quantum state before and after the phase operator is executed. If the parity changes, execution is stopped, and an error is returned to the classical computer program.

An example of such measurements is provided in Alvin Gonzales et al., “Quantum Error Mitigation by Pauli Check Sandwiching” (2022) available at arXiv:2206.00215, the disclosure of which is hereby incorporated, by reference, in its entirety

In step305, a classical computer program may receive a quantum computer program for an optimization problem. In one embodiment, the quantum computer program may include measurement points for measuring a parity of the quantum state and termination instructions for terminating execution of the quantum circuit.

In step310, the classical computer may transpile the quantum computer program into a quantum circuit and may provide the quantum circuit to a quantum computer for execution.

In step315, the quantum computer may receive the quantum circuit from the classical computer program.

In step320, the quantum computer program may measure the parity of the quantum state, for example, measuring the auxiliary qubit. Measuring the auxiliary qubit ensures that the operator does not introduce any parity-violating errors. In one embodiment, the auxiliary qubit (e.g., ancilla) may be measured. The measurement of the auxiliary qubit may be returned to the classical computer program.

In step325, the quantum computer executes a phase operator in the quantum circuit. The phase operator is a product of ZZ gates, and thus cannot change parity that is measured by the operator composed of a tensor product of single-qubit Pauli Z operators (e.g., ⊗iZi).

Similarly, the XY mixer commutes with all operators composed of a tensor product of single-qubit Pauli Z operators, operators composed of a tensor product of single-qubit Pauli X operators, and operators composed of a tensor product of single-qubit Pauli Y operators (e.g., ⊗iZi, ⊗iXi, and ⊗iYi).

In step330, the quantum computer program may measure the parity of the quantum state by, for example, measuring the auxiliary qubit. The measurement of the auxiliary qubit may be returned to the classical computer program.

In step335, the classical computer program may review the measurements to see if the parity has changed. If the parity has changed, indicating an error, in step340the classical computer program may instruct the quantum circuit to stop execution of the quantum circuit by, for example, instructing the quantum circuit to execute a termination instruction.

If the parity has not changed, in step345, a check is made to see if there are additional steps remaining to execute. If there are, the process returns to step325.

If there are no additional steps to execute, in step350, the results of the execution are returned to the classical computer program.

Referring toFIG.4, a method for efficient error mitigation in quantum circuit execution using one-hot encoding verification is disclosed according to another embodiment. Instead of using binary optimization to solve an optimization problem, integer solutions may use one-hot encoding to solve the optimization problem.

The quantum optimization algorithm optimization procedure takes place in this encoded representation. Because noise can corrupt the one-hot encoding, after each quantum optimization algorithm step, a check is made to ensure that the one-hot encoding is preserved.

In step405, a classical computer program may receive a quantum computer program for an optimization problem. In one embodiment, the quantum computer program may include measurement points for measuring a parity the integer variables and termination instructions for terminating execution of the quantum circuit.

The classical computer program may use one-hot encoding to represent integers. For example, 0 may be encoded as |1000, 1 may be encoded as |0100, 2 may be encoded as |0010, and 3 may be encoded as |0001.

In step410, the classical computer program may rewrite the integer optimization problem by encoding the integer variables into binary variables using the one-hot encoding. For example, a portfolio optimization problem may be rewritten as maximize μ.x−λxTΣx with x∈{0,1,2,3}Nand μ, Σ, λ representing the “return” vector, the “risk” covariance matrix, and the “risk-tolerance” parameter, respectively.

In step415, the classical computer program may provide the quantum circuit with the rewritten optimization problem to a quantum computer.

In step420, the quantum computer may execute a first step of a quantum optimization algorithm, such as the QAOA.

In step425, the quantum computer program may measure the parity using, for example, an operator composed of a tensor product of single-qubit Pauli Z operators (⊗iZi) for each integer variable. A state that is properly encoded will return a value of −1. The measurement of the auxiliary qubits may be returned to the classical computer program.

In step430, if any of the measurements of the auxiliary qubits is a value other than −1, indicating an error, in step435, the classical computer may instruct the quantum circuit to stop execution of the quantum circuit by, for example, instructing the quantum circuit to execute a termination instruction.

If the value is −1, in step440, a check is made to see if there are additional steps remaining in the quantum optimization algorithm execution. If there are, the process returns to step420.

If there are no additional steps to execute, in step445, the results of the quantum optimization algorithm are returned to the classical computer program.