177 lines
13 KiB
Plaintext
177 lines
13 KiB
Plaintext
---
|
||
title: MultivariateProblem (v0.26)
|
||
description: API reference for qiskit.aqua.components.uncertainty_problems.MultivariateProblem in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.aqua.components.uncertainty_problems.MultivariateProblem
|
||
---
|
||
|
||
<span id="qiskit-aqua-components-uncertainty-problems-multivariateproblem" />
|
||
|
||
# qiskit.aqua.components.uncertainty\_problems.MultivariateProblem
|
||
|
||
<Class id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/components/uncertainty_problems/multivariate_problem.py" signature="MultivariateProblem(uncertainty_model, aggregation_function, univariate_objective, conditions=None)" modifiers="class">
|
||
Multivariate Uncertainty Problem.
|
||
|
||
Constructor.
|
||
|
||
**Parameters**
|
||
|
||
* **uncertainty\_model** (`MultivariateDistribution`) – multivariate uncertainty model
|
||
* **aggregation\_function** (`CircuitFactory`) – aggregation function that maps the multiple dimension to an aggregated value
|
||
* **univariate\_objective** (`UnivariatePiecewiseLinearObjective`) – objective function applied to the aggregated value
|
||
* **conditions** (`Union`\[`List`\[`Tuple`\[`int`, `CircuitFactory`]], `ndarray`, `None`]) – list of pairs (int, CircuitFactory) = target dimension of uncertainty model and condition to be satisfied to apply the aggregation
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.__init__" signature="__init__(uncertainty_model, aggregation_function, univariate_objective, conditions=None)">
|
||
Constructor.
|
||
|
||
**Parameters**
|
||
|
||
* **uncertainty\_model** (`MultivariateDistribution`) – multivariate uncertainty model
|
||
* **aggregation\_function** (`CircuitFactory`) – aggregation function that maps the multiple dimension to an aggregated value
|
||
* **univariate\_objective** (`UnivariatePiecewiseLinearObjective`) – objective function applied to the aggregated value
|
||
* **conditions** (`Union`\[`List`\[`Tuple`\[`int`, `CircuitFactory`]], `ndarray`, `None`]) – list of pairs (int, CircuitFactory) = target dimension of uncertainty model and condition to be satisfied to apply the aggregation
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||
| [`__init__`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.__init__ "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.__init__")(uncertainty\_model, …\[, conditions]) | Constructor. |
|
||
| [`build`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build")(qc, q\[, q\_ancillas, params]) | Adds corresponding sub-circuit to given circuit |
|
||
| [`build_controlled`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled")(qc, q, q\_control\[, …]) | Adds corresponding controlled sub-circuit to given circuit |
|
||
| [`build_controlled_inverse`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_inverse "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_inverse")(qc, q, q\_control\[, …]) | Adds controlled inverse of corresponding sub-circuit to given circuit |
|
||
| [`build_controlled_inverse_power`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_inverse_power "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_inverse_power")(qc, q, …\[, …]) | Adds controlled, inverse, power of corresponding circuit. |
|
||
| [`build_controlled_power`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_power "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_controlled_power")(qc, q, q\_control, power) | Adds controlled power of corresponding circuit. |
|
||
| [`build_inverse`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_inverse "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_inverse")(qc, q\[, q\_ancillas]) | Adds inverse of corresponding sub-circuit to given circuit |
|
||
| [`build_inverse_power`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_inverse_power "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_inverse_power")(qc, q, power\[, q\_ancillas]) | Adds inverse power of corresponding circuit. |
|
||
| [`build_power`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_power "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.build_power")(qc, q, power\[, q\_ancillas]) | Adds power of corresponding circuit. |
|
||
| [`get_num_qubits`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits")() | returns number of qubits |
|
||
| [`get_num_qubits_controlled`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits_controlled "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits_controlled")() | returns number of qubits controlled |
|
||
| [`required_ancillas`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas")() | returns required ancillas |
|
||
| [`required_ancillas_controlled`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas_controlled "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas_controlled")() | returns required ancillas controlled |
|
||
| [`value_to_estimation`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.value_to_estimation "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.value_to_estimation")(value) | value to estimate |
|
||
|
||
## Attributes
|
||
|
||
| | |
|
||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
|
||
| [`num_target_qubits`](#qiskit.aqua.components.uncertainty_problems.MultivariateProblem.num_target_qubits "qiskit.aqua.components.uncertainty_problems.MultivariateProblem.num_target_qubits") | Returns the number of target qubits |
|
||
|
||
### build
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.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.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits" signature="get_num_qubits()">
|
||
returns number of qubits
|
||
</Function>
|
||
|
||
### get\_num\_qubits\_controlled
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.get_num_qubits_controlled" signature="get_num_qubits_controlled()">
|
||
returns number of qubits controlled
|
||
</Function>
|
||
|
||
### num\_target\_qubits
|
||
|
||
<Attribute id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.num_target_qubits">
|
||
Returns the number of target qubits
|
||
</Attribute>
|
||
|
||
### required\_ancillas
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas" signature="required_ancillas()">
|
||
returns required ancillas
|
||
</Function>
|
||
|
||
### required\_ancillas\_controlled
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.required_ancillas_controlled" signature="required_ancillas_controlled()">
|
||
returns required ancillas controlled
|
||
</Function>
|
||
|
||
### value\_to\_estimation
|
||
|
||
<Function id="qiskit.aqua.components.uncertainty_problems.MultivariateProblem.value_to_estimation" signature="value_to_estimation(value)">
|
||
value to estimate
|
||
</Function>
|
||
</Class>
|
||
|