Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backend transpilation issues (S.K. Synthesis, scheduling, custom definitions) #27

Merged
merged 6 commits into from
Feb 16, 2024

Conversation

MaxleDrut
Copy link

No description provided.

@MaxleDrut MaxleDrut force-pushed the fix-qasm2.0 branch 2 times, most recently from 26141f9 to d681068 Compare February 16, 2024 09:32
@MaxleDrut MaxleDrut requested a review from lprost February 16, 2024 09:33
Maxence Drutel added 6 commits February 16, 2024 09:52
Since the release of 1.0, our current limits on the version of qiskit-terra and aer were not enough to enforce Qiskit to be < 0.45. We now enforce it explicitely, as we have not yet migrated to version 1.0.
We were not properly mapping the virtual to physical qubits in our
custom pass manager, which resulted in the impossibility of using
the full capabilities of our backends.

Indeed, this prevented from defining circuits with multiple quantum
registries that Qiskit would have been able to a single physical
registry to run on.

This commit addresses that, adding a Layout when applying the custom
pass manager of our backends to ensure we can map qubits to physical
registries.
We are missing this step to be able to transpile circuits with custom
defined gates (such as Margolus). The gates are now unrolled to their
lowest definitions before being synthetized.
We used to apply the SK synthesis algorithm to the CZ & CCZ gates.
This behaviour was inappropriate as these gates are discrete gates,
and should not be approximated like a continuous one (e.g.: rZ(theta)).

The CZ & CCZ should rather be replaced by CX & CCX respectively in the
"Basis Translation" step of transpilation instead.

This commit does this by removing CZ & CCZ from the list of gates to
synthesize, so they will be ignored by the SK synthesis step.
@jrj-d
Copy link
Contributor

jrj-d commented Feb 16, 2024

That looked painful, congrats for getting to the bottom of it! 💯

@MaxleDrut MaxleDrut merged commit 3cc3a0a into main Feb 16, 2024
16 checks passed
@MaxleDrut MaxleDrut deleted the fix-qasm2.0 branch February 16, 2024 14:04
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.

2 participants