48 lines
4.8 KiB
Plaintext
48 lines
4.8 KiB
Plaintext
---
|
||
title: uncertainty_problems (v0.31)
|
||
description: API reference for qiskit.aqua.components.uncertainty_problems in qiskit v0.31
|
||
in_page_toc_min_heading_level: 2
|
||
python_api_type: module
|
||
python_api_name: qiskit.aqua.components.uncertainty_problems
|
||
---
|
||
|
||
<span id="module-qiskit.aqua.components.uncertainty_problems" />
|
||
|
||
<span id="qiskit-aqua-components-uncertainty-problems" />
|
||
|
||
<span id="uncertainty-problems-qiskit-aqua-components-uncertainty-problems" />
|
||
|
||
# Uncertainty Problems
|
||
|
||
`qiskit.aqua.components.uncertainty_problems`
|
||
|
||
Uncertainty is present in most realistic applications, and often it is necessary to evaluate the behavior of a system under uncertain data. For instance, in finance, it is of interest to evaluate expected value or risk metrics of financial products that depend on underlying stock prices, economic factors, or changing interest rates. Classically, such problems are often evaluated using Monte Carlo simulation. However, Monte Carlo simulation does not converge very fast, which implies that large numbers of samples are required to achieve estimators of reasonable accuracy and confidence. In quantum computing, *amplitude estimation* can be used instead, which can lead to a quadratic speed-up. Thus, millions of classical samples could be replaced by a few thousand quantum samples.
|
||
|
||
*Amplitude estimation* is a derivative of *quantum phase estimation* applied to a particular operator $A$. $A$ is assumed to operate on (n+1) qubits (+ possible ancillas) where the n qubits represent the uncertainty (see [`uncertainty_models`](qiskit.aqua.components.uncertainty_models#module-qiskit.aqua.components.uncertainty_models "qiskit.aqua.components.uncertainty_models")) and the last qubit is used to represent the (normalized) objective value as its amplitude. In other words, $A$ is constructed such that the probability of measuring a ‘1’ in the objective qubit is equal to the value of interest. Aqua has several amplitude estimation algorithms: [`AmplitudeEstimation`](qiskit.aqua.algorithms.AmplitudeEstimation "qiskit.aqua.algorithms.AmplitudeEstimation"), [`IterativeAmplitudeEstimation`](qiskit.aqua.algorithms.IterativeAmplitudeEstimation "qiskit.aqua.algorithms.IterativeAmplitudeEstimation") and [`MaximumLikelihoodAmplitudeEstimation`](qiskit.aqua.algorithms.MaximumLikelihoodAmplitudeEstimation "qiskit.aqua.algorithms.MaximumLikelihoodAmplitudeEstimation").
|
||
|
||
Since the value of interest has to be normalized to lie in \[0, 1], an uncertainty problem also provides a function:
|
||
|
||
```python
|
||
def value_to_estimator(self, value):
|
||
return value
|
||
```
|
||
|
||
which is used to map the result of *amplitude estimation* to the range of interest. The standard implementation is just the identity and can be overridden when needed.
|
||
|
||
# Uncertainty Problem Base Classes
|
||
|
||
[`UncertaintyProblem`](qiskit.aqua.components.uncertainty_problems.UncertaintyProblem "qiskit.aqua.components.uncertainty_problems.UncertaintyProblem") is the base class from which further base classes for univariate and multivariate problems are derived
|
||
|
||
| | |
|
||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
||
| [`UncertaintyProblem`](qiskit.aqua.components.uncertainty_problems.UncertaintyProblem "qiskit.aqua.components.uncertainty_problems.UncertaintyProblem") | The abstract Uncertainty Problem component. |
|
||
| [`UnivariateProblem`](qiskit.aqua.components.uncertainty_problems.UnivariateProblem "qiskit.aqua.components.uncertainty_problems.UnivariateProblem") | Univariate uncertainty problem. |
|
||
| [`MultivariateProblem`](qiskit.aqua.components.uncertainty_problems.MultivariateProblem "qiskit.aqua.components.uncertainty_problems.MultivariateProblem") | Multivariate Uncertainty Problem. |
|
||
|
||
# Univariate Problems
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
||
| [`UnivariatePiecewiseLinearObjective`](qiskit.aqua.components.uncertainty_problems.UnivariatePiecewiseLinearObjective "qiskit.aqua.components.uncertainty_problems.UnivariatePiecewiseLinearObjective") | Univariate Piecewise Linear Objective Function. |
|
||
|