qiskit.aqua.components.uncertainty_models.MultivariateVariationalDistribution¶
-
class
MultivariateVariationalDistribution
(num_qubits, var_form, params, low=None, high=None)[source]¶ The Multivariate Variational Distribution.
- Parameters
num_qubits (
Union
[List
[int
],ndarray
]) – List with the number of qubits per dimensionvar_form (
QuantumCircuit
) – Variational formparams (
Union
[List
[float
],ndarray
]) – Parameters for variational formlow (
Union
[List
[float
],ndarray
,None
]) – List with the lower bounds per dimension, set to 0 for each dimension if Nonehigh (
Union
[List
[float
],ndarray
,None
]) – List with the upper bounds per dimension, set to 1 for each dimension if None
-
__init__
(num_qubits, var_form, params, low=None, high=None)[source]¶ - Parameters
num_qubits (
Union
[List
[int
],ndarray
]) – List with the number of qubits per dimensionvar_form (
QuantumCircuit
) – Variational formparams (
Union
[List
[float
],ndarray
]) – Parameters for variational formlow (
Union
[List
[float
],ndarray
,None
]) – List with the lower bounds per dimension, set to 0 for each dimension if Nonehigh (
Union
[List
[float
],ndarray
,None
]) – List with the upper bounds per dimension, set to 1 for each dimension if None
Methods
__init__
(num_qubits, var_form, params[, …])- type num_qubits
Union
[List
[int
],ndarray
]
build
(qc, q[, q_ancillas, params])build_controlled
(qc, q, q_control[, …])Adds corresponding controlled sub-circuit to given circuit
build_controlled_inverse
(qc, q, q_control[, …])Adds controlled inverse of corresponding sub-circuit to given circuit
build_controlled_inverse_power
(qc, q, …[, …])Adds controlled, inverse, power of corresponding circuit.
build_controlled_power
(qc, q, q_control, power)Adds controlled power of corresponding circuit.
build_inverse
(qc, q[, q_ancillas])Adds inverse of corresponding sub-circuit to given circuit
build_inverse_power
(qc, q, power[, q_ancillas])Adds inverse power of corresponding circuit.
build_power
(qc, q, power[, q_ancillas])Adds power of corresponding circuit.
returns number of qubits
returns number of qubits controlled
pdf_to_probabilities
(pdf, low, high, num_values)pdf to probabilities
returns required ancillas
returns required ancillas controlled
set_probabilities
(quantum_instance)Set Probabilities
Attributes
returns dimensions
returns high
returns low
returns num qubits
Returns the number of target qubits
returns number of values
returns probabilities
returns probabilities vector
returns values
-
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
(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
(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
(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
(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
(qc, q, power, q_ancillas=None)¶ Adds inverse power of corresponding circuit. May be overridden if a more efficient implementation is possible
-
build_power
(qc, q, power, q_ancillas=None)¶ Adds power of corresponding circuit. May be overridden if a more efficient implementation is possible
-
property
dimension
¶ returns dimensions
-
get_num_qubits
()¶ returns number of qubits
-
get_num_qubits_controlled
()¶ returns number of qubits controlled
-
property
high
¶ returns high
-
property
low
¶ returns low
-
property
num_qubits
¶ returns num qubits
-
property
num_target_qubits
¶ Returns the number of target qubits
-
property
num_values
¶ returns number of values
-
static
pdf_to_probabilities
(pdf, low, high, num_values)¶ pdf to probabilities
-
property
probabilities
¶ returns probabilities
-
property
probabilities_vector
¶ returns probabilities vector
-
required_ancillas
()¶ returns required ancillas
-
required_ancillas_controlled
()¶ returns required ancillas controlled
-
set_probabilities
(quantum_instance)[source]¶ Set Probabilities
- Parameters
quantum_instance (QuantumInstance) – Quantum Instance
-
property
values
¶ returns values