# US 2022/0292243 A1 · Batched quantum circuits simulation on a graphics processing unit

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

- Number: US 2022/0292243 A1
- Document ID: US20220292243A1
- Status: Published application
- Kind: A1
- Application number: 17/197,647
- Filed: 2021-03-10
- Published: 2022-09-15
- Earliest claimed: 2021-03-10
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Jun Doi
- Web page: https://patentgrep.com/patent/US20220292243A1

## CPC

- G06F 30/3308: using simulation
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- G06N 10/00: Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06F 30/343: Logical level
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Systems, computer-implemented methods, and computer program products to facilitate batched quantum circuits simulation on a graphics processing unit are provided. According to an embodiment, a system can comprise a first processor that executes computer executable components stored in memory. The computer executable components can comprise a generalization component that generates a first defined matrix representation of a qubit gate and that employs a control mask to generate a second defined matrix representation of a multi-qubit gate. The computer executable components can further comprise an execution component that executes a kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate a batched kernel.

## Claims

### Claim 1

A system, comprising:
a first processor that executes computer executable components stored in memory, the computer executable components comprising:
a generalization component that generates a first defined matrix representation of a qubit gate and that employs a control mask to generate a second defined matrix representation of a multi-qubit gate; and
an execution component that executes a kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate a batched kernel.

### Claim 2 (depends on 1)

The system of claim 1, further comprising:
a second processor that executes a simulation component that simulates the qubit gate and the multi-qubit gate using the batched kernel and parallel processing threads, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor.

### Claim 3 (depends on 1)

The system of claim 1, further comprising:
a second processor that executes a simulation component that simulates the qubit gate and the multi-qubit gate using the batched kernel, a batched measure, and parallel processing threads, and wherein the batched measure accumulates probability measurements associated with concurrent simulation of the qubit gate and the multi-qubit gate, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor.

### Claim 4 (depends on 1)

The system of claim 1, wherein the generalization component generates at least one of the first defined matrix representation or the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 5 (depends on 1)

The system of claim 1, wherein the multi-qubit gate comprises a control qubit, and wherein the generalization component generates the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes having defined criteria, and wherein the pairs of two probability amplitudes are of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 6 (depends on 1)

The system of claim 1, wherein the computer executable components further comprise:
a storage component that causes to be stored, in multiple queues, parameters to concurrently simulate the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, and wherein the parameters are selected from a group consisting of the first defined matrix representation, the second defined matrix representation, pointers to statevectors, control masks, target qubits, and second target qubits.

### Claim 7 (depends on 1)

The system of claim 1, wherein the execution component executes the kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate the batched kernel and to reduce computational cost associated with at least one of execution of the kernel overhead operation or concurrent simulation of the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor.

### Claim 8

A computer-implemented method, comprising:
generating, by a system operatively coupled to a first processor, a first defined matrix representation of a qubit gate;
employing, by the system, a control mask to generate a second defined matrix representation of a multi-qubit gate; and
executing, by the system, a kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate a batched kernel.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, further comprising:
simulating, by the system, concurrently, the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, using the batched kernel and parallel processing threads.

### Claim 10 (depends on 8)

The computer-implemented method of claim 8, further comprising:
simulating, by the system, concurrently, the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, using the batched kernel, a batched measure, and parallel processing threads, wherein the batched measure accumulates probability measurements associated with concurrent simulation of the qubit gate and the multi-qubit gate.

### Claim 11 (depends on 8)

The computer-implemented method of claim 8, further comprising:
generating, by the system, at least one of the first defined matrix representation or the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 12 (depends on 8)

The computer-implemented method of claim 8, wherein the multi-qubit gate comprises a control qubit, and further comprising:
generating, by the system, the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes having defined criteria, and wherein the pairs of two probability amplitudes are of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 13 (depends on 8)

The computer-implemented method of claim 8, further comprising:
storing, by the system, in multiple queues, parameters to concurrently simulate the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, wherein the parameters are selected from a group consisting of the first defined matrix representation, the second defined matrix representation, pointers to statevectors, control masks, target qubits, and second target qubits.

### Claim 14 (depends on 8)

The computer-implemented method of claim 8, further comprising:
executing, by the system, the kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate the batched kernel and to reduce computational cost associated with at least one of execution of the kernel overhead operation or concurrent simulation of the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor.

### Claim 15

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a first processor to cause the first processor to:
generate a first defined matrix representation of a qubit gate;
employ a control mask to generate a second defined matrix representation of a multi-qubit gate; and
execute a kernel overhead operation using the first defined matrix representation and the second defined matrix representation to generate a batched kernel.

### Claim 16 (depends on 15)

The computer program product of claim 15, comprising program instructions executable by a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, to cause the second processor to:
simulate, concurrently, the qubit gate and the multi-qubit gate using the batched kernel and parallel processing threads.

### Claim 17 (depends on 15)

The computer program product of claim 15, comprising program instructions executable by a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, to cause the second processor to:
simulate, concurrently, the qubit gate and the multi-qubit gate using the batched kernel, a batched measure, and parallel processing threads, wherein the batched measure accumulates probability measurements associated with concurrent simulation of the qubit gate and the multi-qubit gate.

### Claim 18 (depends on 15)

The computer program product of claim 15, comprising program instructions executable by the first processor to cause the first processor to:
generate at least one of the first defined matrix representation or the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein the multi-qubit gate comprises a control qubit, and wherein the program instructions are further executable by the first processor to cause the first processor to:
generate the second defined matrix representation by multiplying a defined complex matrix by pairs of two probability amplitudes having defined criteria, and wherein the pairs of two probability amplitudes are of a statevector of a shot that is indicative of an execution instance of an algorithm representing a quantum circuit.

### Claim 20 (depends on 15)

The computer program product of claim 15, wherein the program instructions are further executable by the first processor to cause the first processor to:
store, in multiple queues, parameters to concurrently simulate the qubit gate and the multi-qubit gate on a second processor, the second processor having at least one of a greater number of cores or a larger memory bandwidth than the first processor, and wherein the parameters are selected from a group consisting of the first defined matrix representation, the second defined matrix representation, pointers to statevectors, control masks, target qubits, and second target qubits.
