IndexedTerms Module
Indexed operator types for tracking qubit/mode assignments.
Each IxOp wraps an operator unit with an integer index identifying which qubit (or fermionic mode) it acts on. This is essential for multi-qubit Pauli strings where the position of each Pauli matters: X₀ Z₁ I₂ Y₃ = XZIY.
Types
| Type | Description |
|
Specifies the ordering direction for indexed operators. |
|
|
An indexed operator that pairs a site/qubit index with an operator. |
|
|
A product of indexed operators, representing a tensor product of operators at specific sites. |
|
|
A sum of products of indexed operators, representing a linear combination. |
Functions and values
| Function or value |
Description
|
Full Usage:
isOrdered comparer xs
Parameters:
'a -> 'a -> bool
-
A function that returns true if the first argument should come before or equal to the second.
xs : 'a seq
-
The sequence to check for ordering.
Returns: bool
True if all adjacent pairs satisfy the comparator; false otherwise.
|
Checks whether a sequence is ordered according to a given comparator.
|
Full Usage:
tryParseIxOpUint32 unitFactory
Parameters:
string -> 'op option
-
A function that parses the operator from a string.
Returns: string -> IxOp<uint32, 'op> option
A parser function that returns Some IxOp on success, None on failure.
|
Parses an IxOp with a uint32 index from a string like "(op, 123)". This is a convenience function for the common case where indices are unsigned 32-bit integers (qubit numbers).
|