Skip to main content

license badge test status badge doc status badge pipy deployment status badge release badge github stars badge python versions badge

[alt:mpqp logo]

The MPQP library

MPQP stands for Multi-Platform Quantum Programming. It is a python library we at Colibri felt the need for but couldn't find a solution. We are working on quantum algorithms, but until now, there was no good solution to study quantum algorithms across devices, compares the devices, etc...

MPQP is thus the solution we bring to the community to tackle this problem.

[alt:mpqp examples]

On this page, you will find:

  1. how to install the library;
  2. how to start using it;
  3. and the current active contributors.

Install

For now, we support python versions 3.10 to 3.13, and every major OS (Windows, Linux and MacOS). We are dependant on the SDKs we support to enable various python versions and OS support, for instance, MPQP was validated on Ubuntu LTS 20.04, while Ubuntu 18.04 is not supported because myQLM does not support it.

The preferred installation method is with the pipy repo. In order to use this installation method, simply run

pip install mpqp

You can also clone this repo and install from source, for instance if you need to modify something. In that case, we advise you to have a look at our contribution guide.

Usage

To get started with MPQP, you can create a quantum circuit with a few gates, and run it against the backend of your choice:

from mpqp.core import QCircuit
from mpqp.gates import *
from mpqp.execution import run, IBMDevice
circ = QCircuit([H(0), H(1), Rx(0,0), CNOT(1,2), Y(2)])
print(circ)
#      ┌───┐┌───────┐
# q_0: ┤ H ├┤ Rx(0) ├─────
#      ├───┤└───────┘
# q_1: ┤ H ├────■─────────
#      └───┘  ┌─┴─┐  ┌───┐
# q_2: ───────┤ X ├──┤ Y ├
#             └───┘  └───┘
print(run(circ, IBMDevice.AER_SIMULATOR_STATEVECTOR))
# Result: IBMDevice, AER_SIMULATOR_STATEVECTOR
#   State vector: [0, 0.5j, -0.5j, 0, 0, 0.5j, -0.5j, 0]
#   Probabilities: [0, 0.25, 0.25, 0, 0, 0.25, 0.25, 0]
#   Number of qubits: 3

More details are available in our documentation.

Contributors


Henri de Boutray

Hamza Jaffali

Muhammad Attallah

JulienCalisto

Mathieu Gras

Thomas Benzino

Ahmed Bejaoui

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpqp-0.6.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

mpqp-0.6.1-py3-none-any.whl (263.3 kB view details)

Uploaded Python 3

File details

Details for the file mpqp-0.6.1.tar.gz.

File metadata

  • Download URL: mpqp-0.6.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for mpqp-0.6.1.tar.gz
Algorithm Hash digest
SHA256 2abd1e1ac4fd7231a51f97c7b0560c1fde6736f3907ed6b55088bb1eba2908d6
MD5 9436823adc4f115b02814f92f6d31795
BLAKE2b-256 4fbec52ad454ef87c0161525df0d7ed8291e731380bb6203a2b596c06d6490f7

See more details on using hashes here.

File details

Details for the file mpqp-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: mpqp-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 263.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for mpqp-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3a7a9ccad1a3b10e1a109fcfaf207f710c120198c14338c7711353d511b024
MD5 a41de4c47dafa6a32d12ce6411336e81
BLAKE2b-256 18fcf3ad9a73d24891733d9ca867e86454c4c77c5cb08feb3fb2cfbe80513ff4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.post1

2 files

0.0.0

2 files

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