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.
展开▼