Search

US-12625712-B2 - Quantum virtual machine for simulation of a quantum processing system

US12625712B2US 12625712 B2US12625712 B2US 12625712B2US-12625712-B2

Abstract

Quantum operations can be simulated on a classical processing system using a quantum virtual machine (QVM). The QVM receives a quantum virtual state including a virtual wavefunction of n qubits. The virtual wavefunction is represented by probability amplitudes stored in a memory location of the classical processing system. The QVM simulates a received quantum operation by determining a set of virtual partial wavefunctions, accessing probability amplitudes for the virtual partial wavefunctions, and executing the quantum operation on the sub-bitstrings. The QVM can measure the result of the quantum operation, add noise, share the virtual wavefunction, or generate efficient machine instructions when simulating the quantum operation.

Inventors

  • Robert Stanley Smith

Assignees

  • RIGETTI & CO, LLC

Dates

Publication Date
20260512
Application Date
20190613

Claims (20)

  1. 1 . A method for determining a result of executing a quantum algorithm using a classical processing system, the method comprising: receiving, from a client device, the quantum algorithm for execution on the classical processing system to determine the result, the quantum algorithm comprising a quantum operation acting on at least one qubit of a virtual wavefunction comprising a plurality of qubits, each combination of qubits of the virtual wavefunction represented by a complex amplitude stored at a memory location of the classical processing system; determining, by the classical processing system and based on a number of quantum operations in the quantum algorithm, whether execution of the received quantum algorithm is more efficient on the classical processing system or on a quantum processing system; responsive to determining execution is more efficient on the classical processing system based on the number of quantum operations in the quantum algorithm: instantiating, by the classical processing system, a virtual quantum processing system configured to execute the quantum operation, the virtual quantum processing system configured to: identify a set of virtual partial wavefunctions based on the qubits the quantum operation acts on and the qubits of the virtual wavefunction, each virtual partial wavefunction comprising a proper subset of one or more complex amplitudes of the virtual wavefunction; access the proper subset of the one or more complex amplitudes of each virtual partial wavefunction in the set of virtual partial wavefunctions from a corresponding memory location of the classical processing system; execute the quantum operation on the accessed complex amplitudes for each virtual partial wavefunction in the proper subset of the set of virtual partial wavefunctions to determine resulting complex amplitudes, the resulting complex amplitudes representing a state evolution of the virtual wavefunction, the execution comprising: multiplying a matrix representing the quantum operation and a set of sub-bitstring vectors representing the virtual partial wavefunctions, wherein: a number of qubits the quantum operation acts on is k, a number of qubits in the virtual wavefunction is n, a number of sub-bitstring vectors is 2 n-k and a vector size of the sub-bitstring vectors is based on the number of qubits the quantum operation acts on, the number of the virtual partial wavefunctions is based on the number of qubits the quantum operation acts on k and a number of qubits in the virtual wavefunction, the matrix is stored in the classical processing system and has a matrix size based on the number of qubits the quantum operations acts on k, and the multiplication multiplies the matrix representing the quantum operation by the 2 n-k sub-bitstring vectors; and store the resulting complex amplitudes in the memory of the classical processing system; determining, by the virtual quantum processing system on the classical processing system, the result of executing the quantum algorithm based on the stored resulting complex amplitudes; and providing, by the classical processing system, the result of executing the quantum algorithm on the classical processing system to the client device; and responsive to determining execution is more efficient on the quantum processing system based on the number of quantum operations in the quantum algorithm: executing the quantum algorithm on the quantum processing system; and providing, the result of executing the quantum algorithm on the quantum processing system to the client device.
  2. 2 . The method of claim 1 , wherein the quantum operation is represented by a matrix stored in the classical processing system with a matrix size based on a number of the qubits of the virtual wavefunction that the quantum operation is acting on.
  3. 3 . The method of claim 2 , wherein the number of the qubits of the virtual wavefunction is k and the matrix size of the matrix representing the quantum operation is 2 k ×2 k .
  4. 4 . The method of claim 1 , wherein the virtual wavefunction is represented by a bitstring vector stored in the classical processing system with a bitstring vector size based on a number of qubits in the virtual wavefunction.
  5. 5 . The method of claim 4 , wherein the number of qubits in the virtual wavefunction is n and the bitstring vector size is 2 n .
  6. 6 . The method of claim 1 , wherein each of the virtual partial wavefunctions is represented by a bitstring sub-vector with a sub-bitstring vector sized based on the number of qubits the quantum operation is acting on.
  7. 7 . The method of claim 6 , wherein the number of qubits the quantum operation is acting on is k and the sub-bitstring vector size is 2 k .
  8. 8 . The method of claim 1 , further comprising: determining a stochastic quantum operation to introduce stochastic errors in the virtual wavefunction when the quantum operation is executed such that the determined result includes stochastic error, the stochastic quantum operation being based on the quantum algorithm; and executing the stochastic quantum operation.
  9. 9 . The method of claim 1 , further comprising: determining a unitary quantum operation to introduce unitary errors in the virtual wavefunction when the quantum operation is executed such that the determined result includes unitary error, the unitary quantum operation being based on the quantum algorithm; and executing the unitary quantum operation.
  10. 10 . The method of claim 1 , wherein the complex amplitudes of each combination of qubits in the virtual wavefunction are accessible by an alternate processor of the classical processing system.
  11. 11 . The method of claim 1 , wherein the quantum operation is executed on each virtual partial wavefunction of the set of quantum sub-bitstrings by separate processors of the classical processing system.
  12. 12 . The method of claim 1 , wherein determining the result of the quantum algorithm comprises: simulating a quantum measurement on at least one qubit of the virtual wavefunction based on the resulting complex amplitudes and a set of basis states for the quantum measurement.
  13. 13 . The method of claim 1 , wherein executing the quantum operation further comprises: generating a set of machine instructions to execute the quantum operation on the set of virtual partial wavefunctions, wherein the set of machine instructions are executed by the classical processing system.
  14. 14 . The method of claim 1 , wherein the determination to instantiate the virtual quantum processing is based on a number of the plurality of qubits included in the quantum algorithm.
  15. 15 . The method of claim 1 , wherein the virtual quantum processing system is an application downloadable from a remote network system via a network.
  16. 16 . The method of claim 1 , wherein the client device is an application executing on a partition of the classical processing system.
  17. 17 . The method of claim 1 , wherein the quantum operation is a density operator.
  18. 18 . The method of claim 17 , wherein the density operator is a Krauss operator.
  19. 19 . The method of claim 1 , wherein the virtual wavefunction comprising the plurality of qubits is a concatenated density matrix comprising a plurality of values representing a probability distribution.
  20. 20 . The method of claim 1 , wherein the client device is the classical processing system.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of U.S. Provisional application No. 62/684,609 filed on Jun. 13, 2018, which is incorporated in its entirety by this reference. BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates generally to executing algorithms on a hybrid classical/quantum computing system, and in particular to a quantum virtual machine for simulating the quantum hardware operations on a classical computation system. 2. Description of the Related Art Quantum computation systems excel at solving complex problems which are often unsolvable using classical computation systems. However, physical quantum computation systems of the desired computing power may not be presently available with enough fidelity or performance to execute certain quantum algorithms of interest. Additionally, debugging algorithms on physical hardware is an expensive endeavor. Therefore, in such cases, it would be beneficial to be able to simulate the execution of a quantum algorithm on a quantum computation system having the desired properties (e.g., a given large number of qubits), even though such a system is not yet readily available, or not available at all. SUMMARY OF THE INVENTION A system and method for determining the result of a quantum operation included in a hybrid algorithm (e.g., an algorithm including quantum and classical processing instructions executed in concert) using a quantum virtual machine allows for classical processors to simulate quantum operations that would, otherwise, be executed on a quantum processing system. Herein a “quantum virtual machine” is a classical implementation of a “quantum abstract machine”, such as the hybrid classical/quantum computing model described in the paper “A Practical Quantum Instruction Set Architecture,” arXiv:1608.03355v2. The system determines whether or not to execute the hybrid algorithm using the quantum virtual machine based on the number of quantum operations and number of qubits included in the hybrid algorithm. The hybrid algorithm includes a quantum virtual state including a number of qubits (a virtual wavefunction). The system stores every possible combination of qubits in the virtual wavefunction as probability amplitudes in memory locations of a (shared) memory. The hybrid algorithm includes a quantum operation that acts on a subset of the qubits in the virtual wavefunction. The system simulates the hybrid algorithm using a classical processor by executing a classical representation of the quantum operation on the virtual wavefunction and manipulating the complex amplitudes stored in the memory locations. To execute the algorithm, the system determines a number of virtual partial wavefunctions based on the number of qubits represented by the virtual wavefunction (total qubits) and the number of qubits the quantum operation acts on (acted-on qubits). The qubits that an operation acts on determines the Hilbert subsystem in which the wavefunction state is changed. The system also determines elements of the virtual partial wavefunctions and the order of the elements in the virtual partial wavefunctions based on the total qubits and acted-on qubits. Each element of a virtual partial wavefunction is a probability amplitude stored in a memory location. The system accesses the elements of each virtual wavefunction and applies a classical representation of the quantum operation by the virtual partial wavefunction. Each application yields a resulting virtual partial wavefunction including resulting complex amplitudes as the elements. Each resulting complex amplitude of the resulting virtual partial wavefunction is stored in a corresponding memory location of the shared memory. The system determines the result of the quantum operation based on the resulting complex amplitudes. In a particular example, the system executes a quantum algorithm using a classical processing system to determine a result of the quantum algorithm. To do so the system receives the quantum algorithm from a client device. The quantum algorithm includes a quantum operation acting on at least one qubit of a virtual wavefunction. The virtual wavefunction includes a plurality of qubits, each combination of qubits of the virtual wavefunction represented by a complex amplitude stored at a memory location of the classical processing system. The classical processing system instantiates a virtual quantum processing system on a datastore of the classical processing system. The virtual quantum processing system is configured to execute the quantum operation. To do so, the virtual quantum processing system, using classical processors, identifies a set of virtual partial wavefunctions based on the qubits the quantum operation acts on and the qubits of the virtual wavefunction. Each virtual partial wavefunction includes one or more complex amplitudes of the virtual wavefunction. The virtual quantum processing system accesses the one or more complex a