Register Layout API Reference¶
Logical registers wider than the 64-bit native machine word, backed by
multiple native words on a real SparseState.
Used by pysparq.rir and available as a public API.
Logical registers backed by multiple native words, without truncating high bits.
The C++ machine-word ABI stays intact. Every bit operation still executes on the real sparse-state backend; logical values are reconstructed as Python ints.
- class pysparq.register_layout.RegisterLayout(state: Any)[source]¶
Bases:
objectOwn logical register allocations in one native SparseState.
addreturns bit coordinates accepted by native gate operators.valuereads a complete logical word from a basis state, including every high word. Names must be distinct within the process-global native register namespace.