PauliRegisterSequence Type
Represents a sum of PauliRegisters with complex coefficients.
A PauliRegisterSequence represents a linear combination of Pauli strings, which is the standard form for qubit Hamiltonians:
H = Σₐ cₐ σₐ = c
Terms with identical Pauli signatures are automatically combined by summing their coefficients. Terms that cancel (coefficient becomes zero) are removed.
Example: A 2-qubit Heisenberg coupling might be represented as:
H = J
Constructors
| Constructor |
Description
|
Full Usage:
PauliRegisterSequence(registerSets)
Parameters:
PauliRegisterSequence[]
-
Array of PauliRegisterSequences to merge.
Returns: PauliRegisterSequence
|
Creates a PauliRegisterSequence by combining multiple sequences. All terms from all input sequences are combined, with like terms summed. Each input sequence's coefficient is distributed to its terms before merging.
|
Full Usage:
PauliRegisterSequence(registers)
Parameters:
PauliRegister[]
-
Array of Pauli terms to sum.
Returns: PauliRegisterSequence
|
Creates a PauliRegisterSequence from an array of PauliRegisters. Terms with identical signatures are automatically combined.
|
|
Creates an empty PauliRegisterSequence with unit coefficient.
|
Instance members
| Instance member |
Description
|
Full Usage:
this.AsString
Returns: Lazy<string>
|
Lazily computed string representation of the sum.
|
|
Gets the global coefficient of this sequence.
|
Full Usage:
this.DistributeCoefficient
Returns: PauliRegisterSequence
A PauliRegisterSequence where each term's coefficient is multiplied by
the sequence's global coefficient, and the global coefficient is reset to 1.
|
Returns a new sequence with the global coefficient distributed to all terms. Transforms: c · (c₁σ₁ + c₂σ₂) → (c·c₁)σ₁ + (c·c₂)σ₂
|
Full Usage:
this[key]
Parameters:
string
-
The signature string (e.g., "XYZ").
Returns: bool * PauliRegister
A tuple (found, register) where found indicates if the key exists.
|
Looks up a term by its Pauli signature.
|
Full Usage:
this.SummandTerms
Returns: PauliRegister array
An array of PauliRegisters representing each term in the sum.
|
Gets all the individual Pauli terms in this sequence.
|
Static members
| Static member |
Description
|
Full Usage:
l * r
Parameters:
PauliRegisterSequence
-
The left sequence.
r : PauliRegisterSequence
-
The right sequence.
Returns: PauliRegisterSequence
A new PauliRegisterSequence containing all pairwise products of terms.
|
Multiplies two PauliRegisterSequences, distributing over all terms.
Computes the full product by distributing multiplication:
If both sequences have m and n terms respectively, the result may have up to m×n terms (fewer if some products combine or cancel).
|