Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

FixedIncomeExpectedValue

class FixedIncomeExpectedValue(uncertainty_model, A, b, cash_flow, c_approx, i_state=None, i_objective=None)

GitHub

The Fixed Income Expected Value.

Evaluates a fixed income asset with uncertain interest rates.

Constructor.

Parameters

  • uncertainty_model (UncertaintyModel) – multivariate distribution
  • A (ndarray) – PCA matrix for delta_r (changes in interest rates)
  • b (int) – offset for interest rates (= initial interest rates)
  • cash_flow (List[float]) – cash flow time series
  • c_approx (float) – approximation scaling factor
  • i_state (Union[List[int], ndarray, None]) – indices of qubits that represent the state
  • i_objective (Optional[int]) – index of target qubit to apply the rotation to

Attributes

num_target_qubits

Returns the number of target qubits


Methods

build

FixedIncomeExpectedValue.build(qc, q, q_ancillas=None, params=None)

Adds corresponding sub-circuit to given circuit

Parameters

  • qc (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

build_controlled

FixedIncomeExpectedValue.build_controlled(qc, q, q_control, q_ancillas=None, use_basis_gates=True)

Adds corresponding controlled sub-circuit to given circuit

Parameters

  • qc (QuantumCircuit) – quantum circuit
  • q (list) – list of qubits (has to be same length as self._num_qubits)
  • q_control (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

build_controlled_inverse

FixedIncomeExpectedValue.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) – quantum circuit
  • q (list) – list of qubits (has to be same length as self._num_qubits)
  • q_control (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

build_controlled_inverse_power

FixedIncomeExpectedValue.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

build_controlled_power

FixedIncomeExpectedValue.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

build_inverse

FixedIncomeExpectedValue.build_inverse(qc, q, q_ancillas=None)

Adds inverse of corresponding sub-circuit to given circuit

Parameters

  • qc (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)

build_inverse_power

FixedIncomeExpectedValue.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

build_power

FixedIncomeExpectedValue.build_power(qc, q, power, q_ancillas=None)

Adds power of corresponding circuit. May be overridden if a more efficient implementation is possible

get_num_qubits

FixedIncomeExpectedValue.get_num_qubits()

returns number of qubits

get_num_qubits_controlled

FixedIncomeExpectedValue.get_num_qubits_controlled()

returns number of qubits controlled

required_ancillas

FixedIncomeExpectedValue.required_ancillas()

returns required ancillas

required_ancillas_controlled

FixedIncomeExpectedValue.required_ancillas_controlled()

returns required ancillas controlled

value_to_estimation

FixedIncomeExpectedValue.value_to_estimation(value)

value to estimate

Was this page helpful?
Report a bug or request content on GitHub.