pqn-hardware#
pqn-hardware is the Python library that talks to the individual pieces of hardware around a Node. It provides the software abstraction for an instrument, the concrete drivers behind real devices, and the ZMQ messaging fabric that carries instrument calls across a Node’s intranet. It also ships a CLI, pqn-hw, that launches the Router and Instrument Provider processes a Node runs. pqn-node consumes it as a git-pinned dependency.
Repository: github.com/PublicQuantumNetwork/pqn-hardware
The three layers#
The library is organised into three layers, each documented on its own page:
Instruments & drivers — the
Instrumentabstraction (atyping.Protocol), the typed sub-protocols for time taggers, rotators, and polarimeters, the concrete drivers that back real devices, and theProxyInstrumentthat lets code drive a remote instrument as if it were local. See Instruments & drivers.Network transport — the ZMQ star that carries instrument calls: the Router (broker), the Instrument Providers that host instruments, and the Client side that calls them. In practice this is a single-router network. See Network transport: Router, Instrument Provider, Client.
The
pqn-hwCLI — the commands that stand up those processes during deployment:start-routerandstart-provider, and the TOML config that wires providers to a router. See The pqn-hw CLI.
How pqn-node uses it#
pqn-node pins pqn-hardware as a git dependency and consumes it two ways. In-process, the Node API drives instruments by calling ProxyInstruments — client-side handles whose method calls are marshalled across the Router to whichever Instrument Provider hosts the real device, so the Node API never needs to know which machine an instrument is plugged into. Out-of-process, a deployment uses the pqn-hw CLI to run the Router and Instrument Provider as long-lived processes. For the system-wide picture of how this fits with the Node API and the GUI, see Software Map.
Note
This layer is internal to a Node. The Router, Instrument Providers, and the instruments behind them live on the Node’s local network and are not reachable from outside it. Other Nodes never touch a peer’s pqn-hardware resources directly — all cross-Node interaction goes through the Node API, the only externally reachable component of a Node.
Where to go next#
Software Map — how
pqn-hardware,pqn-node, andpqn-guifit together, with request walkthroughs.pqn-node — the Node API service that consumes this library.
Physical Devices — build and wiring guides for the physical devices the drivers control.