# US 12,770,047 B2 · Test method validation using quantum algorithms

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

- Number: US 12,770,047 B2
- Document ID: US12770047B2
- Status: Granted
- Kind: B2
- Application number: 18/486,613
- Filed: 2023-10-13
- Published: 2025-04-17
- Granted: 2026-10-20
- Earliest claimed: 2023-10-13
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Srinivasa Bharath Kanta
- Web page: https://patentgrep.com/patent/US12770047B2

## CPC

- G06N 10/60: Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
- G06F 17/10: Complex mathematical operations {(function generation by table look-up G06F1/03; evaluation of elementary functions by calculation G06F7/544)}
- G06N 10/00: Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- 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 quantum computing device initiates a first quantum algorithm comprising a test method implemented as a quantum oracle, the first quantum algorithm receiving an input of a first quantum register comprising one or more qubits and a second quantum register comprising one qubit, each qubit in the first quantum register corresponding to a test case for the test method. The quantum computing device receives an output of the first quantum algorithm. The quantum computing device initiates a second quantum algorithm, the second quantum algorithm receiving an input of a third quantum register and the output of the first quantum algorithm. The quantum computing device performs a measurement on the first quantum register and a measurement on the third quantum register. The quantum computing device determines, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed.

## Claims

### Claim 1

A method, comprising:
initiating, by a quantum computing device, a first quantum algorithm comprising a test method implemented as a quantum oracle, wherein the first quantum algorithm receives an input of a first quantum register comprising a plurality of qubits and a second quantum register comprising one qubit, each qubit of the plurality of qubits in the first quantum register corresponding to a respective test case of a corresponding plurality of test cases for the test method;
receiving, by the quantum computing device, an output of the first quantum algorithm comprising the first quantum register, wherein each of the plurality of qubits in the first quantum register comprises a resulting quantum state based on the first quantum algorithm;
initiating, by the quantum computing device, a second quantum algorithm, wherein the second quantum algorithm receives an input of a third quantum register and the output of the first quantum algorithm;
performing, by the quantum computing device based on the second quantum algorithm, a measurement on the first quantum register and a measurement on the third quantum register, wherein the measurement on the first quantum register and the measurement on the third quantum register are indicative of a pass or fail of each of the corresponding plurality of test cases; and
determining, by the quantum computing device based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed.

### Claim 2 (depends on 1)

The method of claim 1, wherein the output of the first quantum algorithm comprises the plurality of qubits in the first quantum register subsequent to initiating the first quantum algorithm with the plurality of qubits in the first quantum register.

### Claim 3 (depends on 1)

The method of claim 1, wherein initiating the first quantum algorithm comprises:
initializing each qubit of the plurality of qubits in the first quantum register with a qubit state |├0> and the one qubit in the second quantum register with a qubit state |├1>;
applying a first Hadamard gate to each qubit of the plurality of qubits in the first quantum register;
applying the test method implemented as a quantum oracle with the plurality of more qubits in the first quantum register subsequent to applying the first Hadamard gate to each qubit of the plurality of qubits in the first quantum register; and
applying a second Hadamard gate to each qubit of the plurality of one or more qubits in the first quantum register subsequent to applying the test method implemented as a quantum oracle with the plurality of qubits in the first quantum register.

### Claim 4 (depends on 1)

The method of claim 1, wherein initiating the second quantum algorithm comprises:
preparing the third quantum register with a plurality of qubits, each of the plurality of qubits with a qubit state |├0>, wherein the first quantum register and the third quantum register have the same number of qubits;
applying a Hadamard gate to each qubit of the plurality of qubits in the first quantum register; and
applying an inverse quantum Fourier transform to each qubit of the plurality of qubits in the first quantum register subsequent to applying the Hadamard gate to each qubit of the plurality of qubits in the first quantum register.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
determining that a control bit of a qubit in the first quantum register has a qubit state |├1>; and
in response to determining that the control bit of the qubit in the first quantum register has the qubit state |├1>, applying a unitary operator on the qubit in the first quantum register.

### Claim 6 (depends on 1)

The method of claim 1, wherein the measurement on the first quantum register comprises a state of 0 or 1.

### Claim 7 (depends on 1)

The method of claim 1, wherein the measurement on the third quantum register comprises a phase value.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed comprises:
determining that the test method passed for each test case for the test method when the measurement of the first quantum register comprises a state of 1 and the measurement on the third quantum register comprises a phase value of 0.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed comprises:
determining that the test method failed for each test case for the test method when the measurement of the first quantum register comprises a state of 1 and the measurement of the third quantum register comprises a phase value other than 0.

### Claim 10 (depends on 1)

The method of claim 1, wherein determining, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed comprises:
determining that the test method passed for at least one test case and failed for at least one test case when the measurement of the first quantum register comprises a state of 0.

