Skip to main content

PnPQ

Plug and Play with Quantum!

PnPQ is a Python library for controlling optical devices used in quantum network testbeds.

Features

Provides a blocking API that allows for control of Thorlabs and OzOptics devices including:

  • Optical delay lines
  • Optical switches
  • Motorized polarization controllers
  • Motorized rotation mounts

Uses Pint to enable safe, transparent conversion between standard scientific units of measurement and each device's internal representation (e.g., converting motor steps into degrees).

Unlike competing libraries, PnPQ's multithreaded architecture enables constant logging of status updates during usage, even while other commands are being sent.

High unit test coverage and complete type safety.

Documentation

The documentation can be found at https://moonshot-nagayama-pj.github.io/PnPQ/.

Example

Below is sample code that moves the paddles of a Thorlabs motorized polarization controller (mpc320) with serial number 123456789 to a position representing 160 degrees.

  with AptConnection(serial_number="123456789") as connection:
    device = PolarizationControllerThorlabsMPC320(connection=connection)
    device.move_absolute(ChanIdent.CHANNEL_1, 160 * pnpq_ureg.degree)

The with syntax is necessary in order to properly open and close the connection object.

More information can be found in the documentation's getting started guide.

Contributing

Please see CONTRIBUTING.md.

Getting help

If you have a specific question about how to use our software that is not answered by the documentation, please feel free to create a GitHub issue.

Citing

If our software significantly contributed to your research, we ask that you cite it in your publications.

The best way to do so is by using the metadata in our CITATION.cff file.

GitHub automatically generates APA and BibTeX-style citations from this file and makes them available from the "Cite this repository" link on the right-hand side. However, these citations do not include our DOI, making it difficult to locate our software. Please try to include either:

  • The concept DOI, which points to the software as a whole: 10.5281/zenodo.16886214.
    • This can also be found in CITATION.cff.
  • A version-specific DOI, which can be found by first looking up our concept DOI and then checking the list of available versions at Zenodo. A new DOI is generated for each release.

Metadata

Release files for pnpq 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pnpq 0.2.1
File Size Uploaded
pnpq-0.2.1.tar.gz 89.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pnpq 0.2.1
File Interpreter ABI Platform
pnpq-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 135.8 kB

Release files / pnpq-0.2.1.tar.gz

Download URL pnpq-0.2.1.tar.gz
Size 89.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e0cbfb056ce8507e711d4007b7e425cecf63838bdd35eba4965f6736e3a299ce
BLAKE2b-256 checksum
How to use checksums
c3d7f05ab39a17be9d50b8ab05c4ceff6ba1c18f588c576830ae1ef5fbff9125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Release files / pnpq-0.2.1-py3-none-any.whl

Download URL pnpq-0.2.1-py3-none-any.whl
Size 46.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c22ffe28cdbf5d5b8a48d9f5d739c6153c8029dfcadbfcc107289311f226dd73
BLAKE2b-256 checksum
How to use checksums
76b9ff98bd2722f4ec1b514763e5bb6a09d85484ce11faa3d557db089077660a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page