qiskit-documentation/docs/api/qiskit/0.26/qiskit.finance.components.u...

179 lines
13 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: EuropeanCallDelta (v0.26)
description: API reference for qiskit.finance.components.uncertainty_problems.EuropeanCallDelta in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.finance.components.uncertainty_problems.EuropeanCallDelta
---
<span id="qiskit-finance-components-uncertainty-problems-europeancalldelta" />
# qiskit.finance.components.uncertainty\_problems.EuropeanCallDelta
<Class id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/finance/components/uncertainty_problems/european_call_delta.py" signature="EuropeanCallDelta(uncertainty_model, strike_price, i_state=None, i_objective=None)" modifiers="class">
The European Call Option Delta.
Evaluates the variance 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
* **i\_state** (`Union`\[`List`\[`int`], `ndarray`, `None`]) indices of qubits representing the uncertainty
* **i\_objective** (`Optional`\[`int`]) index of qubit for objective function
### \_\_init\_\_
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.__init__" signature="__init__(uncertainty_model, strike_price, i_state=None, i_objective=None)">
Constructor.
**Parameters**
* **uncertainty\_model** (`UnivariateDistribution`) uncertainty model for spot price
* **strike\_price** (`float`) strike price of the European option
* **i\_state** (`Union`\[`List`\[`int`], `ndarray`, `None`]) indices of qubits representing the uncertainty
* **i\_objective** (`Optional`\[`int`]) index of qubit for objective function
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| [`__init__`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.__init__ "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.__init__")(uncertainty\_model, strike\_price\[, …]) | Constructor. |
| [`build`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build")(qc, q\[, q\_ancillas, params]) | Adds corresponding sub-circuit to given circuit |
| [`build_controlled`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled")(qc, q, q\_control\[, …]) | Adds corresponding controlled sub-circuit to given circuit |
| [`build_controlled_inverse`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse")(qc, q, q\_control\[, …]) | Adds controlled inverse of corresponding sub-circuit to given circuit |
| [`build_controlled_inverse_power`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse_power "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse_power")(qc, q, …\[, …]) | Adds controlled, inverse, power of corresponding circuit. |
| [`build_controlled_power`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_power "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_power")(qc, q, q\_control, power) | Adds controlled power of corresponding circuit. |
| [`build_inverse`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse")(qc, q\[, q\_ancillas]) | Adds inverse of corresponding sub-circuit to given circuit |
| [`build_inverse_power`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse_power "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse_power")(qc, q, power\[, q\_ancillas]) | Adds inverse power of corresponding circuit. |
| [`build_power`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_power "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_power")(qc, q, power\[, q\_ancillas]) | Adds power of corresponding circuit. |
| [`get_num_qubits`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits")() | returns number of qubits |
| [`get_num_qubits_controlled`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits_controlled "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits_controlled")() | returns number of qubits controlled |
| [`required_ancillas`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas")() | returns required ancillas |
| [`required_ancillas_controlled`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas_controlled "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas_controlled")() | returns required ancillas controlled |
| [`value_to_estimation`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.value_to_estimation "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.value_to_estimation")(value) | value to estimate |
## Attributes
| | |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [`num_target_qubits`](#qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.num_target_qubits "qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.num_target_qubits") | Returns the number of target qubits |
### build
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build" signature="build(qc, q, q_ancillas=None, params=None)">
Adds corresponding sub-circuit to given circuit
**Parameters**
* **qc** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) quantum circuit
* **q** (*list*) list of qubits (has to be same length as self.\_num\_qubits)
* **q\_ancillas** (*list*) list of ancilla qubits (or None if none needed)
* **params** (*list*) parameters for circuit
</Function>
### build\_controlled
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled" signature="build_controlled(qc, q, q_control, q_ancillas=None, use_basis_gates=True)">
Adds corresponding controlled sub-circuit to given circuit
**Parameters**
* **qc** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) quantum circuit
* **q** (*list*) list of qubits (has to be same length as self.\_num\_qubits)
* **q\_control** ([*Qubit*](qiskit.circuit.Qubit "qiskit.circuit.Qubit")) control qubit
* **q\_ancillas** (*list*) list of ancilla qubits (or None if none needed)
* **use\_basis\_gates** (*bool*) use basis gates for expansion of controlled circuit
</Function>
### build\_controlled\_inverse
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse" signature="build_controlled_inverse(qc, q, q_control, q_ancillas=None, use_basis_gates=True)">
Adds controlled inverse of corresponding sub-circuit to given circuit
**Parameters**
* **qc** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) quantum circuit
* **q** (*list*) list of qubits (has to be same length as self.\_num\_qubits)
* **q\_control** ([*Qubit*](qiskit.circuit.Qubit "qiskit.circuit.Qubit")) control qubit
* **q\_ancillas** (*list*) list of ancilla qubits (or None if none needed)
* **use\_basis\_gates** (*bool*) use basis gates for expansion of controlled circuit
</Function>
### build\_controlled\_inverse\_power
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_inverse_power" signature="build_controlled_inverse_power(qc, q, q_control, power, q_ancillas=None, use_basis_gates=True)">
Adds controlled, inverse, power of corresponding circuit. May be overridden if a more efficient implementation is possible
</Function>
### build\_controlled\_power
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_controlled_power" signature="build_controlled_power(qc, q, q_control, power, q_ancillas=None, use_basis_gates=True)">
Adds controlled power of corresponding circuit. May be overridden if a more efficient implementation is possible
</Function>
### build\_inverse
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse" signature="build_inverse(qc, q, q_ancillas=None)">
Adds inverse of corresponding sub-circuit to given circuit
**Parameters**
* **qc** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) quantum circuit
* **q** (*list*) list of qubits (has to be same length as self.\_num\_qubits)
* **q\_ancillas** (*list*) list of ancilla qubits (or None if none needed)
</Function>
### build\_inverse\_power
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_inverse_power" signature="build_inverse_power(qc, q, power, q_ancillas=None)">
Adds inverse power of corresponding circuit. May be overridden if a more efficient implementation is possible
</Function>
### build\_power
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.build_power" signature="build_power(qc, q, power, q_ancillas=None)">
Adds power of corresponding circuit. May be overridden if a more efficient implementation is possible
</Function>
### get\_num\_qubits
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits" signature="get_num_qubits()">
returns number of qubits
</Function>
### get\_num\_qubits\_controlled
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.get_num_qubits_controlled" signature="get_num_qubits_controlled()">
returns number of qubits controlled
</Function>
### num\_target\_qubits
<Attribute id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.num_target_qubits">
Returns the number of target qubits
</Attribute>
### required\_ancillas
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas" signature="required_ancillas()">
returns required ancillas
</Function>
### required\_ancillas\_controlled
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.required_ancillas_controlled" signature="required_ancillas_controlled()">
returns required ancillas controlled
</Function>
### value\_to\_estimation
<Function id="qiskit.finance.components.uncertainty_problems.EuropeanCallDelta.value_to_estimation" signature="value_to_estimation(value)">
value to estimate
</Function>
</Class>