Skip to main content

A Python library for simulating MBQC circuits

Project description

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},
}

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

mentpy-0.1.0a13.tar.gz (49.4 kB view details)

Uploaded Source

Built Distribution

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

mentpy-0.1.0a13-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

Details for the file mentpy-0.1.0a13.tar.gz.

File metadata

  • Download URL: mentpy-0.1.0a13.tar.gz
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for mentpy-0.1.0a13.tar.gz
Algorithm Hash digest
SHA256 aa1b904548b7e1050cf152c47c9506d6158f9c11400626486f0af6f5fcd74b2a
MD5 6b967b3a31673ce5118100fe52cf371a
BLAKE2b-256 8f9dd3863498623bd4ec18a8df02f077b428e76895a0d41978a6554726b7d479

See more details on using hashes here.

File details

Details for the file mentpy-0.1.0a13-py3-none-any.whl.

File metadata

  • Download URL: mentpy-0.1.0a13-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for mentpy-0.1.0a13-py3-none-any.whl
Algorithm Hash digest
SHA256 e99f2ceb51d2e58f40f7a96cc2869eac1b6f96ad40f9c42048e0375913d7a216
MD5 f714802e34e35e4dda14213112011166
BLAKE2b-256 87913e20fb9ac3193be7f1552c2f9981f0a6e3a28b57a1628490f31129cff37f

See more details on using hashes here.

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