-
Notifications
You must be signed in to change notification settings - Fork 9
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
Transpiler integration refactor and qiskit v1.2 support #116
base: main
Are you sure you want to change the base?
Conversation
…pile_to_IQM broke here.
I pushed my changes in case someone wants to pick it up next week. I'll be back on the 12th. The main framework is set up, but the tests are currently failing because of some stupid bugs that are hard to find:
|
CHANGELOG.rst
Outdated
* Refactoring of the Qiskit transpiler: | ||
* The Qiskit transpiler now automatically uses the :class:`IQMOptimizeSingleQubitGates` pass to optimize single-qubit gates if the `optimization_level >= 0`. | ||
* You can now use the native Qiskit :meth:`transpile` method to transpile a circuit to the IQM Deneb backend as long as your circuit does not contain any resonators. | ||
* There are many new transpiler plugins available that you can use as the `scheduling_method` argument in Qiskit's :meth:`transpile` method. You can find them in following the `Qiskit documentation <https://docs.quantum.ibm.com/guides/transpiler-plugins>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only scheduling_method
? What about the other *_method args?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugins are only registered as scheduling_method
because they make assumptions about how much the circuit has been transpiled already. You can still combine them with the other transpiler args.
You could make our own optimization plugin or routing plugin, but that would be exposed to the user as a string making them overwrite the existing transpiler and making it impossible to augment it with an existing pass. So they would need to defined with an existing optimization/routing pass and we need a new class for each or combination of passes we want to support. That's not maintainable.
Note: This simple version of the mapper only works reliably with a single move qubit | ||
and resonator, and only if the circuit contains at least one move gate.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring should be more specific about what is being done. What if no initial layout makes the circuit valid for the given target? What does "single move qubit" mean here?
Is this function only called from transpile_to_IQM
?
Does it need an IQMBackend, or only an IQMTarget as input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is generate_initial_layout
even needed? As far as I can tell it's not called when you use transpile
, or provide an explicit target to transpile_to_IQM
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed if you have move gates in the circuit already to make sure that they are mapped properly. This use case is not supported when using the qiskit transpiler.
Minimal refactor of
transpile_to_IQM
to support qiskit v1.2.Part of COMP-1361
Task list:
IQMBackendBase
to use instead of BackenPropertiesOther changes:
create_run_request
to improve the experience when using different run options, by making them explicit arguments that our documentation can refer tocreate_run_request
documentation to avoid out-dated duplicated information.qubit_name_to_idx
andidx_to_qubit_name
inIQMBackendBase
to no longer return Optional, but raise an error when the name or index cannot be found. This improved mypy and pylint issues as well as user experience since these functions should never be called in a way that it would return None.