# US 2021/0334081 A1 · System and method of optimizing instructions for quantum computers

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334081 A1
- Document ID: US20210334081A1
- Status: Published application
- Kind: A1
- Application number: 17/273,938
- Filed: 2019-09-12
- Published: 2021-10-28
- Earliest claimed: 2018-09-13
- Assignees: The University of Chicago
- Applicants: University of Chicago
- Inventors: Frederic T. Chong; Yunong Shi, I; Nelson Leung; Pranav Gokhale; Henry Hoffmann; David Schuster
- Web page: https://patentgrep.com/patent/US20210334081A1

## CPC

- G06F 8/443: {Optimisation}
- G06F 8/456: {Parallelism detection}
- G06F 9/48: Program initiating; Program switching, e.g. by interrupt
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06N 10/80: Quantum programming, e.g. interfaces, languages or software-development kits for creating or handling programs capable of running on quantum computers; Platforms for simulating or accessing quantum computers, e.g. cloud-based quantum computing
- G06F 8/41: Compilation
- G06F 8/47: {Retargetable compilers}
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- H03K 3/00: Circuits for generating electric pulses; Monostable, bistable or multistable circuits (H03K4/00 takes precedence; for digital function generators in computers G06F1/02)
- H03K 5/00: Manipulating of pulses not covered by one of the other main groups of this subclass (circuits with regenerative action H03K3/00, H03K4/00; by the use of non-linear magnetic or dielectric devices H03K3/45)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- H03K: PULSE TECHNIQUE (measuring pulse characteristics G01R; modulating sinusoidal oscillations with pulses H03C; transmission of digital information H04L; discriminator circuits detecting phase difference between two signals by counting or integrating cycles of oscillation H03D3/04; automatic control, starting, synchronisation or stabilisation of generators of electronic oscillations or pulses where the type of generator is irrelevant or unspecified H03L; coding, decoding or code conversion, in general H03M)

## Abstract

A quantum computing system includes a quantum processor having a plurality of qubits, a classical memory, and a classical processor. The classical processor is configured to compile a quantum program into logical assembly instructions in an intermediate language, aggregate the logical assembly instructions together into a plurality of logical blocks of instructions, generate a logical schedule for the quantum program based on commutativity between the plurality of logical blocks, generate a tentative physical schedule based on the logical schedule, the tentative physical schedule includes a mapping of the logical assembly instructions in the logical schedule onto the plurality of qubits of the quantum processor, aggregate instructions together within the tentative physical schedule that do not reduce parallelism, thereby generating an updated physical schedule; generate optimized control pulses for the aggregated instructions, and execute the quantum program on the quantum processor with the optimized control pulses and the updated physical schedule.

## Claims

### Claim 1

A quantum computing system for compiling and executing instructions on a quantum processor, the system comprising:
the quantum processor including a plurality of qubits;
a classical memory including a quantum program, the quantum program defines a plurality of instructions in a source language; and
a classical processor communicatively coupled to the classical memory, the memory including computer-executable instructions that, when executed by the classical processor, cause the classical processor to:
compile the quantum program into logical assembly instructions in an intermediate language;
aggregate the logical assembly instructions together into a plurality of logical blocks of instructions;
generate a logical schedule for the quantum program based on commutativity between the plurality of logical blocks;
generate a tentative physical schedule based on the logical schedule, the tentative physical schedule includes a mapping of the logical assembly instructions in the logical schedule onto the plurality of qubits of the quantum processor;
aggregate instructions together within the tentative physical schedule that do not reduce parallelism, thereby generating an updated physical schedule;
generate optimized control pulses for the aggregated instructions of the quantum program; and
execute the quantum program on the quantum processor with the optimized control pulses and the updated physical schedule.

### Claim 2 (depends on 1)

The quantum computing system of claim 1, wherein the instructions further cause the processor to:
generate a gate dependence graph for the quantum program from the logical assembly instructions,
wherein aggregating sets of logical assembly instructions together further includes determining commutativity in the gate dependency graph, wherein the aggregating is based on aggregation rules defined on the gate dependence graph.

### Claim 3 (depends on 2)

The quantum computing system of claim 2, wherein determining commutativity in the gate dependency graph includes forming one or more intermediate aggregated instructions within the gate dependency graph.

### Claim 4 (depends on 2)

The quantum computing system of claim 2, wherein the instructions further cause the processor to:
determine priority values for each instruction in the quantum program by:
identifying, for a particular instruction, each parent of the particular instruction from the gate dependency graph;
for each identified parent of the particular instruction, subtracting a latency of the parent from a priority value of the parent, thereby identifying a potential priority value for the particular instruction; and
assigning a minimal potential priority value to the particular instruction from the identified potential priority values of the identified parents; and
schedule each instruction in the quantum program based on the assigned priority value.

### Claim 5 (depends on 2)

The quantum computing system of claim 2, wherein aggregating instructions together in the tentative physical schedule comprises:
identifying a monotonic action involving aggregation of two or more instructions within the gate dependence graph that does not delay critical paths within the gate dependence graph;
aggregating the two or more instructions within the gate dependence graph;
updating the latency of each aggregated instruction; and
scheduling a circuit of aggregated instructions based on the gate dependence graph.

### Claim 6 (depends on 5)

The quantum computing system of claim 5, wherein executing the quantum program further includes transmitting control pulse sequences to the quantum processor based on the circuit of aggregated instructions.

### Claim 7 (depends on 1)

The quantum computing system of claim 1, wherein aggregating the logical assembly instructions further includes aggregating a first set of logical assembly instructions the product of which are diagonal unitaries.

### Claim 8

A computer-implemented method for compiling instructions for a quantum computer, the method is implemented using a classical processor in communication with a classical memory, the method comprising:
receiving a quantum program from a user, the quantum program defining a plurality of instructions in a source language;
compiling the quantum program into logical assembly instructions in an intermediate language;
aggregating the logical assembly instructions together into a plurality of logical blocks of instructions;
generating a logical schedule for the quantum program based on commutativity between the plurality of logical blocks;
generating a tentative physical schedule based on the logical schedule, the tentative physical schedule including a mapping of the logical assembly instructions in the logical schedule onto a plurality of qubits of a quantum processor;
aggregating instructions together in the tentative physical schedule that do not reduce parallelism, thereby generating an updated physical schedule;
generating optimized control pulses for the aggregated instructions of the quantum program; and
executing the quantum program on the quantum processor with the optimized control pulses and the updated physical schedule.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
generating a gate dependence graph for the quantum program from the logical assembly instructions,
wherein aggregating sets of logical assembly instructions together further includes determining commutativity in the gate dependency graph, wherein the aggregating is based on aggregation rules defined on the gate dependency graph.

### Claim 10 (depends on 9)

The method of claim 9, wherein determining commutativity in the gate dependency graph includes forming one or more intermediate aggregated instructions within the gate dependency graph.

### Claim 11 (depends on 9)

The method of claim 9, further comprising:
determining priority values for each instruction in the quantum program by:
identifying, for a particular instruction, each parent of the particular instruction from the gate dependency graph;
for each identified parent of the particular instruction, subtracting a latency of the parent from a priority value of the parent, thereby identifying a potential priority value for the particular instruction; and
assigning a minimal potential priority value to the particular instruction from the identified potential priority values of the identified parents; and
scheduling each instruction in the quantum program based on the assigned priority value.

### Claim 12 (depends on 9)

The method of claim 9, wherein aggregating instructions together in the tentative physical schedule comprises:
identifying a monotonic action involving aggregation of two or more instructions within the gate dependence graph that does not delay critical paths within the gate dependence graph;
aggregating the two or more instructions within the gate dependence graph;
updating the latency of each aggregated instruction; and
scheduling a circuit of aggregated instructions based on the gate dependence graph.

