Skip to content

PublicQuantumNetwork/pqn-hardware

Repository files navigation

pqn-hardware

Hardware control library for the Public Quantum Network (PQN)

License: MIT Python 3.12+

pqn-hardware provides the instrument drivers, network messaging, and protocols used to operate hardware at PQN nodes. It is consumed as a library by the FastAPI-based Node service that lives in pqn-node, and can also be used standalone for bench experiments or scripts.

This package was split off from pqn-stack (now pqn-node) to let hardware work and app work evolve independently.

What's in here

  • pqn_hardware.baseInstrument protocols and common abstractions (rotator, timetagger, polarimeter, …).
  • pqn_hardware.network — ZMQ-based router, instrument provider, and client for cross-machine messaging between hardware and consumers.
  • pqn_hardware.pqn.drivers — concrete instrument drivers (Thorlabs rotators, TimeTagger, QKD, polarimeter, …).
  • pqn_hardware.pqn.protocols — quantum protocols (CHSH, QKD, tomography, visibility).
  • pqn_hardware.constants — shared polarization/Bell-state definitions used by both protocols and downstream consumers.
  • pqn-hw CLI — start an InstrumentProvider or a Router.

Install

git clone https://github.com/PublicQuantumNetwork/pqn-hardware.git
cd pqn-hardware
uv sync

Requires Python 3.12+ and uv.

Quick start

Start a router:

uv run pqn-hw start-router --config configs/config_messaging_example.toml

Start an instrument provider:

uv run pqn-hw start-provider --config configs/config_messaging_example.toml

Or pass config via CLI flags:

uv run pqn-hw start-provider \
  --name provider1 \
  --router-name router1 \
  --instruments '{"dummy1": {"import": "pqn_hardware.pqn.drivers.dummies.DummyInstrument", "desc": "Test Instrument", "hw_address": "123456"}}'

See configs/config_messaging_example.toml for the full config shape.

Consuming from pqn-node

pqn-node depends on this package via a git URL pinned to a tag or commit:

dependencies = [
    "pqn-hardware @ git+https://github.com/PublicQuantumNetwork/pqn-hardware.git@<tag-or-sha>",
]

Acknowledgements

The Public Quantum Network is supported in part by NSF Quantum Leap Challenge Institute HQAN under Award No. 2016136, Illinois Computes, and by the DOE Grant No. 712869, "Advanced Quantum Networks for Science Discovery."

Contact

Reach the PQN team at publicquantumnetwork@gmail.com.

About

Hardware control library for the Public Quantum Network stack.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors