Metadata-Version: 2.1
Name: stabilizer-toolkit
Version: 0.1.0
Summary: A toolkit for working with the stabilizer formalism: stabilizer states, rank, decompositions, etc.
License: Apache-2.0
Author: Amir Ebrahimi
Author-email: github@aebrahimi.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: helpers
Provides-Extra: states
Requires-Dist: cirq (>=1.1.0,<2.0.0) ; extra == "helpers"
Requires-Dist: numpy (>=1.23,<1.24)
Requires-Dist: psutil (>=5.9.5,<6.0.0)
Requires-Dist: ray (>=2.3.1,<3.0.0)
Requires-Dist: stabilizer-states (>=0.1.1,<0.2.0) ; extra == "states"
Requires-Dist: tqdm (>=4.65.0,<5.0.0)
Description-Content-Type: text/markdown

# Stabilizer Toolkit
[![pypi](https://img.shields.io/pypi/v/stabilizer-toolkit.svg)](https://pypi.org/project/stabilizer-toolkit/)

This Python package is a toolkit that can help with the analysis of multi-qubit magic states (e.g. their rank and 
related decompositions). The code originated to support the research for my Master's Thesis at UT Austin: 
[CCZ Magic](ccz_magic.pdf).

## Usage

```python
from stabilizer_states import StabilizerStates
from stabilizer_toolkit.decompositions import rank2, validate_decompositions
from stabilizer_toolkit.magic_states import enumerate_ccz

S3 = StabilizerStates(3)
_, CCZ, _, _ = next(enumerate_ccz(3))
decompositions, coeffs = rank2.search_all_stabilizer_states(CCZ, S3)
validate_decompositions(CCZ, decompositions, coeffs)
```

For more usage take a look at the example [notebooks](notebooks).

## Installation
The package is available on [pypi](https://pypi.org/project/stabilizer-toolkit/) and installable via `pip`:
```shell
pip install stabilizer-toolkit 
```

You may also want to install the optional [stabilizer-states](https://pypi.org/project/stabilizer-states/) package, 
which provides the stabilizer datasets for n <= 6, then you can install with the `states` extras:
```shell
pip install stabilizer-toolkit[states] 
```

There are also additional helpers that require the use of additional libraries, so you may also want to install those:
```shell
pip install stabilizer-toolkit[states,helpers] 
```

## Development
If you'd like to work with a development copy, then clone this repository and install via 
[`poetry`](https://python-poetry.org/docs/#installation):
```shell
poetry install -vvv --with dev --all-extras
```
