Skip to content

Feat new gate - #191

Open
MathieuG-Colibri wants to merge 133 commits into
devfrom
feat-New-gate
Open

MathieuG-Colibri wants to merge 133 commits into
devfrom
feat-New-gate

Conversation

@MathieuG-Colibri

Copy link
Copy Markdown
Collaborator

Added native gates PRX and Rzz for IQM computers.

Also added the ComposedGate interface for future more complex gates.

Fixed adjust_measure for non continuous and partial observables.

Changed the overall translation from mpqp to Braket ==> stop padding the braket circuit with Id gates and accepting non continuous circuits. For the sake of more optimized hardware runs.

Also refactoring and future proofing.

JulienCalistoTD and others added 30 commits February 18, 2026 16:06
…aket_observable and submit_job_braket functions
Comment thread mpqp/tools/maths.py Outdated
Comment thread mpqp/core/instruction/gates/native_gates.py Outdated
Comment thread mpqp/core/instruction/gates/native_gates.py Outdated
Comment thread tests/core/instruction/gates/test_composed_gate.py
Comment thread mpqp/execution/devices.py Outdated
Comment thread mpqp/core/instruction/measurement/expectation_value.py Outdated
Comment thread mpqp/core/instruction/gates/custom_gate.py Outdated
Comment thread mpqp/execution/devices.py Outdated
Comment thread mpqp/core/circuit.py
Comment thread mpqp/core/instruction/gates/custom_controlled_gate.py Outdated
Comment on lines +214 to +217
try:
value = getattr(self, attr_name)
except NotImplementedError:
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ummm .... quand est-ce qu'on aurait besoin de ça ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dans certains cas, on a pas implémenté la traduction de la porte, genre pour cirq, et on renvoie explicitement NotImplementedError, c'est pour catch ça (oui c'est moche)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Et pourquoi on laisse pas l'erreur remonter du coup ? Si la porte est pas traduite, autant laisser la pipeline casser que silencieusement catch une erreur ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

C'est pas la traduction c'est le to_dict, c'est pour éviter de récupérer des attributs pas implémentées dans le dico, je me suis mal exprimé dans le commentaires au dessus, c'est que les cirq gates c'est le premier exemple qui m'est venu.
Dans cet exemple, ça lèverait une erreur de traduction sur le to_dict qui ne sert pas à traduire, donc pour moi faut catch cette erreur, vu qu'elle ne concerne pas cette fonction

@MoHermes

MoHermes commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

adjust_measure() is skipped for optimized AWS Braket expectation measures in generate_job(), causing a dimension mismatch between the observable eigenvalues and result probabilities when an ExpectationMeasure targets a subset of the circuit qubits.
This is fixed on dev in 2bf21b44, so update this branch from dev

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

Labels

AI documentation Improvements or additions to documentation enhancement New feature or request maintenance testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants