MatrixOp¶
- class MatrixOp(*args, **kwargs)[Quellcode]¶
Bases:
PrimitiveOp
Deprecated: Class for Operators represented by matrices, backed by Terra’s
Operator
module.Veraltet ab Version 0.24.0: The class
qiskit.opflow.primitive_ops.matrix_op.MatrixOp
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.- Parameter
primitive – The matrix-like object which defines the behavior of the underlying function.
coeff – A coefficient multiplying the primitive
- Verursacht
TypeError – invalid parameters.
ValueError – invalid parameters.
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
~
.Return Operator Composition between self and other (linear algebra-style: A@B(x) = A(B(x))), overloaded by
@
.Evaluate Equality between Operators, overloaded by
==
.Evaluate the Operator's underlying function, either on a binary string or another Operator.
Return a
CircuitOp
equivalent to e^-iH for this operator HCreates a new MatrixOp that acts on the permuted qubits.
Return a set of strings describing the primitives contained in the Operator.
Return tensor product between self and other, overloaded by
^
.Returns an
Instruction
equivalent to this Operator.Return NumPy representation of the Operator.
Returns a
MatrixOp
equivalent to this Operator.Attributes
- INDENTATION = ' '¶
- coeff¶
The scalar coefficient multiplying the Operator.
- Rückgabe
The coefficient.
- instance_id¶
Return the unique instance id.
- num_qubits¶
- parameters¶
- primitive: Operator¶
The primitive defining the underlying function of the Operator.
- Rückgabe
The primitive object.
- settings¶
Return operator settings.