OperatorTerm#

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

PyTree class for cuDensityMat’s operator term.

Methods

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

Initialize an OperatorTerm object.

Parameters:

dims – Hilbert space dimensions.

append(
op_prod: Sequence[ElementaryOperator | MatrixOperator],
*,
modes: Sequence[int] | None = None,
conjs: Sequence[bool] | None = None,
duals: Sequence[bool] | None = None,
coeff: float = 1.0,
coeff_callback: WrappedScalarCallback | None = None,
coeff_grad_callback: WrappedScalarGradientCallback | None = None,
) 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.

  • duals – Dualities of the operator product.

  • coeff – Coefficient of the operator product.

  • coeff_callback – Forward callback for the coeffient.

  • coeff_grad_callback – Gradient callback for the coefficient.