Spanish
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

ScalarOp

class ScalarOp(dims=None, coeff=1)[fuente]

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.

Parámetros
  • dims (int or tuple) – subsystem dimensions.

  • coeff (Number) – scalar coefficient for the identity operator (Default: 1).

Muestra

QiskitError – If the optional coefficient is invalid.

Methods

adjoint

Return the adjoint of the Operator.

compose

Return the operator composition with another ScalarOp.

conjugate

Return the conjugate of the ScalarOp.

copy

Make a deep copy of current operator.

dot

Return the right multiplied operator self * other.

expand

Return the reverse-order tensor product with another ScalarOp.

input_dims

Return tuple of input dimension for specified subsystems.

is_unitary

Return True if operator is a unitary matrix.

output_dims

Return tuple of output dimension for specified subsystems.

power

Return the power of the ScalarOp.

reshape

Return a shallow copy with reshaped input and output subsystem dimensions.

tensor

Return the tensor product with another ScalarOp.

to_matrix

Convert to a Numpy matrix.

to_operator

Convert to an Operator object.

transpose

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