Skip to main content

OperatorProduct

Base class: Operator

Represents a product of operators without scalar coefficients. For products with coefficients (e.g., 2.0*X(0)*Y(1)), use OperatorSum instead. Create instances using the operator_prod() factory function.

Factories

operator_prod() -> OperatorProduct

Creates an empty OperatorProduct.

Returns

A new empty OperatorProduct.

Example

var my_prod = operator_prod() # Creates empty OperatorProduct

operator_prod(const Operator op) -> OperatorProduct

Creates an OperatorProduct from a single operator.

Parameters

  • op: The operator to include in the product.

Returns

A new OperatorProduct containing the operator.

Example

var my_prod = operator_prod(X(0)) # Creates OperatorProduct with single operator

Symbols

NameDescription
*=Multiplies this product by another operator, appending the operator to the product.
[]Accesses the entries of the product and returns the operator at specified index.

Members

NameDescription
sizeReturns the number of factors in the product.