cuquantum.densitymat.jax.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[pysrc.operators.ElementaryOperator | pysrc.operators.MatrixOperator], *, modes: Optional[Sequence[int]] = None, conjs: Optional[Sequence[bool]] = None, duals: Optional[Sequence[bool]] = None, coeff: float = 1.0, coeff_callback: cuquantum.bindings.cudensitymat.WrappedScalarCallback | None = None, coeff_grad_callback: cuquantum.bindings.cudensitymat.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.