A Python library for simulating MBQC circuits
Project description
The mentpy library is an open-source software for simulations of
measurement-based quantum computing circuits. Currently, this package is in its alpha version and many features are still in development.
Installation
You can install the stable release of mentpy from PyPI using:
pip install mentpy
For the latest, potentially unstable version, you can install directly from the source:
pip install git+https://github.com/mentpy/mentpy.git
If you're contributing to mentpy and need to install development dependencies, you can do so using:
git clone https://github.com/mentpy/mentpy.git
cd mentpy
pip install -e '.[dev]'
This command installs mentpy in editable mode with its additional development dependencies.
Usage
To simulate a measurement pattern, you can use the mp.PatternSimulator.
import mentpy as mp
st = mp.templates.grid_cluster(2,4)
ps = mp.PatternSimulator(st)
output = ps(np.random.rand(len(st.outputc)))
For visualization of circuits, you can use the mp.draw(st) function
To calculate the lie algebra of a model $G_\theta$, you can use the mp.utils.calculate_lie_algebra function
lie_alg = mp.utils.calculate_lie_algebra(st)
len(lie_alg)
>> 16
Documentation
The documentation for mentpy can be found here.
Contributing
We welcome contributions to mentpy! Please see our contributing guidelines for more information.
License
mentpy is licensed under the Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mentpy-0.1.0a11.tar.gz.
File metadata
- Download URL: mentpy-0.1.0a11.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f85a6a8cbc23289ce6b969d69d515b4d6cbc20586b37f6facc1d73bea7dd3a6
|
|
| MD5 |
a62daea0a3553d7ca4c66341f572f2dc
|
|
| BLAKE2b-256 |
4e875fc5455bbf020c88687a3a7060de098f45467cd9b9bad0acac3932fb0f20
|
File details
Details for the file mentpy-0.1.0a11-py3-none-any.whl.
File metadata
- Download URL: mentpy-0.1.0a11-py3-none-any.whl
- Upload date:
- Size: 66.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a32bce9a6092a869978f750ee914bfd5472a6544f08c4359a6f7c3fcdc97889f
|
|
| MD5 |
a50009f1f0428531c9c9fd3f64329562
|
|
| BLAKE2b-256 |
0f2ee5384f5c80edc479f91c56e3c3faf6a298e1a41f5a28c6decceeac3fd862
|