Commit 5f8d50e 1 parent 2103dc8 commit 5f8d50e Copy full SHA for 5f8d50e
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 12
12
13
13
from qat .core .wrappers .circuit import Circuit as myQLM_Circuit
14
14
from braket .circuits import Circuit as braket_Circuit
15
+ from qiskit .quantum_info import Operator
15
16
from sympy import Basic , Expr
16
17
from typeguard import typechecked , TypeCheckError
17
18
@@ -644,14 +645,13 @@ def to_other_language(
644
645
Language .QISKIT , qiskit_parameters
645
646
)
646
647
assert isinstance (qiskit_inst , CircuitInstruction ) or isinstance (
647
- qiskit_inst , Operation
648
- )
648
+ qiskit_inst , Operation ) or isinstance (qiskit_inst , Operator )
649
649
cargs = []
650
650
651
651
if isinstance (instruction , CustomGate ):
652
- new_circ .unitary (instruction .to_other_language (), instruction .targets )
653
- #TODO hamza: to test
654
- break
652
+ new_circ .unitary (instruction .to_other_language (), instruction .targets , instruction . label )
653
+ #TODO hamza: to test, maybe need to reverse the order of elements in the matrix
654
+ continue
655
655
elif isinstance (instruction , ControlledGate ):
656
656
qargs = instruction .controls + instruction .targets
657
657
elif isinstance (instruction , Gate ):
You can’t perform that action at this time.
0 commit comments