Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
cec1530
refactor: Update qiskit
JulienCalistoTD Nov 25, 2025
bcdee5b
fix: Update gphase handling in QASM conversion and circuit transpilation
JulienCalistoTD Dec 3, 2025
1039b20
chore: Update Python version to 3.10 in workflows, Dockerfile, and do…
JulienCalistoTD Dec 3, 2025
6eb91c0
chore: Remove unused badges
JulienCalistoTD Dec 3, 2025
4fa879d
test: Remove redundant transpilation parameters in replace_custom_gat…
JulienCalistoTD Dec 3, 2025
f23dba0
chore: Update dependencies and change qiskit order
JulienCalistoTD Jan 6, 2026
978bad1
Merge branch 'feat-install-limited-providers' into chore-update-provider
JulienCalistoTD Feb 3, 2026
0e7a5eb
chore: Python version 3.12 in CI and fix requirements for qiskit-aer
JulienCalistoTD Feb 3, 2026
508f42d
chore: Files formated
github-actions[bot] Feb 3, 2026
dce2d66
chore: cirq to version 1.5.0 for python 3.10
JulienCalistoTD Feb 3, 2026
546deaa
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 3, 2026
46798fe
chore: update code formatting and improve type hints across multiple …
JulienCalistoTD Feb 4, 2026
97b2de4
chore: Files formated
github-actions[bot] Feb 4, 2026
0aea08e
chore: update test_from_qiskit to use equivalence check with Operator
JulienCalistoTD Feb 4, 2026
8f932bf
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 4, 2026
18ff0c6
chore: Files formated
github-actions[bot] Feb 4, 2026
98537eb
pyright: update pyright ignore and imports from qiskit.circuit to qis…
JulienCalistoTD Feb 4, 2026
f86fbdd
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 4, 2026
dacaf62
chore: Files formated
github-actions[bot] Feb 4, 2026
b16e706
refactor: replace_custom_gate to accept targets parameter and e-<nb>…
JulienCalistoTD Feb 5, 2026
8e414d5
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 5, 2026
fbe8e12
chore: update cirq requirements for compatibility with Python versions
JulienCalistoTD Feb 5, 2026
b58081c
chore: Files formated
github-actions[bot] Feb 5, 2026
c261972
chore: update cirq requirements for Python version compatibility
JulienCalistoTD Feb 5, 2026
5a1928f
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 5, 2026
70c3c78
chore: enhance QASM parsing and measurement handling, add custom gate…
JulienCalistoTD Feb 9, 2026
b8d17b8
chore: add Python 3.13 to workflow matrix for testing
JulienCalistoTD Feb 10, 2026
f27011d
chore: update braket requirements to include setuptools
JulienCalistoTD Feb 10, 2026
453e4d4
chore: update requirements files to include setuptools
JulienCalistoTD Feb 10, 2026
e967d2b
chore: update dependency installation order and ensure setuptools is …
JulienCalistoTD Feb 10, 2026
88211ec
chore: remove setuptools from development requirements
JulienCalistoTD Feb 10, 2026
ee9d96c
chore: update requirements to include setuptools in development and m…
JulienCalistoTD Feb 10, 2026
5f7d835
chore: convert targets to list for consistency in ExpectationMeasure
JulienCalistoTD Feb 10, 2026
2822f60
doc: limited provider + fix notebook
JulienCalistoTD Feb 10, 2026
e0e5153
chore: Files formated
github-actions[bot] Feb 10, 2026
1ca2ab8
chore: add notebooks and requirements_providers to .gitignore
JulienCalistoTD Feb 10, 2026
68b3cd7
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 10, 2026
f222857
chore: update sphinx version constraints and cirq dependencies for Py…
JulienCalistoTD Feb 10, 2026
c92b68a
chore: correct sphinx version for Python 3.12 compatibility in requir…
JulienCalistoTD Feb 10, 2026
f940a6b
chore: add type hints to copy_notebooks and copy_requirements_provide…
JulienCalistoTD Feb 10, 2026
499d784
chore: Files formated
github-actions[bot] Feb 10, 2026
a4c16fc
Merge branch 'dev' into chore-update-provider
JulienCalistoTD Feb 10, 2026
6ea00fa
refactor: clean up documentation configuration and remove unused imports
JulienCalistoTD Feb 10, 2026
289f80a
chore: Files formated
github-actions[bot] Feb 10, 2026
8c9d06a
refactor: update notebook paths to use pathlib and generate toctree a…
JulienCalistoTD Feb 12, 2026
8f96d4a
chore: Files formated
github-actions[bot] Feb 12, 2026
dd14031
docs: update supported Python version to 3.13 in installation instruc…
JulienCalistoTD Feb 12, 2026
5c22543
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 12, 2026
aec6a1a
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
87e90d6
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
1df4025
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
0453596
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
63c9a4e
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
6e9e61b
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
132fcd3
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
64630c3
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
ec67d6c
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
bd9f5e2
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
4c27b3c
Update docs/conf.py
JulienCalistoTD Feb 25, 2026
2f7b45c
Update package versions in requirements files
JulienCalistoTD Feb 25, 2026
9d5b2b4
Update amazon-braket-sdk version specifications for Python compatibility
JulienCalistoTD Feb 25, 2026
611dd1c
Refactor notebook and requirements file handling in Sphinx configuration
JulienCalistoTD Feb 25, 2026
344628f
chore: Files formated
github-actions[bot] Feb 25, 2026
1aa5e93
Refactor matrix diagonal extraction for clarity and type checking
JulienCalistoTD Feb 26, 2026
2e0ded3
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 26, 2026
49e07bb
chore: Files formated
github-actions[bot] Feb 26, 2026
8c0d608
fix: Adjust gray code decomposition calls to ignore type report warnings
JulienCalistoTD Feb 26, 2026
0b321a2
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Feb 26, 2026
1f2c0e6
chore: Files formated
github-actions[bot] Feb 26, 2026
cc25d21
fix: fixed setuptools version at 81
MathieuG-Colibri Mar 4, 2026
3a0b513
docs: Update contribution guidelines and installation instructions fo…
JulienCalistoTD Mar 4, 2026
d744053
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Mar 4, 2026
fb1677d
chore: Files formated
github-actions[bot] Mar 4, 2026
a09329b
Update .github/workflows/tests.yml
JulienCalistoTD Mar 10, 2026
8fa9ec0
fix: update description for providers in workflow and improve noteboo…
JulienCalistoTD Mar 10, 2026
b05a869
Merge branch 'chore-update-provider' of https://github.com/ColibrITD-…
JulienCalistoTD Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
options:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
commit_ref:
description: Specific ref (branch, tag or SHA)
default: ""
Expand All @@ -27,7 +29,7 @@ on:
default: false
type: boolean
providers:
description: "Providers to enable (space-separated) e.g., 'qiskit cirq myqlm braket')"
description: "Providers to enable. Select 'all' or choose a specific provider."
required: false
default: "all"
type: choice
Expand All @@ -42,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', github.event.inputs.python_v) || '["3.10", "3.11"]') }}
python-version: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', github.event.inputs.python_v) || '["3.10", "3.11", "3.12", "3.13"]') }}
provider: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', github.event.inputs.providers) || (github.ref_name == 'main' && '["all", "qiskit", "cirq", "braket", "myqlm"]' || '["all"]')) }}
steps:
- name: Checkout repository
Expand All @@ -57,10 +59,8 @@ jobs:
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install ".[${{ matrix.provider }}]"
pip install -r requirements-dev.txt
providers_comma=$(echo "${{ matrix.provider }}" | sed 's/ /,/g')
echo "$providers_comma"
pip install ".[$providers_comma]"
- name: Install os specific dependencies
if: ${{ github.event.inputs.long == 'true' || github.ref_name == 'main' }}
run: |
Expand All @@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', github.event.inputs.python_v) || '["3.10", "3.11"]') }}
python-version: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', github.event.inputs.python_v) || '["3.10", "3.11", "3.12", "3.13"]') }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements-all.txt
pip install -r requirements-dev.txt
- name: Run type checker
run: pyright
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# build artifacts
build/
docs/notebooks/
docs/requirements_providers/
docs/html/
out/

