# US 2019/0378208 A1 · Quantum circuit risk analysis

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

- Number: US 2019/0378208 A1
- Document ID: US20190378208A1
- Status: Published application
- Kind: A1
- Application number: 16/004,649
- Filed: 2018-06-11
- Published: 2019-12-12
- Earliest claimed: 2018-06-11
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Stefan Woerner; Daniel Josef Egger
- Web page: https://patentgrep.com/patent/US20190378208A1

## CPC

- G06N 10/60: Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- 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
- G06Q 40/03: Credit; Loans; Processing thereof
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

The technology described herein is directed towards quantum circuits used to analyze risk, including expected value, variance, value at risk and conditional value at risk metrics. Aspects can comprise modeling uncertainty of one or more random variables to provide a first quantum sub-circuit by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates, and encoding a risk metric into a second quantum sub-circuit, the second quantum sub-circuit comprising a first ancilla qubit and Y-rotations controlled by one or more other qubits. Further aspects can comprise performing amplitude estimation based on the first sub-circuit and the second sub-circuit to extract a probability value corresponding to the risk metric, wherein the probability value represents a probability of measuring a one state in the ancilla qubit.

## Claims

### Claim 1

A system comprising,
an uncertainty modeling component that models uncertainty of one or more random variables to provide a first quantum sub-circuit by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates;
a risk metric encoding component that encodes a risk metric into a second quantum sub-circuit, the second quantum sub-circuit comprising a first ancilla qubit and Y-rotations controlled by one or more other qubits; and
an amplitude estimation component that performs amplitude estimation based on the first sub-circuit and the second sub-circuit to extract a probability value corresponding to the risk metric, wherein the probability value represents a probability of measuring a one state in the ancilla qubit.

### Claim 2 (depends on 1)

The system of claim 1, wherein the risk metric encoding component approximates the second sub-circuit using multi-controlled qubit rotations with rotation angles corresponding to polynomials to determine the risk metric as an expected value.

### Claim 3 (depends on 1)

The system of claim 1, wherein the risk metric encoding component approximates the second sub-circuit using multi-controlled qubit rotations with rotation angles corresponding to polynomials to determine the risk metric as a variance value.

### Claim 4 (depends on 1)

The system of claim 1, wherein the risk metric encoding component encodes the risk metric to determine a value at risk quantity.

### Claim 5 (depends on 4)

The system of claim 4, wherein the risk metric encoding component approximates the second sub-circuit using multi-controlled qubit rotations with rotation angles corresponding to polynomials.

### Claim 6 (depends on 1)

The system of claim 1, wherein the risk metric encoding component encodes the risk metric to determine a conditional value at risk quantity.

### Claim 7 (depends on 6)

The system of claim 6, wherein the risk metric encoding component approximates the second sub-circuit using multi-controlled qubit rotations with rotation angles corresponding to polynomials.

### Claim 8 (depends on 3)

The system of claim 3, further comprising a quantum sub-circuit construction component that constructs the second quantum sub-circuit by determining a polynomial function, and mapping the polynomial function to quantum sub-circuit Y-rotation components.

### Claim 9

A computer-implemented method comprising,
modeling, by a device operatively coupled to a processor, uncertainty of one or more random variables to provide a first quantum sub-circuit by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates;
encoding, by the device, a risk metric into a second quantum sub-circuit, the second quantum sub-circuit comprising a first ancilla qubit and Y-rotations controlled by one or more other qubits; and
performing, by the device, amplitude estimation based on the first sub-circuit and the second sub-circuit to extract a probability value corresponding to the risk metric, wherein the probability value represents a probability of measuring a one state in the ancilla qubit.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, further comprising, computing an expected value or a variance value based on the probability value.

### Claim 11 (depends on 9)

The computer-implemented method of claim 9, wherein the risk metric comprises a value at risk quantity at a probability level, and further comprising, performing a bisection search to obtain a smallest level at which the probability value obtained via amplitude estimation is above a given threshold, wherein the value at risk quantity corresponds to the smallest level.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the ancilla qubit comprises a first ancilla qubit, wherein the risk metric comprises a conditional value at risk quantity, and further comprising, estimating the conditional value at risk quantity by adding a second ancilla qubit to the second sub-circuit, and controlling an operator that acts on the other qubits and the second ancilla qubit.

### Claim 13 (depends on 9)

The computer-implemented method of claim 9, further comprising, determining a polynomial function, with multi-controlled qubit rotations with rotation angles corresponding to the polynomial function, and mapping the polynomial function to the second quantum sub-circuit.

### Claim 14 (depends on 13)

The computer-implemented method of claim 13, wherein the constructing the second quantum sub-circuit comprises determining a degree of the polynomial function based on a desired convergence rate.

### Claim 15 (depends on 13)

The computer-implemented method of claim 13, wherein the constructing the second quantum sub-circuit comprises determining a degree of the polynomial function based on a desired circuit depth.

### Claim 16

A computer program product facilitating estimating a risk analysis result for a risk analysis metric, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
model uncertainty of one or more random variables to provide a first quantum sub-circuit by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates;
encode a risk metric into a second quantum sub-circuit, the second quantum sub-circuit comprising a first ancilla qubit and Y-rotations controlled by one or more other qubits; and
perform amplitude estimation based on the first sub-circuit and the second sub-circuit to extract a probability value corresponding to the risk metric, wherein the probability value represents a probability of measuring a one state in the ancilla qubit.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the risk metric comprises a value at risk quantity at a probability level, and wherein the program instructions are further executable by the processor to cause the processor to determine the risk metric based on the probability value by performing a bisection search to obtain a smallest level at which the probability value obtained via amplitude estimation is above a given threshold, wherein the value at risk quantity corresponds to the smallest level.

### Claim 18 (depends on 16)

The computer program product of claim 16, wherein the ancilla qubit comprises a first ancilla qubit, wherein the risk metric comprises a conditional value at risk quantity at a probability level, and wherein the program instructions are further executable by the processor to cause the processor to estimate the conditional value at risk quantity by adding a second ancilla qubit to the second sub-circuit, and controlling an operator that acts on the other qubits and the second ancilla qubit.

### Claim 19 (depends on 16)

The computer program product of claim 16, wherein the program instructions are further executable by the processor to cause the processor to construct the second quantum sub-circuit by determining a polynomial function, with multi-controlled qubit rotations with rotation angles corresponding to the polynomial function, and mapping the polynomial function to the second quantum sub-circuit.

### Claim 20

A computer-implemented method, comprising:
providing, by a device operatively coupled to a processor, a first quantum sub-circuit that models uncertainty of one or more random variables by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates;
constructing, by the device, a second quantum sub-circuit comprising quantum gates and a first ancilla qubit, the constructing comprising, determining a polynomial function with multi-controlled qubit rotations with rotation angles corresponding to the polynomial function, and mapping the polynomial function to Y-rotation components of the second quantum sub-circuit; and
estimating, by the device, a risk metric quantity, comprising applying Y-rotations to the gates of the second quantum sub-circuit, determining an estimated probability value of measuring a one state in the first ancilla qubit, and determining the risk metric based on the estimated probability value.

### Claim 21 (depends on 20)

The computer-implemented method of claim 20, wherein the estimating the risk metric quantity based on the estimated probability value further comprises performing a bisection search to obtain a smallest level at which the probability value obtained via amplitude estimation is above a given threshold, wherein a value at risk quantity corresponds to the smallest level.

### Claim 22 (depends on 21)

The computer-implemented method of claim 21, wherein the constructing the quantum sub-circuit further comprises adding a second ancilla qubit to the second quantum sub-circuit, and wherein the estimating the risk metric quantity further comprises controlling, by the first ancilla qubit, an operator that acts on the other qubits and the second ancilla qubit.

### Claim 23

A computer program product facilitating estimating a risk analysis quantity for a risk analysis metric, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
provide a first quantum sub-circuit that models uncertainty of one or more random variables by mapping the one or more variables to quantum states represented by a selected number of qubits using quantum gates;
construct a second quantum sub-circuit comprising quantum gates and a first ancilla qubit, comprising determining a polynomial function with multi-controlled qubit rotations with rotation angles corresponding to the polynomial function, and mapping the polynomial function to Y-rotation components of the second quantum sub-circuit; and
estimate a risk metric quantity, comprising applying Y-rotations to the quantum gates of the second quantum sub-circuit, determining an estimated probability value of measuring a one state in the first ancilla qubit, and determining the risk metric based on the estimated probability value.

### Claim 24 (depends on 23)

A computer program product of claim 23, wherein the program instructions are further executable by the processor to estimate the risk metric quantity based on the estimated probability value by performing a bisection search to obtain a smallest level at which the probability value obtained via amplitude estimation is above a given threshold, wherein a value at risk quantity corresponds to the smallest level.

### Claim 25 (depends on 24)

The computer program product of claim 24, wherein the program instructions are further executable by the processor to construct the second quantum sub-circuit by adding a second ancilla qubit to the second quantum sub-circuit, and to estimate the risk metric quantity by controlling, by the first ancilla qubit, an operator that acts on the other qubits and the second ancilla qubit.
