EuropeanCallExpectedValue

class EuropeanCallExpectedValue(uncertainty_model, strike_price, c_approx, i_state=None, i_compare=None, i_objective=None)[source]

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 price

  • strike_price (float) – strike price of the European option

  • c_approx (float) – approximation factor for linear payoff

  • i_state (Union[List[int], ndarray, None]) – indices of qubits representing the uncertainty

  • i_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

Attributes

EuropeanCallExpectedValue.num_target_qubits

Returns the number of target qubits

Methods

EuropeanCallExpectedValue.build(qc, q[, …])

Adds corresponding sub-circuit to given circuit

EuropeanCallExpectedValue.build_controlled(qc, …)

Adds corresponding controlled sub-circuit to given circuit

EuropeanCallExpectedValue.build_controlled_inverse(qc, …)

Adds controlled inverse of corresponding sub-circuit to given circuit

EuropeanCallExpectedValue.build_controlled_inverse_power(qc, …)

Adds controlled, inverse, power of corresponding circuit.

EuropeanCallExpectedValue.build_controlled_power(qc, …)

Adds controlled power of corresponding circuit.

EuropeanCallExpectedValue.build_inverse(qc, q)

Adds inverse of corresponding sub-circuit to given circuit

EuropeanCallExpectedValue.build_inverse_power(qc, …)

Adds inverse power of corresponding circuit.

EuropeanCallExpectedValue.build_power(qc, q, …)

Adds power of corresponding circuit.

EuropeanCallExpectedValue.get_num_qubits()

returns number of qubits

EuropeanCallExpectedValue.get_num_qubits_controlled()

returns number of qubits controlled

EuropeanCallExpectedValue.required_ancillas()

returns required ancillas

EuropeanCallExpectedValue.required_ancillas_controlled()

returns required ancillas controlled

EuropeanCallExpectedValue.value_to_estimation(value)

value to estimate