ScalarOp¶
- class ScalarOp(dims=None, coeff=1)[source]¶
Bases:
LinearOp
Scalar identity operator class.
This is a symbolic representation of an scalar identity operator on multiple subsystems. It may be used to initialize a symbolic scalar multiplication of an identity and then be implicitly converted to other kinds of operator subclasses by using the
compose()
,dot()
,tensor()
,expand()
methods.Initialize an operator object.
- প্যারামিটার
dims (int or tuple) -- subsystem dimensions.
coeff (Number) -- scalar coefficient for the identity operator (Default: 1).
- রেইজেস
QiskitError -- If the optional coefficient is invalid.
Methods
Return the adjoint of the Operator.
Return the operator composition with another ScalarOp.
Return the conjugate of the ScalarOp.
Make a deep copy of current operator.
Return the right multiplied operator self * other.
Return the reverse-order tensor product with another ScalarOp.
Return tuple of input dimension for specified subsystems.
Return True if operator is a unitary matrix.
Return tuple of output dimension for specified subsystems.
Return the power of the ScalarOp.
Return a shallow copy with reshaped input and output subsystem dimensions.
Return the tensor product with another ScalarOp.
Convert to a Numpy matrix.
Convert to an Operator object.
Return the transpose of the ScalarOp.
Attributes
- atol = 1e-08¶
- coeff¶
Return the coefficient
- dim¶
Return tuple (input_shape, output_shape).
- num_qubits¶
Return the number of qubits if a N-qubit operator or None otherwise.
- qargs¶
Return the qargs for the operator.
- rtol = 1e-05¶