VectorStateFn¶
- class VectorStateFn(*args, **kwargs)[ソース]¶
ベースクラス:
StateFn
Deprecated: A class for state functions and measurements which are defined in vector representation, and stored using Terra’s
Statevector
class.バージョン 0.24.0 で非推奨: The class
qiskit.opflow.state_fns.vector_state_fn.VectorStateFn
is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit https://qisk.it/opflow_migration.- パラメータ
primitive – The
Statevector
, NumPy array, or list, which defines the behavior of the underlying function.coeff – A coefficient multiplying the state function.
is_measurement – Whether the StateFn is a measurement operator
Methods Defined Here
Return Operator addition of self and other, overloaded by
+
.Return a new Operator equal to the Operator's adjoint (conjugate transpose), overloaded by
~
.Evaluate the Operator's underlying function, either on a binary string or another Operator.
Permute the qubits of the state function.
Return a set of strings describing the primitives contained in the Operator.
Sample the state function as a normalized probability distribution.
Return tensor product between self and other, overloaded by
^
.Return
StateFnCircuit
corresponding to this StateFn.Return matrix representing product of StateFn evaluated on pairs of basis states.
Creates the equivalent state function of type DictStateFn.
Return NumPy representation of the Operator.
Return a
VectorStateFn
for thisStateFn
.Attributes
- INDENTATION = ' '¶
- coeff¶
A coefficient by which the state function is multiplied.
- instance_id¶
Return the unique instance id.
- is_measurement¶
Whether the StateFn object is a measurement Operator.
- num_qubits¶
- parameters¶
- primitive: Statevector¶
The primitive which defines the behavior of the underlying State function.
- settings¶
Return settings.