forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage Rust circuit sequence construction for `OneQubitEulerDecompo…
…ser` (Qiskit#9583) * Leverage Rust circuit sequence construction for OneQubitEulerDecomposer This commit is a follow-up to Qiskit#9578 which added a rust implementation of the second half of the single qubit euler decomposition routines and leveraged them for the Optimize1qGatesDecomposition transpiler pass. With that PR the Optimize1qGatesDecomposition no longer was dependent on the OneQubitEulerDecomposer class. This commit continues from that PR and updates the OneQubitEulerDecomposer to leverage the same Rust implementation internally. Calling a decomposer object will internally call the rust function to generate a circuit sequence and then return either a QuantumCircuit or DAGCircuit (depending on the options). Similarly all the angle computation is done directly in Rust. * Add missing atol clamping to mod_2pi The python version of the OneQubitEulerDecomposer class had atol clamping on it's output from mod_2pi, when this function was ported to rust this was not included. At the time it was because nothing set the atol parameter when calling mod_2pi (the angle calculation in Qiskit#9185 did not have atol and the expansion to construct circuits for Optimize1qGatesDecomposition always used the default value). However, now that we're expanding OneQubitEulerDecomposer to internally do all the calculations in rust we need to support an adjustable atol which includes the missing endpoint clamping in mod_2pi. This commit adds this missing functionality to the function. * Add docstring to mod_2pi rust function * Remove mod_2pi python function
- Loading branch information
1 parent
f279b3e
commit dbf244b
Showing
2 changed files
with
94 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.