Rust-space TwoQubitBasisDecomposer
fails if KAK gate is not Rust-space standard
#12998
Labels
bug
Something isn't working
mod: transpiler
Issues and PRs related to Transpiler
Rust
This PR or issue is related to Rust code in the repository
Milestone
Environment
What is happening?
Since moving to Rust space, the
TwoQubitBasisDecomposer
has encoded an assumption that the given KAK gate is a Rust-spaceStandardGate
. This is true in most uses within Qiskit, but not necessarily user-defined targets.How can we reproduce the issue?
What should happen?
We should be able to output the circuit in that case.
Any suggestions?
The decomposition is actually internally successful, the problem is just the assumption that after
let kak_gate = kak_gate.extract::<OperationFromPython>()?;
, thenkak_gate.operation
internally stores aStandardGate
.We should actually check whether that's the case, and if not, avoid using the
CircuitData::from_standard_gates
fast-path constructor an instead use a general-purpose one.The text was updated successfully, but these errors were encountered: