寄存器布局 API 参考¶
超过 64 位原生机器字的逻辑寄存器,以多个原生机器字承载于真实
SparseState 。供 pysparq.rir 使用,
亦作为公共 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)[源代码]¶
基类:
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.