Skip to main content

Simulated quantum backend for uvm-plaid/pychor

Project description

pychorq

This package provides a tool for modeling quantum key distribution protocols, and other protocols that call for the transmission of qubits between actors, as choreographies.

Installation

Install from PyPI:

pip install pychorq

For local development:

pip install -e .[dev]

Core architecture

For its choreographic framework, pychorq extends pychor with a new local quantum backend. The backend supports classical messages in the same way the reference implementation supports sending messages between actors, but it also provides custom ownership logic when the messages are qubits or collections of qubits. In contrast to classical messages whose ownership list grows as they are passed around the network, ownership of quantum messages transitions from actor to actor, because qubits cannot be copied.

For modeling quantum systems, pychorq adds a qubit abstraction over the qutip quantum simulation library. Each qubit is its own object, and is backed by a quantum system. The backing quantum systems can combine as qubits become entangled, and can factor if qubits are measured. This approach eliminates the need for a single global quantum state, allows actors to add new qubits to a model dynamically, supports the messages-as-objects requirement of choreographic programming, and completely mediates access to quantum state matrixes through the Qubit objects.

See src/pychorq for the source code.

Examples

This package includes implementations of three sample quantum key distribution protocols: BB84, B92, and E91.

See /src/example for the source code of these examples. See /src/analysis for Jupyter notebooks that illustrate their use.

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

pychorq-0.1.0.tar.gz (192.9 kB view details)

Uploaded Source

Built Distribution

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

pychorq-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pychorq-0.1.0.tar.gz
  • Upload date:
  • Size: 192.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychorq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53a20b1b2f240d82934fc2fda4609e136f0ab813541c80f807024baeb7fcdba2
MD5 417ccf4306033811adb282e4d8e50d11
BLAKE2b-256 4d046cded1bdbf9d6feb4472c5875e674edb68d3a9644a85d024073ac34c323d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychorq-0.1.0.tar.gz:

Publisher: publish.yml on sbaldasty/pychorq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pychorq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychorq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1157ea85a0a1dccf64e1beacc709a27f310fa8b0e78c5d316a2fba64fd61ecf7
MD5 ce987278a1cb201a96dfe9133cf87dfc
BLAKE2b-256 2026ab96f4610836107c7b84c1968548d512e629c8ac91a04107633d8587269d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychorq-0.1.0-py3-none-any.whl:

Publisher: publish.yml on sbaldasty/pychorq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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