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.3.0

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.3.0
File Size Uploaded Provenance Actions
pnpq-0.3.0.tar.gz 38.5 kB Without provenance Details for pnpq-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 85.0 kB

Release files / pnpq-0.3.0.tar.gz

Download URL pnpq-0.3.0.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a5da6f203822371628893969fafbeec23207f54fe6a7c3dba3962045dc3f373
BLAKE2b-256 checksum
How to use checksums
36ca09065191e68d5ac749a429c99aa777a9e3d8ff4a1a512b17af30e5e1c182
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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

Download URL pnpq-0.3.0-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
017dbdf27734baa809a9cec1238db458553b59a66edcca75abb19b80635495cb
BLAKE2b-256 checksum
How to use checksums
917098c9e54c8fe9a978406cfa0b5ecc5f13144c8203c3d64d2a66e19c785f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pnpq 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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