### Claim 13 (depends on 12)

The method of claim 12, wherein executing the quantum program further includes transmitting control pulse sequences to the quantum processor based on the circuit of aggregated instructions.

### Claim 14 (depends on 8)

The method of claim 8, wherein aggregating the logical assembly instructions further includes aggregating a first set of logical assembly instructions the product of which are diagonal unitaries.

### Claim 15

A non-transitory computer-readable storage media having computer-executable instructions embodied thereon, wherein when executed by at least one classical processor, the computer-executable instructions cause the classical processor to:
receive a quantum program from a user, the quantum program defining a plurality of instructions in a source language;
compile the quantum program into logical assembly instructions in an intermediate language;
aggregate the logical assembly instructions together into a plurality of logical blocks of instructions;
generate a logical schedule for the quantum program based on commutativity between the plurality of logical blocks;
generate a tentative physical schedule based on the logical schedule, the tentative physical schedule including a mapping of the logical assembly instructions in the logical schedule onto a plurality of qubits of a quantum processor;
aggregate instructions together in the tentative physical schedule that do not reduce parallelism, thereby generating an updated physical schedule;
generate optimized control pulses for the aggregated instructions of the quantum program; and
execute the quantum program on the quantum processor with the optimized control pulses and the updated physical schedule.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage media of claim 15, wherein the computer-executable instructions further cause the classical processor to:
generate a gate dependence graph for the quantum program from the logical assembly instructions,
wherein aggregating sets of logical assembly instructions together further includes determining commutativity in the gate dependency graph, wherein the aggregating is based on aggregation rules defined on the gate dependency graph.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage media of claim 16, wherein determining commutativity in the gate dependency graph includes forming one or more intermediate aggregated instructions within the gate dependency graph.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage media of claim 16, wherein the computer-executable instructions further cause the classical processor to:
determine priority values for each instruction in the quantum program by:
identifying, for a particular instruction, each parent of the particular instruction from the gate dependency graph;
for each identified parent of the particular instruction, subtracting a latency of the parent from a priority value of the parent, thereby identifying a potential priority value for the particular instruction; and
assigning a minimal potential priority value to the particular instruction from the identified potential priority values of the identified parents; and
schedule each instruction in the quantum program based on the assigned priority value.

### Claim 19 (depends on 16)

The non-transitory computer-readable storage media of claim 16, wherein aggregating instructions together in the tentative physical schedule comprises:
identifying a monotonic action involving aggregation of two or more instructions within the gate dependence graph that does not delay critical paths within the gate dependence graph;
aggregating the two or more instructions within the gate dependence graph;
updating the latency of each aggregated instruction; and
scheduling a circuit of aggregated instructions based on the gate dependence graph.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage media of claim 15, wherein aggregating the logical assembly instructions further includes aggregating a first set of logical assembly instructions the product of which are diagonal unitaries.

### Claim 21

A quantum compilation engine for compiling a quantum program to be executed on quantum processor that includes a plurality of qubits, the quantum compilation engine comprising:
a classical memory including the quantum program, the quantum program defines a plurality of instructions in a source language; and
a classical processor communicatively coupled to the memory, the memory including computer-executable instructions that, when executed by the classical processor, cause the classical processor to:
compile the quantum program into logical assembly instructions in an intermediate language;
aggregate the logical assembly instructions together into a plurality of logical blocks of instructions;
generate a logical schedule for the quantum program based on commutativity between the plurality of logical blocks;
generate a tentative physical schedule based on the logical schedule, the tentative physical schedule includes a mapping of the logical assembly instructions in the logical schedule onto the plurality of qubits of the quantum processor;
aggregate instructions together within the tentative physical schedule that do not reduce parallelism, thereby generating an updated physical schedule; and
generate a pulse specification based on the updated physical schedule.
