C<'unit> Type
A coefficient-operator pair: a complex coefficient times a single operator unit.
C represents the simplest term in the operator algebra: a scalar coefficient
multiplied by a single operator. Mathematically: c × Ô where c ∈ ℂ and Ô is an operator.
Examples:
1.0 × a†₂ — creation operator on mode 2 0.5 × X₀ — half times Pauli-X on qubit 0 i × Z₁ — imaginary unit times Pauli-Z on qubit 1
The (*) operator performs tensor product, yielding a P. The (+) operator combines like terms or creates a product.
Record fields
| Record Field |
Description
|
The complex coefficient multiplying the operator.
|
|
Full Usage:
Item
Field type: 'unit
|
The operator unit (e.g., a single ladder operator or Pauli).
|
Instance members
| Instance member |
Description
|
Full Usage:
this.IsZero
Returns: bool
|
Indicates whether the coefficient is zero (making the entire term zero).
|
|
Returns a reduced form with the coefficient sanitized (non-finite values become zero).
|
Static members
| Static member |
Description
|
Tensor product operator: multiplies two coefficient-operator pairs. Computes (c₁ × Ô₁) ⊗ (c₂ × Ô₂) = (c₁c₂) × (Ô₁ Ô₂). |
|
Sum operator: adds two coefficient-operator pairs. For like terms: (c₁ × Ô) + (c₂ × Ô) = (c₁ + c₂) × Ô. For unlike terms: creates a product term [c₁Ô₁ | c₂Ô₂]. |
|
|
|
Full Usage:
C.Apply(unit)
Parameters:
'unit
-
The operator unit.
Returns: C<'unit>
A C with Coeff = 1 and the given unit.
|
Creates a coefficient-operator pair with coefficient 1.
|