…cks - before routing (#12727)
* init
* up
* up
* Update builtin_plugins.py
* Update builtin_plugins.py
* reno
* Update builtin_plugins.py
* Update builtin_plugins.py
* Update peephole-before-routing-c3d184b740bb7a8b.yaml
* neko check
* check neko
* Update builtin_plugins.py
* test neko
* Update builtin_plugins.py
* Update builtin_plugins.py
* Update builtin_plugins.py
* lint
* tests and format
* remove FakeTorino test
* Update peephole-before-routing-c3d184b740bb7a8b.yaml
* Apply suggestions from code review
Co-authored-by: Matthew Treinish <[email protected]>
* comments from code review
* fix precision
* up
* up
* update
* up
* .
* cyclic import
* cycl import
* cyl import
* .
* circular import
* .
* lint
* Include new pass in docs
* Fix Split2QUnitaries dag manipulation
This commit fixes the dag handling to do the 1q unitary insertion.
Previously the dag manipulation was being done manually using the
insert_node_on_in_edges() rustworkx method. However as the original node
had 2 incoming edges for each qubit this caused the dag after running
the pass to become corrupted. Each of the new 1q unitary nodes would end
up with 2 incident edges and they would be in a sequence. This would result
in later passes not being able to correctly understand the state of the
circuit correctly. This was causing the unit tests to fail. This commit
fixes this by just using `substitute_node_with_dag()` to handle the
node substition, while doing it manually to avoid the overhead of
checking is probably possible, the case where a unitary is the product
of two 1q gates is not very common so optimizing it isn't super
critical.
* Update releasenotes/notes/peephole-before-routing-c3d184b740bb7a8b.yaml
* stricter check for doing split2q
* Update qiskit/transpiler/preset_passmanagers/builtin_plugins.py
Co-authored-by: Matthew Treinish <[email protected]>
* code review
* Update qiskit/transpiler/passes/optimization/split_2q_unitaries.py
Co-authored-by: Matthew Treinish <[email protected]>
* new tests
* typo
* lint
* lint
---------
Co-authored-by: Matthew Treinish <[email protected]>
(cherry picked from commit 1214d51)