Skip to main content

Python library for laboratory devices often used in quantum networking and computing testbeds.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pnpq-0.1.0.tar.gz (84.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pnpq-0.1.0-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file pnpq-0.1.0.tar.gz.

File metadata

  • Download URL: pnpq-0.1.0.tar.gz
  • Upload date:
  • Size: 84.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.11

File hashes

Hashes for pnpq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd1562ec3a000338d2ba8475d8378247b727b776dd0d1b94ed3e61fe1fd5b321
MD5 b8d486b70fbad1dc29c65268682fa881
BLAKE2b-256 551fbbc17a2f39d7a715299ff41b9e5f72c908b9522375da1b39552f28ddf093

See more details on using hashes here.

File details

Details for the file pnpq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pnpq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.11

File hashes

Hashes for pnpq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c87ccb655baad61e2627242f36553d2073d75e5cdab4098563f7704e1cfcd9c2
MD5 ee25e75e44c3ee3e5b30a6263cc5a14e
BLAKE2b-256 1c02d86245323f436cb365d3415bdea3e4a38a73307fdab566a1ddedaee03767

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page