Remove dead code branch from Optimize1qDecomposition
Python code
#13188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Since 8e5fab6 (gh-12959), this branch has been dead, and the Rust method alluded to in it (
compute_error_one_qubit_sequence
) was removed. This is occasionally - but for some reason not always - detected bypylint
, and it's a true error so should be removed.In fact, almost all of the Python code in
Optimize1qDecomposition
is dead from the perspective of that transpiler pass. However,Optimize1qCommutation
has no concept of safe API boundaries, and is in fact still using all of these methods (and the defaultUnitarySynthesis
plugin does a little too). A follow-up commit can reorganise the code to fix this, but this commit is intended to be mergeable faster, to unblock a couple of PRs that are triggering the pylint failure.Details and comments
This is the blocker on #13147 at the moment, and has occasionally appeared in other PRs. I'll follow this with a proper refactoring commit to sort out how the split between
Optimize1qDecomposition
,DefaultUnitarySynthesisPlugin
andOptimize1qCommutation
should work.