Skip to content

Commit

Permalink
Port TwoQubitControlledUDecomposer to rust (Qiskit#13139)
Browse files Browse the repository at this point in the history
* replace calls to TwoQubitWeylDecomposition by calling rust functions

* fix failing test

* add code for TwoQubitControlledUDecomposer in rust

* update try_inverse to inverse

* fix rust code. add rust docstrings

* remove python code

* update unitary in call

* handle global_phase

* minor fix

* fix lint

* set self.rxx_equivalent_gate

* check that rxx_equivalent_gate is a standard gate

* iterating over test_angles and scales

* add Vec capacity

* remove invert variable

* move comments from Python to Rust code

* remove new_inner function, move code into new

* call returns a CircuitData

* Support custom gates for decomposition too

This commit adds back the missing support for custom gate classes so
that a user defined gate class can be used with the decomposer.

* Remove bare panics

* Undo debug testing for invalid custom gate check

* Fix lint

* Fix python lint

* add default fidelity value

* add more gates for the tests

* assert that CustomXYGate raises an error

* update assertion in test

---------

Co-authored-by: Matthew Treinish <[email protected]>
  • Loading branch information
ShellyGarion and mtreinish authored Nov 13, 2024
1 parent 3a5257d commit 5de0232
Show file tree
Hide file tree
Showing 3 changed files with 547 additions and 150 deletions.
Loading

0 comments on commit 5de0232

Please sign in to comment.