-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add Rustiq-based synthesis for PauliEvolutionGate
#13301
Add Rustiq-based synthesis for PauliEvolutionGate
#13301
Conversation
One or more of the following people are relevant to this code:
|
…iskit-terra into integrate_rustiq_plugin
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.
I just had a brief look, but overall this looks good to me -- I'll give a detailed review later 🙂
Pull Request Test Coverage Report for Build 11722744591Details
💛 - Coveralls |
…iskit-terra into integrate_rustiq_plugin
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.
LGTM - thanks!
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.
Looks pretty good to me! I've left a bunch of comments but they are all very small 🙂
…rotation injection
Thanks @Cryoris for a thorough review! I think I have addressed all of your review comments (and in a few cases explained why I don't want to address it). To keep track of your comments, I was marking them as resolved as I was going through them, so you will probably want to unresolve them to see if a deeper discussion is required. |
Making sure that the number of rotation gates in the synthesized circuit equals the number of non-trivial Pauli rotation gates.
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.
LGTM thanks for the updates!
Summary
Calls the
Rustiq's
synthesis algorithm for pauli networks natively from within Qiskit.Together with #13295 addresses #12789.
This should be rebased on top of #13295, in order to support the plugin interface structure for
PauliEvolutionGate
s.Rustiq is available at https://github.com/smartiel/rustiq-core
How to experiment
One can experiment with the new functionality by creating a
PauliEvolutionGate
and directly calling the newPauliEvolutionSynthesisRustiq
on this gate:Alternatively, one can create a circuit with
PauliEvolutionGate
s and specify "rustiq" via the synthesis config interface:Details:
The Qiskit Rust function
pauli_network_synthesis
calls thegreedy_pauli_network
function from therustiq-core
(in particular, most of the code is fully in Rust). However, the latter function only returns a sequence of Clifford gates, without the single-qubit rotations. Sopauli_network_synthesis
also adapts the code from Simon's private rustiq-plugin repository that simulates the circuit and inserts rotations wherever required.Preliminary Experiments:
To be updated (or maybe it would be even best to move this discussion to the issue #12789). After running some preliminary experiments on some specific examples (e.g. see #13285) and some hamlib examples (taken from https://github.com/Qiskit/benchpress/blob/main/benchpress/hamiltonian/hamlib/),
rustiq
can be amazingly powerful in many cases, greatly reducing the two-qubits gate-count and depth of the resulting circuit. On the other hand, there are also cases where Rustiq performs worse, i.e. creating a circuit with more gates.Some Concerns:
It is possible that some additional changes to Rustiq itself might be required.
ToDo: