Reg
CBitRef
dataclass
CBitRef(ref: CRegister, pos: int)
Object representing a reference to a classical bit.
pos
instance-attribute
pos: int
The position of this bit in the classical register.
ref
instance-attribute
ref: CRegister
The classical register that is holding this bit.
CRegister
CRegister(size: int)
Bases: list[MeasurementResultValue]
flowchart TD
bloqade.pyqrack.reg.CRegister[CRegister]
click bloqade.pyqrack.reg.CRegister href "" "bloqade.pyqrack.reg.CRegister"
Runtime representation of a classical register.
Source code in .venv/lib/python3.12/site-packages/bloqade/pyqrack/reg.py
15 16 | |
PyQrackQubit
dataclass
PyQrackQubit(
addr: int, sim_reg: QrackSimulator, state: QubitState
)
Bases: Qubit
flowchart TD
bloqade.pyqrack.reg.PyQrackQubit[PyQrackQubit]
bloqade.types.Qubit[Qubit]
bloqade.types.Qubit --> bloqade.pyqrack.reg.PyQrackQubit
click bloqade.pyqrack.reg.PyQrackQubit href "" "bloqade.pyqrack.reg.PyQrackQubit"
click bloqade.types.Qubit href "" "bloqade.types.Qubit"
The runtime representation of a qubit reference.
addr
instance-attribute
addr: int
The address of this qubit in the quantum register.
sim_reg
instance-attribute
sim_reg: QrackSimulator
The register of the simulator.
state
instance-attribute
state: QubitState
The state of the qubit (active/lost)
drop
drop()
Drop the qubit in-place.
Source code in .venv/lib/python3.12/site-packages/bloqade/pyqrack/reg.py
63 64 65 | |
is_active
is_active() -> bool
Check if the qubit is active.
Returns True if the qubit is active, False otherwise.
Source code in .venv/lib/python3.12/site-packages/bloqade/pyqrack/reg.py
54 55 56 57 58 59 60 61 | |