Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MentPy: A Measurement-Based Quantum computing simulator.

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

image

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.

How to cite

If you use mentpy in your research, please cite it as follows:

@software{Mantilla_Mentpy_2023,
    title = {{MentPy: A python package for simulating and training QML models in the MBQC framework.}},
    author = {Mantilla Calderón, Luis},
    year = {2023},
    url = {https://github.com/mentpy/mentpy},
}

Metadata

Release files for mentpy 0.1.0a15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mentpy 0.1.0a15
File Size Uploaded Provenance
mentpy-0.1.0a15.tar.gz 49.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mentpy 0.1.0a15
File Interpreter ABI Platform
mentpy-0.1.0a15-py3-none-any.whl Python 3 none any Details

Total release size: 117.7 kB

Release files / mentpy-0.1.0a15.tar.gz

Download URL mentpy-0.1.0a15.tar.gz
Size 49.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3f7948d2b3bdbc2c178d9fe96b7b9487caaa7a0c308524436984d8044f953028
BLAKE2b-256 checksum
How to use checksums
44145a4e4835a136f2f236168cd5600aa717983198e0e6bd96c49472408f7c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release files / mentpy-0.1.0a15-py3-none-any.whl

Download URL mentpy-0.1.0a15-py3-none-any.whl
Size 67.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bca8970751b1bab5112eb3823de15a712963ab2d6aeb467f93f3db387ebb055e
BLAKE2b-256 checksum
How to use checksums
ec18d64c2ed4dae4f42244670e3d12083d7f5b6eafd8b355bd88ef850c5e33e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Security for mentpy 0.1.0a15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page