Parallel execution of quantum programs
A method, apparatus and product for executing a quantum circuit by a quantum execution platform, comprising: obtaining the quantum circuit, the quantum circuit comprises first and second qubit allocation instructions, the first qubit allocation instruction instructing to obtain a first set of qubits at an initial cycle, the second qubit allocation instruction instructing to obtain a second set of qubits at an intermediate cycle ordered after the initial cycle; performing an execution of cycles of the quantum circuit, said performing comprises allocating, for the initial cycle, qubits from a qubit pool to be utilized by the quantum circuit, the qubits corresponding to the first set of qubits; and in response to the execution reaching the intermediate cycle, dynamically allocating at least one additional qubit from the qubit pool to be utilized by the quantum circuit, the at least one additional qubit corresponding to the second set of qubits.
1 . A method comprising:
obtaining a first quantum circuit;
obtaining a second quantum circuit;
initiating execution of the first quantum circuit on a quantum execution platform;
during execution of the first quantum circuit, initiating execution of the second quantum circuit on the quantum execution platform in parallel with the first quantum circuit; and
sharing quantum resources between the first quantum circuit and the second quantum circuit during their parallel execution, said sharing comprising allocating at least one qubit from the first quantum circuit to perform one or more operations of the second quantum circuit during execution, wherein the at least one qubit is an idle qubit in the first quantum circuit.
2 . The method of claim 1 , wherein the idle qubit is allocated to the second quantum circuit for a predetermined number of cycles.
3 . The method of claim 2 , further comprising returning the allocated qubit to the first quantum circuit after the predetermined number of cycles.
4 . The method of claim 1 , wherein sharing quantum resources comprises dynamically allocating qubits between the first and second quantum circuits based on real-time availability.
5 . The method of claim 4 , further comprising maintaining a qubit pool to track available qubits for allocation between the first and second quantum circuits.
6 . The method of claim 5 , wherein the qubit pool comprises at least one of: clean qubits, dirty qubits, auxiliary qubits, or non-auxiliary qubits.
7 . A system for executing quantum circuits in parallel, comprising:
a quantum execution platform; and
a processor configured to:
obtain a first quantum circuit;
obtain a second quantum circuit;
initiate execution of the first quantum circuit on the quantum execution platform;
during execution of the first quantum circuit, initiate execution of the second quantum circuit on the quantum execution platform in parallel with the first quantum circuit; and
manage sharing of quantum resources between the first quantum circuit and the second quantum circuit during their parallel execution, said sharing comprising allocating at least one qubit from the first quantum circuit to perform one or more operations of the second quantum circuit during execution,
wherein the at least one qubit is an idle qubit in the first quantum circuit.
8 . The system of claim 7 , wherein the processor is further configured to allocate the idle qubit to the second quantum circuit for a predetermined number of cycles.
9 . The system of claim 8 , wherein the processor is further configured to return the allocated qubit to the first quantum circuit after the predetermined number of cycles.
10 . The system of claim 7 , wherein the processor is further configured to dynamically allocate qubits between the first and second quantum circuits based on real-time availability.
11 . The system of claim 10 , wherein the processor is further configured to maintain a qubit pool to track available qubits for allocation between the first and second quantum circuits.
12 . The system of claim 11 , wherein the qubit pool comprises at least one of: clean qubits, dirty qubits, auxiliary qubits, or non-auxiliary qubits.
13 . A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform operations for executing quantum circuits, the operations comprising:
obtaining a first quantum circuit and a second quantum circuit;
initiating execution of the first quantum circuit on a quantum execution platform;
during execution of the first quantum circuit, initiating execution of the second quantum circuit on the quantum execution platform in parallel with the first quantum circuit; and
sharing quantum resources between the first quantum circuit and the second quantum circuit during their parallel execution, said sharing comprising allocating at least one qubit from the first quantum circuit to perform one or more operations of the second quantum circuit during execution,
wherein the at least one qubit is an idle qubit in the first quantum circuit.
14 . The non-transitory computer-readable medium of claim 13 , wherein the operations further comprise allocating the idle qubit to the second quantum circuit for a predetermined number of cycles.
15 . The non-transitory computer-readable medium of claim 14 , wherein the operations further comprise returning the allocated qubit to the first quantum circuit after the predetermined number of cycles.
16 . The non-transitory computer-readable medium of claim 13 , wherein sharing quantum resources comprises dynamically allocating qubits between the first and second quantum circuits based on real-time availability.
17 . The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise maintaining a qubit pool to track available qubits for allocation between the first quantum circuit and the second quantum circuit, wherein the qubit pool comprises at least one of: clean qubits, dirty qubits, auxiliary qubits, or non-auxiliary qubits.