Expand Down
16 changes: 9 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ repository, and find the one you need to modify to achieve your goal.

Here are some useful scripts for when you are developing:

| Command | Description |
| ------------------------------------- | ----------------------------------------- |
| `sphinx-build -b html docs build` | Builds the documentation |
| `python -m pytest` | Runs the test suite |
| `python -m pytest --long` | Runs the long tests too |
| `python -m pytest --long-local` | Runs the local long tests |
| `python -m pytest --seed=<your_seed>` | Runs the test suite with a specified seed |
| Command | Description |
| ---------------------------------------- | --------------------------------------------- |
| `sphinx-build -b html docs build` | Builds the documentation |
| `python -m pytest` | Runs the test suite |
| `python -m pytest --long` | Runs the long tests too |
| `python -m pytest --long-local` | Runs the local long tests |
| `python -m pytest --seed=<your_seed>` | Runs the test suite with a specified seed |
| `python -m pytest --provider <provider>` | Runs the test suite with a specified provider |


When making commits, make sure to follow the
[conventional commit](https://www.conventionalcommits.org/en/v1.0.0/)
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Stage 1: Build dependencies
FROM python:3.9 AS builder
FROM python:3.10 AS builder

WORKDIR /usr/src/app

COPY requirements.txt requirements-dev.txt ./
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements-dev.txt

FROM python:3.9
FROM python:3.10

RUN apt update && \
apt install -y \
Expand All @@ -27,7 +27,7 @@ RUN chmod +x linux_awscli_install.sh && ./linux_awscli_install.sh

WORKDIR /usr/src/app/mpqp

COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY .. /usr/src/app/mpqp/

COPY requirements.txt requirements-dev.txt /usr/src/app/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ On this page, you will find:

## Install

For now, we support python versions 3.9 to 3.11, and every major OS (Windows,
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.
Expand Down
3 changes: 1 addition & 2 deletions docs/all-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ mpqp
execution
qasm
tools
local_storage
environment
local_storage
68 changes: 67 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import annotations

import os
from pathlib import Path
import shutil
import sys
from typing import Literal

Expand Down Expand Up @@ -40,7 +42,6 @@
"sphinx_rtd_dark_mode",
"sphinx_copybutton",
"nbsphinx", # requires pandoc ?
"nbsphinx_link",
]
default_dark_mode = True
autodoc_typehints = "description"
Expand Down Expand Up @@ -87,6 +88,68 @@
\sphinxcode{\sphinxupquote{\strut {{ docname | escape_latex }}}} \dotfill}}
"""


def copy_notebooks(app: Sphinx):
app_dir = Path(app.srcdir).absolute()
src_dir = app_dir / "../examples/notebooks"
dest_dir = app_dir / "notebooks"

dest_dir.mkdir(exist_ok=True)

if not src_dir.exists():
raise FileNotFoundError(f"Source notebooks directory not found: {src_dir}")

for nb in src_dir.iterdir():
if nb.suffix == ".ipynb":
shutil.copy2(src_dir / nb, dest_dir)


def copy_requirements_providers(app: Sphinx):
"""
Copy requirements_providers/*.txt into docs/requirements_providers
so Sphinx can access them.
"""
app_dir = Path(app.srcdir).absolute()
src_dir = app_dir / "../requirements_providers"
dest_dir = app_dir / "requirements_providers"

dest_dir.mkdir(exist_ok=True)

if not src_dir.exists():
raise FileNotFoundError(
f"Source requirements_providers directory not found: {src_dir}"
)

for src_file in src_dir.glob("*.txt"):
dest_file = dest_dir / src_file.name

if dest_file.exists():
dest_file.unlink()

shutil.copy2(src_file, dest_file)


def generate_notebooks_toctree(app: Sphinx):
"""
Automatically generate a toctree listing all notebooks
found in notebooks/.
"""
notebooks_dir = Path(app.srcdir) / "notebooks"
notebooks_dir.mkdir(exist_ok=True)
output_file = notebooks_dir / "notebooks_toctree.rst"

notebooks = sorted(f for f in notebooks_dir.iterdir() if f.suffix == ".ipynb")
prefix = """.. toctree::
:maxdepth: 1
:caption: Notebooks:

"""
with open(output_file, "w", encoding="utf-8") as f:
f.write(prefix)
for nb in notebooks:
f.write(f" notebooks/{nb.stem}\n")


# The suffix of source filenames.
source_suffix = ".rst"

Expand Down Expand Up @@ -385,4 +448,7 @@ def maybe_skip_member(


def setup(app: Sphinx):
app.connect("builder-inited", copy_notebooks)
app.connect("builder-inited", copy_requirements_providers)
app.connect("autodoc-skip-member", maybe_skip_member)
app.connect("builder-inited", generate_notebooks_toctree)
12 changes: 1 addition & 11 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,4 @@ Examples
On this page, you will find a few notebooks we provide as examples for various
``MPQP`` features.

.. toctree::
:maxdepth: 1
:caption: Notebooks:

notebooks/1_Basics_of_circuit
notebooks/2_Execution_Bell_circuit
notebooks/3_Expectation_value_of_observables
notebooks/4_Quantum_Fourier_Transform
notebooks/5_Variational_Quantum_Algorithms
notebooks/6_Noise_Simulation
notebooks/8_TSP_QAOA
.. include:: notebooks/notebooks_toctree.rst
2 changes: 1 addition & 1 deletion docs/gates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Custom Gates
Controlled Custom Gates
-----------------------

.. automodule:: mpqp.core.instruction.gates.controlled_custom_gate
.. automodule:: mpqp.core.instruction.gates.custom_controlled_gate
82 changes: 77 additions & 5 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,95 @@ Installation
.. TODO: grab the compatibility matrix from MyQLM and relax our requirements
.. when possible, test on many different configurations (tox or other ?)

For now, we support Python versions 3.9 to 3.11, and all of Windows, Linux and
For now, we support Python versions 3.10 to 3.13, and all of Windows, Linux and
MacOS (specifically, Linux was validated on Ubuntu LTS 20.04, while Ubuntu 18.04
is not supported, so your milage may vary).

To install mpqp, you can run in a terminal
To install mpqp, you can run in a terminal:

.. code-block:: console

$ pip install mpqp

And if you have already a previous version and want to update to the latest
version, run instead
If you have already a previous version and want to update to the latest version,
run instead:

.. code-block:: console

$ pip install -U mpqp

.. note::
To keep the installation lightweight and avoid installing unnecessary
dependencies, each provider is distributed as a **separate pip extra**.
By default, only the core functionalities of ``mpqp`` and qiskit local
simulation are installed, which means that you can create and manipulate circuits,
but you won't be able to run them on any backend.

Add more providers
--------------------------

``mpqp`` provides integrations with several quantum SDKs and execution backends.

- **Installing all providers**:

.. code-block:: console

$ pip install mpqp["all"]


- **Qiskit**:

.. code-block:: console

$ pip install mpqp["qiskit"]

.. literalinclude:: requirements_providers/qiskit.txt
:language: text

- **Azure Quantum**:

.. code-block:: console

$ pip install mpqp["azure"]

.. literalinclude:: requirements_providers/azure.txt
:language: text

- **Amazon Braket**:

.. code-block:: console

$ pip install mpqp["braket"]

.. literalinclude:: requirements_providers/braket.txt
:language: text

- **myQLM**:

.. code-block:: console

$ pip install mpqp["myqlm"]

.. literalinclude:: requirements_providers/myqlm.txt
:language: text


- **Cirq**:

.. code-block:: console

$ pip install mpqp["cirq"]

.. literalinclude:: requirements_providers/cirq.txt
:language: text

Comment on lines +46 to +91
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are this soerted in any kind of order ? alphabetical, date of release, number of downloads, ...

Copy link
Collaborator Author

@JulienCalistoTD JulienCalistoTD Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, you want a specific order ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nb downloads maybe ? let's discuss this tomorrow


You can also combine extras, for example, to install both Qiskit and Braket support:

.. code-block:: console

$ pip install mpqp["qiskit", "braket"]

.. note::
For Mac users, additional steps are required before installation,
specifically because of the ``myqlm`` library. To run these steps, you can
Expand All @@ -36,7 +108,7 @@ version, run instead
$ curl -L https://raw.githubusercontent.com/ColibrITD-SAS/mpqp/main/mac-install.sh | bash -s -- <your-python-bin>

where ``<your-python-bin>`` is the binary you use to invoke python. For instance, it could
be ``python``, ``python3``, or ``python3.9``.
be ``python``, ``python3``, or ``python3.10``.

.. warning::
The migration from ``qiskit`` version ``0.x`` to ``1.x`` caused a few issues.
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ on the current available SDKs:
vqa
qasm
tools
environment
local_storage
changelog
examples
Expand Down
3 changes: 0 additions & 3 deletions docs/notebooks/1_Basics_of_circuit.nblink

This file was deleted.

3 changes: 0 additions & 3 deletions docs/notebooks/2_Execution_Bell_circuit.nblink

This file was deleted.

3 changes: 0 additions & 3 deletions docs/notebooks/3_Expectation_value_of_observables.nblink

This file was deleted.

3 changes: 0 additions & 3 deletions docs/notebooks/4_Quantum_Fourier_Transform.nblink

This file was deleted.

3 changes: 0 additions & 3 deletions docs/notebooks/5_Variational_Quantum_Algorithms.nblink

This file was deleted.

3 changes: 0 additions & 3 deletions docs/notebooks/6_Noise_Simulation.nblink

This file was deleted.

Loading