MatrixOperator#
-
class cuquantum.
densitymat. jax. MatrixOperator(data: Array)[source]# PyTree class for cuDensityMat’s matrix operator.
Methods
- __add__(
- other: MatrixOperator,
Sum of a matrix operator on the left with another matrix operator.
Adding a scalar is not supported: it is ambiguous between elementwise addition and adding
scalar * identity. Rejected here too so that the operator classes agree.
- __init__(data: Array) None[source]#
Initialize a MatrixOperator object.
- Parameters:
data – Data buffer of the matrix operator.
- __matmul__(
- other: MatrixOperator,
Matrix multiplication of two matrix operators acting on the same modes.
- __mul__(
- other: Number | Array,
Scalar multiplication.
- __rmul__(
- other: Number | Array,
Right scalar multiplication.
- __sub__(
- other: MatrixOperator,
Difference of a matrix operator on the left with another matrix operator.
Subtracting a scalar is not supported, for the same reason as in
__add__.
- dag() MatrixOperator[source]#
Conjugate transpose of a matrix operator.
Attributes
- batch_size#
- in_axes#
the data leaf always maps its leading batch axis (0), since every operator leaf must carry a batch dimension matching the state’s. A nested vmap peels one leading batch axis per level, so the same spec applies at every level.
- Type:
Return the in_axes PyTree spec for vmapping the operator
- mode_extents#
- num_modes#