Skip to content

Update providers package versions#177

Open
JulienCalistoTD wants to merge 48 commits intodevfrom
chore-update-provider
Open

Update providers package versions#177
JulienCalistoTD wants to merge 48 commits intodevfrom
chore-update-provider

Conversation

@JulienCalistoTD
Copy link
Collaborator

No description provided.

@hJaffaliColibritd hJaffaliColibritd changed the title update provider Update providers package versions Jan 23, 2026

$ pip install -U mpqp

Install specific providers
Copy link
Contributor

Choose a reason for hiding this comment

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

by default, mpqp comes with nothing right ? if so, I would change this title to somethings like "add more providers" because the current phrasing sounds like by default we install everything, and the section bellow shows us how to do partial installs

Copy link
Contributor

Choose a reason for hiding this comment

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

by the way, in case we install nothing by default, does this mean that by default we have no working backend ? this would be problematic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed to ""Add more providers": 8c9d06a. Yes by default we have no working backend. why it is problematic ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think is it, it's a bit unfriendly for new user to have to think about what backend they need at install time

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe put in the doc mpqp[all] in first and then Install specific providers

Copy link
Contributor

@hJaffaliColibritd hJaffaliColibritd Feb 12, 2026

Choose a reason for hiding this comment

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

Or maybe mapp pip install mpqp to install it like mpqp[all], (which is the current way of working), and the user only modifies this line if he wants restricted installation, which is in my opinion not the majority of the people

Comment on lines +43 to +88
- **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

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

for i in str_qiskit_circuit:
assert i in str_circuit
mpqp_qasm = QCircuit.from_other_language(str_circuit)
assert np.isclose(circuit.to_matrix(), mpqp_qasm.to_matrix()).all()
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't taste the same thing anymore, either we put the old test back or we change the name of the test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it don't test the same things but at the end it is check the custom gate validity so the name is good. And the old test just checking the str, it was breakable.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but you test to + from in the same test I understand the reasoning, but I'm not 100% behind it

Copy link
Contributor

@Henri-ColibrITD Henri-ColibrITD left a comment

Choose a reason for hiding this comment

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

see comments

Comment on lines +93 to +94
src_dir = (Path(app.srcdir) / "../examples/notebooks").absolute()
dest_dir = Path(app.srcdir) / "notebooks"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
src_dir = (Path(app.srcdir) / "../examples/notebooks").absolute()
dest_dir = Path(app.srcdir) / "notebooks"
app_dir = Path(app.srcdir).absolute()
src_dir = app_dir / "../examples/notebooks"
dest_dir = app_dir / "notebooks"

Comment on lines +111 to +112
src_dir = (Path(app.srcdir) / "../requirements_providers").absolute()
dest_dir = Path(app.srcdir) / "requirements_providers"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
src_dir = (Path(app.srcdir) / "../requirements_providers").absolute()
dest_dir = Path(app.srcdir) / "requirements_providers"
app_dir = Path(app.srcdir).absolute()
src_dir = app_dir / "../requirements_providers"
dest_dir = app_dir / "requirements_providers"

src_dir = (Path(app.srcdir) / "../requirements_providers").absolute()
dest_dir = Path(app.srcdir) / "requirements_providers"

os.makedirs(dest_dir, exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
os.makedirs(dest_dir, exist_ok=True)
dest_dir.mkdir(exist_ok=True)

src_dir = (Path(app.srcdir) / "../examples/notebooks").absolute()
dest_dir = Path(app.srcdir) / "notebooks"

os.makedirs(dest_dir, exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
os.makedirs(dest_dir, exist_ok=True)
dest_dir.mkdir(exist_ok=True)


os.makedirs(dest_dir, exist_ok=True)

if not os.path.exists(src_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if not os.path.exists(src_dir):
if not src_dir.exists():

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

for nb in os.listdir(src_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for nb in os.listdir(src_dir):
for nb in src_dir.iterdir():


os.makedirs(dest_dir, exist_ok=True)

if not os.path.exists(src_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if not os.path.exists(src_dir):
if not src_dir.exists():

f"Source requirements_providers directory not found: {src_dir}"
)

for fname in os.listdir(src_dir):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for fname in os.listdir(src_dir):
for fname in src_dir.iterdir():

found in notebooks/.
"""
notebooks_dir = Path(app.srcdir) / "notebooks"
os.makedirs(notebooks_dir, exist_ok=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
os.makedirs(notebooks_dir, exist_ok=True)
notebooks_dir.makedir(exist_ok=True)

os.makedirs(notebooks_dir, exist_ok=True)
output_file = notebooks_dir / "notebooks_toctree.rst"

notebooks = sorted(f for f in os.listdir(notebooks_dir) if f.endswith(".ipynb"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
notebooks = sorted(f for f in os.listdir(notebooks_dir) if f.endswith(".ipynb"))
notebooks = sorted(f for f in notebooks_dir.iterdir() if f.endswith(".ipynb"))

Comment on lines +136 to +141

with open(output_file, "w", encoding="utf-8") as f:
f.write(".. toctree::\n")
f.write(" :maxdepth: 1\n")
f.write(" :caption: Notebooks:\n\n")

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
with open(output_file, "w", encoding="utf-8") as f:
f.write(".. toctree::\n")
f.write(" :maxdepth: 1\n")
f.write(" :caption: Notebooks:\n\n")
prefix = """\.. toctree::
:maxdepth: 1
:caption: Notebooks:
"""
with open(output_file, "w", encoding="utf-8") as f:
f.write(prefix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants