Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't run both ZSX and ZSXX basis in Optimize1qGatesDecomposition
Currently in the Optimize1qGatesDecomposition transpielr pass we build a list of valid bases for the decomposer to synthesize the 1q unitary for. However, in the case of the overlapping bases ZSX and ZSXX if ZSXX is valid we end up doing the same work twice for no reason. ZSX and ZSXX produce the same basic output except ZSXX will always be the same or more efficient if multiple sx gates can be simplified to an x gate. So there is no need for us to run 2 decomposers in that case. This commit updates the pass to only run ZSXX if both ZSX and ZSXX are valid bases to use.
- Loading branch information