Metadata-Version: 2.4
Name: pychorq
Version: 0.1.0
Summary: Simulated quantum backend for uvm-plaid/pychor
Project-URL: Repository, https://github.com/sbaldasty/pychorq
Project-URL: Issues, https://github.com/sbaldasty/pychorq/issues
Author: Steven Baldasty
License: MIT License
        
        Copyright (c) 2026 Steven Baldasty
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: networkx>=3.4.2
Requires-Dist: pychor>=0.2.2
Requires-Dist: qiskit-aer>=0.17.2
Requires-Dist: qutip-qip>=0.4.1
Requires-Dist: qutip>=5.2.3
Provides-Extra: dev
Requires-Dist: ipykernel; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: pip; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# 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:

```bash
pip install pychorq
```

For local development:

```bash
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.
