# US 11,119,773 B1 · Runtime quantum-memory management

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

- Number: US 11,119,773 B1
- Document ID: US11119773B1
- Status: Granted
- Kind: B1
- Application number: 16/844,948
- Filed: 2020-04-09
- Granted: 2021-09-14
- Earliest claimed: 2020-04-09
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Mathias Soeken; Martin Henri Roetteler; Krysta Marie Svore
- Web page: https://patentgrep.com/patent/US11119773B1

## CPC

- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- G06F 9/30101: {Special purpose registers}
- G06F 15/82: data or demand driven
- G06F 16/9027: {Trees}
- G06N 10/40: Physical realisations or architectures of quantum processors or components for manipulating qubits, e.g. qubit coupling or qubit control
- G06N 10/70: Quantum error correction, detection or prevention, e.g. surface codes or magic state distillation
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for performing a quantum-logic operation on a quantum computer. The method includes enacting classical pebbling on an initial computation graph G defining the quantum-logic operation; extracting a quantum circuit B based on a sequence of steps obtained from the classical pebbling, that sequence including at least one computation step and at least one measurement-based uncomputation step; executing the quantum circuit B on a qubit register of the quantum computer; recording at least one measurement result of the at least one measurement-based uncomputation step of the quantum circuit B as executed on the qubit register; constructing a clean-up computation graph G′ based on the at least one measurement result; enacting reversible pebbling on the clean-up computation graph G′; extracting a quantum circuit B′ based on a sequence of steps obtained from the reversible pebbling, that sequence including computation and uncomputation steps; and executing the quantum circuit B′ on the qubit register.

## Claims

### Claim 1

Enacted in a controller system of a quantum computer, a method for performing a quantum-logic operation on the quantum computer, the method comprising:
enacting classical pebbling on an initial computation graph G defining the quantum-logic operation;
extracting a quantum circuit B based on a sequence of steps obtained from the classical pebbling, that sequence including at least one computation step and at least one measurement-based uncomputation step;
executing the quantum circuit B on a qubit register of the quantum computer;
recording at least one measurement result of the at least one measurement-based uncomputation step of the quantum circuit B as executed on the qubit register;
constructing a clean-up computation graph G′ based on the at least one measurement result;
enacting reversible pebbling on the clean-up computation graph G′;
extracting a quantum circuit B′ based on a sequence of steps obtained from the reversible pebbling, that sequence including computation and uncomputation steps; and
executing the quantum circuit B′ on the qubit register.

### Claim 2 (depends on 1)

The method of claim 1 wherein the at least one measurement-based uncomputation step corresponds to one of a restricted subset of elementary operations of the initial computation graph G.

### Claim 3 (depends on 1)

The method of claim 1 wherein extracting the quantum circuit B′ comprises selecting from a plurality of pre-computed quantum circuits corresponding each to a possible measurement result of the at least one measurement-based uncomputation step.

### Claim 4 (depends on 1)

The method of claim 1 further comprising receiving as input an indication of an available number of qubits of the qubit register, wherein one or more of the classical pebbling and the reversible pebbling are enacted based on the available number of qubits.

### Claim 5 (depends on 1)

The method of claim 1 wherein the classical pebbling is enacted based on a cost of implementation of each of the sequence of steps obtained from the classical pebbling, and wherein the reversible pebbling is enacted based on a cost of implementation of each of the sequence of steps obtained from the reversible pebbling.

### Claim 6 (depends on 1)

The method of claim 1 wherein the initial computation graph G comprises a tree structure.

### Claim 7 (depends on 1)

The method of claim 1 wherein the reversible pebbling is enacted and the quantum circuit B′ extracted and executed only if an estimated cost of executing the quantum circuit B′ is below a threshold, the method further comprising estimating the estimated cost.

### Claim 8 (depends on 7)

The method of claim 7 further comprising, if the estimated cost is above the threshold:
enacting classical pebbling on the clean-up computation graph G′;
extracting an alternative quantum circuit based on a sequence of steps obtained from the classical pebbling of G′; and
executing the alternative quantum circuit on the qubit register.

### Claim 9 (depends on 8)

The method of claim 8 wherein execution of the alternative quantum circuit is followed by recording of at least one subsequent measurement result and constructing at least one subsequent clean-up computation graph in an iterative manner.

### Claim 10 (depends on 7)

The method of claim 7 wherein the estimated cost increases with increasing size of the clean-up computation graph G′.

### Claim 11 (depends on 1)

The method of claim 1 wherein the sequence of steps obtained from the classical pebbling includes at least one non-measurement-based uncomputation step.

### Claim 12

Enacted in a controller system of a quantum computer, a method for executing a quantum program on the quantum computer, the method comprising:
receiving the quantum program;
executing a portion of the quantum program in a qubit register of the quantum computer;
propagating a dynamic computation graph defining the executed portion of the quantum program;
selecting an operation in the executed portion of the quantum program; and
enacting measurement-based uncomputation on the selected operation in the qubit register.

### Claim 13 (depends on 12)

The method of claim 12 further comprising employing a look-up of one or more operations in the executed portion of the quantum program, wherein the measurement-based uncomputation is enacted based on the look-up.

### Claim 14 (depends on 13)

The method of claim 13 wherein the look-up comprises evaluations of one or more cost functions applied to the executed portion of the quantum program.

### Claim 15 (depends on 12)

The method of claim 12, further comprising applying heuristic static pre-analysis of the quantum program prior to executing the portion of the quantum program.

### Claim 16 (depends on 12)

The method of claim 12 wherein the operation is selected and the measurement-based uncomputation enacted only if fewer than a threshold number of free qubits are available in the qubit register.

### Claim 17 (depends on 16)

The method of claim 16 further comprising executing at least one subsequent portion of the quantum program and propagating at least one subsequent dynamic computation graph if greater than the threshold number of free qubits are available in the qubit register.

### Claim 18 (depends on 12)

The method of claim 12 wherein the operation is selected and the measurement-based uncomputation enacted only if the quantum program is not finished, the method further comprising receiving an output of the quantum program if the quantum program is finished.

### Claim 19

A quantum computer comprising:
a qubit register including a plurality of qubits;
a modulator configured to implement one or more quantum-logic operations on the plurality of qubits;
a demodulator configured to output data exposing a quantum state of the plurality of qubits;
a controller operatively coupled to the modulator and to the demodulator; and
computer memory holding instructions that cause the controller to:
enact classical pebbling on an initial computation graph G defining the quantum-logic operation;
extract a quantum circuit B based on a sequence of steps obtained from the classical pebbling, that sequence including at least one computation step and at least one measurement-based uncomputation step;
execute the quantum circuit B on a qubit register of the quantum computer;
record at least one measurement result of the at least one measurement-based uncomputation step of the quantum circuit B as executed on the qubit register;
construct a clean-up computation graph G′ based on the at least one measurement result;
enact reversible pebbling on the clean-up computation graph G′;
extract a quantum circuit B′ based on a sequence of steps obtained from the reversible pebbling, that sequence including computation and uncomputation steps; and
execute the quantum circuit B′ on the qubit register.

### Claim 20 (depends on 19)

The quantum computer of claim 19 wherein the quantum-logic operation is a selected quantum-logic operation in a portion of a quantum program, and wherein the instructions further cause the controller to:
execute the portion of the quantum program;
propagate the initial computation graph, which defines the portion of the quantum program; and
enact measurement-based uncomputation on the selected operation if a number of free qubits in a qubit register of the quantum computer is below a threshold.
