Operator#

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

PyTree class for cuDensityMat’s operator.

Methods

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

Initialize an Operator object.

Parameters:

dims – Hilbert space dimensions.

append(
op_term: OperatorTerm,
dual: bool = False,
coeff: float | complex | Array = 1.0,
) None[source]#

Append an operator term to an operator.

Parameters:
  • op_term – Operator term to be appended.

  • dual – Duality of the operator term.

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

  • coeff_requires_grad – Whether the coefficients require gradient.

Attributes

in_axes#

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