# US 2023/0274178 A1 · Debugging executing quantum services using service definition layers

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

- Number: US 2023/0274178 A1
- Document ID: US20230274178A1
- Status: Published application
- Kind: A1
- Application number: 17/680,601
- Filed: 2022-02-25
- Published: 2023-08-31
- Earliest claimed: 2022-02-25
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Leigh Griffin; Stephen Coady
- Web page: https://patentgrep.com/patent/US20230274178A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- 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 11/3698: Environments for analysis, debugging or testing of software
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Debugging executing quantum services using service definition layers is disclosed herein. In one example, a processor device of a quantum computing device receives a request to debug an executing quantum service defined by a quantum service definition file. In response, the processor device suspends execution of the quantum service, and determines a next instruction to be executed within the quantum service definition file. The processor device next identifies a service definition layer associated with the quantum service definition file and corresponding to the next instruction, wherein the service definition layer comprises the next instruction and any instructions preceding the next instruction. The processor device then executes the service definition layer.

## Claims

### Claim 1

A method, comprising:
receiving, by a quantum computing device from a requestor, a request to debug an executing quantum service defined by a quantum service definition file;
suspending, by the quantum computing device, execution of the quantum service;
determining, by the quantum computing device, a next instruction to be executed within the quantum service definition file;
identifying, by the quantum computing device, a service definition layer associated with the quantum service definition file and corresponding to the next instruction, wherein the service definition layer comprises the next instruction and any instructions preceding the next instruction; and
executing, by the quantum computing device, the service definition layer.

### Claim 2 (depends on 1)

The method of claim 1, further comprising providing, by the quantum computing device, a result of executing the service definition layer to the requestor.

### Claim 3 (depends on 2)

The method of claim 2, wherein:
providing the result comprises querying, by the quantum computing device, a qubit registry of the quantum computing device to obtain the result; and
the result comprises one or more of a quantum state of a qubit during execution of the service definition layer or a data value stored by a qubit during execution of the service definition layer.

### Claim 4 (depends on 1)

The method of claim 1, wherein receiving the request to debug the executing quantum service is responsive to detection of a breakpoint within the quantum service definition file.

### Claim 5 (depends on 1)

The method of claim 1, wherein receiving the request to debug the executing quantum service comprises receiving a user input requesting an interruption of execution of the quantum service.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
determining the next instruction to be executed comprises receiving a user input indicating the next instruction; and
the next instruction comprises an instruction immediately subsequent to a most recently executed instruction, an instruction immediately preceding the most recently executed instruction, or a user-selected instruction within the quantum service definition file.

### Claim 7 (depends on 1)

The method of claim 1, further comprising, prior to receiving the request:
generating a plurality of service definition layers associated with the quantum service definition file, wherein:
each service definition layer of the plurality of service definition layers comprises a respective one or more instructions of the quantum service definition file and any instructions preceding the one or more instructions; and
the plurality of service definition layers comprises the service definition layer; and
storing the plurality of service definition layers in association with the quantum service definition file.

### Claim 8

A quantum computing device, comprising:
a system memory; and
a processor device communicatively coupled to the system memory, the processor device to:
receive, from a requestor, a request to debug an executing quantum service defined by a quantum service definition file;
suspend execution of the quantum service;
determine a next instruction to be executed within the quantum service definition file;
identify a service definition layer associated with the quantum service definition file and corresponding to the next instruction, wherein the service definition layer comprises the next instruction and any instructions preceding the next instruction; and
execute the service definition layer.

### Claim 9 (depends on 8)

The quantum computing device of claim 8, wherein the processor device is further to provide a result of executing the service definition layer to the requestor.

### Claim 10 (depends on 9)

The quantum computing device of claim 9, wherein:
to provide the result is to query a qubit registry of the quantum computing device to obtain the result; and
the result comprises one or more of a quantum state of a qubit during execution of the service definition layer or a data value stored by a qubit during execution of the service definition layer.

### Claim 11 (depends on 8)

The quantum computing device of claim 8, wherein to receive the request to debug the executing quantum service is to receive the request responsive to detection of a breakpoint within the quantum service definition file.

### Claim 12 (depends on 8)

The quantum computing device of claim 8, wherein to receive the request to debug the executing quantum service is to receive a user input requesting an interruption of execution of the quantum service.

### Claim 13 (depends on 8)

The quantum computing device of claim 8, wherein:
to determine the next instruction to be executed is to receive a user input indicating the next instruction; and
the next instruction comprises an instruction immediately subsequent to a most recently executed instruction, an instruction immediately preceding the most recently executed instruction, or a user-selected instruction within the quantum service definition file.

### Claim 14 (depends on 8)

The quantum computing device of claim 8, wherein the processor device is further to, prior to receiving the request:
generate a plurality of service definition layers associated with the quantum service definition file, wherein:
each service definition layer of the plurality of service definition layers comprises a respective one or more instructions of the quantum service definition file and any instructions preceding the one or more instructions; and
the plurality of service definition layers comprises the service definition layer; and
store the plurality of service definition layers in association with the quantum service definition file.

### Claim 15

A non-transitory computer-readable medium having stored thereon computer-executable instructions that, when executed, cause one or more processor devices of a quantum computing device to:
receive, from a requestor, a request to debug an executing quantum service defined by a quantum service definition file;
suspend execution of the quantum service;
determine a next instruction to be executed within the quantum service definition file;
identify a service definition layer associated with the quantum service definition file and corresponding to the next instruction, wherein the service definition layer comprises the next instruction and any instructions preceding the next instruction; and
execute the service definition layer.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the computer-executable instructions further cause the one or more processor devices to provide a result of executing the service definition layer to the requestor.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein:
to provide the result is to query a qubit registry of the quantum computing device to obtain the result; and
the result comprises one or more of a quantum state of a qubit during execution of the service definition layer or a data value stored by a qubit during execution of the service definition layer.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein to receive the request to debug the executing quantum service is to receive the request responsive to detection of a breakpoint within the quantum service definition file.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein to receive the request to debug the executing quantum service is to receive a user input requesting an interruption of execution of the quantum service.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein:
to determine the next instruction to be executed is to receive a user input indicating the next instruction; and
the next instruction comprises an instruction immediately subsequent to a most recently executed instruction, an instruction immediately preceding the most recently executed instruction, or a user-selected instruction within the quantum service definition file.
