P<'unit> Type
A product of coefficient-operator pairs: an ordered sequence of operators with an overall coefficient.
P represents a product term: c × (Ô₁ Ô₂ ⋯ Ôₙ), where c is a complex coefficient
and each Ôᵢ is an operator unit. The ordering is significant for non-commuting operators.
Examples:
a†₁ a₂ — two-operator product (hopping term) 0.5 × a†₁ a†₂ a₃ a₄ — four-operator product (two-electron integral) X₀ Z₁ X₂ — three-qubit Pauli string
The (*) operator performs tensor product of two products. Products can be collected into sums S to form Hamiltonians.
Record fields
| Record Field |
Description
|
The overall complex coefficient for the product.
|
|
The ordered array of coefficient-operator pairs in the product.
|
Instance members
| Instance member |
Description
|
Full Usage:
this.AppendToTerm
Parameters:
'unit
-
The unit to append.
Returns: P<'unit>
A new product with the unit added at the end.
|
Appends an operator unit to the end of this product.
|
Full Usage:
this.IsZero
Returns: bool
|
Indicates whether any coefficient is zero (making the entire product zero).
|
|
Returns a fully reduced (normalized) form of the product. Reduction moves all coefficients from individual units into the overall coefficient, leaving each unit with coefficient 1. Zero terms cause the entire product to become zero.
|
|
Static members
| Static member |
Description
|
Tensor product operator: concatenates two products. Computes P₁ ⊗ P₂ where the units of P₁ appear before P₂ in the result. Order matters for non-commuting operators.
|
|
|
|
|
|
|
|
|
|
|
Creates a product from an array of units with coefficient 1.
|
|
|
|
Creates a product from a single unit with coefficient 1.
|
|
|
|
|
The zero product (additive identity): coefficient zero, empty units.
|