OperatorTerm#

class cuquantum.densitymat.jax.OperatorTerm(dims: Sequence[int])[source]#

PyTree class for cuDensityMat’s operator term.

Methods

__add__(
other: OperatorTerm,
) OperatorTerm[source]#

Sum of two operator terms.

__init__(dims: Sequence[int]) None[source]#

Initialize an OperatorTerm object.

Parameters:

dims – Hilbert space dimensions.

__matmul__(
other: OperatorTerm,
) OperatorTerm[source]#

Composition of two operator terms.

__mul__(
other: Number | Array,
) OperatorTerm[source]#

Scalar multiplication on an operator term.

__rmul__(
other: Number | Array,
) OperatorTerm[source]#

Right scalar multiplication on an operator term.

__sub__(
other: OperatorTerm,
) OperatorTerm[source]#

Difference of two operator terms.

append(
op_prod: Sequence[ElementaryOperator | MatrixOperator],
modes: Sequence[int] | None = None,
conjs: Sequence[bool] | None = None,
duals: Sequence[bool] | None = None,
coeff: Number | Array = 1.0,
) None[source]#

Append an elementary or matrix product to an operator term.

Parameters:
  • op_prod – Product of elementary or matrix operators to be appended.

  • modes – Modes acted on by the operator product.

  • conjs – Conjugations in the operator product. Only applies to MatrixOperators.

  • duals – Dualities of the operator product.

  • coeff – Non-batched coefficient or batched coefficients of the operator product.

dag() OperatorTerm[source]#

Conjugate transpose of the operator term.

Attributes

in_axes#

Return the in_axes PyTree spec for vmapping over the batch dimension.