EuropeanCallExpectedValue¶
-
class
EuropeanCallExpectedValue
(uncertainty_model, strike_price, c_approx, i_state=None, i_compare=None, i_objective=None)[source]¶ Bases:
qiskit.aqua.components.uncertainty_problems.uncertainty_problem.UncertaintyProblem
The European Call Option Expected Value.
Evaluates the expected payoff for a European call option given an uncertainty model. The payoff function is f(S, K) = max(0, S - K) for a spot price S and strike price K.
Constructor.
- Parameters
uncertainty_model (
UnivariateDistribution
) – uncertainty model for spot pricestrike_price (
float
) – strike price of the European optionc_approx (
float
) – approximation factor for linear payoffi_state (
Union
[List
[int
],ndarray
,None
]) – indices of qubits representing the uncertaintyi_compare (
Optional
[int
]) – index of qubit for comparing spot price to strike price (enabling payoff or not)i_objective (
Optional
[int
]) – index of qubit for objective function
Methods
Adds corresponding sub-circuit to given circuit
Adds corresponding controlled sub-circuit to given circuit
Adds controlled inverse of corresponding sub-circuit to given circuit
Adds controlled, inverse, power of corresponding circuit.
Adds controlled power of corresponding circuit.
Adds inverse of corresponding sub-circuit to given circuit
Adds inverse power of corresponding circuit.
Adds power of corresponding circuit.
returns number of qubits
returns number of qubits controlled
returns required ancillas
returns required ancillas controlled
value to estimate
Attributes
-
num_target_qubits
¶ Returns the number of target qubits