### Claim 11 (depends on 1)

The method of claim 1, wherein the first quantum algorithm is a Deutsch-Jozsa algorithm.

### Claim 12 (depends on 1)

The method of claim 1, wherein the second quantum algorithm is a quantum phase estimation algorithm.

### Claim 13

A quantum computing device, comprising:
a memory;
a processor device coupled to the memory, the processor device to:
initiate a first quantum algorithm comprising a test method implemented as a quantum oracle, wherein the first quantum algorithm receives an input of a first quantum register comprising a plurality of qubits and a second quantum register comprising one qubit, each qubit of the plurality of qubits in the first quantum register corresponding to a respective test case of a corresponding plurality of test cases for the test method;
receive an output of the first quantum algorithm comprising the first quantum register, wherein each of the plurality of qubits in the first quantum register comprises a resulting quantum state based on the first quantum algorithm;
initiate a second quantum algorithm, wherein the second quantum algorithm receives an input of a third quantum register and the output of the first quantum algorithm;
perform, based on the second quantum algorithm, a measurement on the first quantum register and a measurement on the third quantum register, wherein the measurement on the first quantum register and the measurement on the third quantum register are indicative of a pass or fail of each of the corresponding plurality of test cases; and
determine, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed.

### Claim 14 (depends on 13)

The quantum computing device of claim 13, wherein, to initiate the first quantum algorithm, the processor device is further to:
initialize each qubit of the plurality of qubits in the first quantum register with a quantum state |├0> and the one qubit in the second quantum register with a quantum state |├1>;
apply a first Hadamard gate to each qubit of the plurality of qubits in the first quantum register;
apply the test method implemented as a quantum oracle with the plurality of qubits in the first quantum register subsequent to applying the first Hadamard gate to each qubit of the plurality of qubits in the first quantum register; and
apply a second Hadamard gate to each qubit of the plurality of qubits in the first quantum register subsequent to applying the test method implemented as a quantum oracle with the plurality of qubits in the first quantum register.

### Claim 15 (depends on 13)

The quantum computing device of claim 13, wherein, to initiate the second quantum algorithm, the processor device is further to:
prepare the third quantum register with a plurality of qubits, each of the plurality of qubits with a quantum state |├0>, wherein the first quantum register and the third quantum register have the same number of qubits;
apply a Hadamard gate to each qubit of the plurality of qubits in the first quantum register; and
apply an inverse quantum Fourier transform to each qubit of the plurality of qubits in the first quantum register subsequent to applying the Hadamard gate to each qubit of the plurality of qubits in the first quantum register.

### Claim 16 (depends on 13)

The quantum computing device of claim 13, wherein, to determine, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed, the processor device is further to:
determine that the test method passed for each test case for the test method when the measurement of the first quantum register comprises a state of 1 and the measurement on the third quantum register comprises a phase value of 0.

### Claim 17 (depends on 13)

The quantum computing device of claim 13, wherein, to determine, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed, the processor device is further to:
determine that the test method failed for each test case for the test method when the measurement of the first quantum register comprises a state of 1 and the measurement of the third quantum register comprises a phase value other than 0.

### Claim 18 (depends on 13)

The quantum computing device of claim 13, wherein, to determine, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed, the processor device is further to:
determine that the test method passed for at least one test case and failed for at least one test case when the measurement of the first quantum register comprises a state of 0 and the measurement of the third quantum register comprises a phase value other than 0.

### Claim 19 (depends on 13)

The quantum computing device of claim 13, wherein the first quantum algorithm is a Deutsch-Jozsa algorithm and the second quantum algorithm is a quantum phase estimation algorithm.

### Claim 20

A non-transitory computer-readable storage medium that includes computer-executable instructions that, when executed, cause one or more processor devices to:
initiate a first quantum algorithm comprising a test method implemented as a quantum oracle, wherein the first quantum algorithm receives an input of a first quantum register comprising a plurality of qubits and a second quantum register comprising one qubit, each qubit of the plurality of qubits in the first quantum register corresponding to a respective test case of a corresponding plurality of test cases for the test method;
receive an output of the first quantum algorithm comprising the first quantum register, wherein each of the plurality of qubits in the first quantum register comprises a resulting quantum state based on the first quantum algorithm;
initiate a second quantum algorithm, wherein the second quantum algorithm receives an input of a third quantum register and the output of the first quantum algorithm;
perform, based on the second quantum algorithm, a measurement on the first quantum register and a measurement on the third quantum register, wherein the measurement on the first quantum register and the measurement on the third quantum register are indicative of a pass or fail of each of the corresponding plurality of test cases; and
determine, based on the measurement on the first quantum register and the measurement on the third quantum register, that the test method passed or failed.
