OperatorProduct
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
Identity() -> OperatorProduct
Returns the identity operator.
Example
var id = Identity()
operator_prod() -> OperatorProduct
Creates an empty OperatorProduct.
Returns
A new empty OperatorProduct.
Example
var my_prod = operator_prod() # Creates empty OperatorProduct
operator_prod(const OperatorProduct op_prod) -> OperatorProduct
Creates an OperatorProduct from an existing OperatorProduct.
Parameters
- op_prod: The OperatorProduct.
Returns
A new OperatorProduct.
Example
var my_prod = operator_prod(X(0) * Y(2)) # Creates 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
| Name | Description |
|---|---|
*= | 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
| Name | Description |
|---|---|
| size | Returns the number of factors in the product. |