Skip to content

Commit

Permalink
Update module path to qiskit_unitary_gate
Browse files Browse the repository at this point in the history
  • Loading branch information
teaguetomesh committed Aug 31, 2023
1 parent 370ac70 commit 2422ce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torchquantum/plugin/qiskit/qiskit_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def append_fixed_gate(circ, func, params, wires, inverse):
circ.swap(*wires)
elif func == "sswap":
# square root of swap
from torchquantum.plugin.qiskit_unitary_gate import UnitaryGate
from torchquantum.plugin.qiskit.qiskit_unitary_gate import UnitaryGate

mat = mat_dict["sswap"].detach().cpu().numpy()
mat = switch_little_big_endian_matrix(mat)
Expand Down Expand Up @@ -308,7 +308,7 @@ def append_fixed_gate(circ, func, params, wires, inverse):
or func == "qubitunitaryfast"
or func == "qubitunitarystrict"
):
from torchquantum.plugin.qiskit_unitary_gate import UnitaryGate
from torchquantum.plugin.qiskit.qiskit_unitary_gate import UnitaryGate

mat = np.array(params)
mat = switch_little_big_endian_matrix(mat)
Expand Down Expand Up @@ -512,7 +512,7 @@ def tq2qiskit(
circ.swap(*module.wires)
elif module.name == "SSWAP":
# square root of swap
from torchquantum.plugin.qiskit_unitary_gate import UnitaryGate
from torchquantum.plugin.qiskit.qiskit_unitary_gate import UnitaryGate

mat = module.matrix.data.cpu().numpy()
mat = switch_little_big_endian_matrix(mat)
Expand Down Expand Up @@ -547,7 +547,7 @@ def tq2qiskit(
or module.name == "TrainableUnitary"
or module.name == "TrainableUnitaryStrict"
):
from torchquantum.plugin.qiskit_unitary_gate import UnitaryGate
from torchquantum.plugin.qiskit.qiskit_unitary_gate import UnitaryGate

mat = module.params[0].data.cpu().numpy()
mat = switch_little_big_endian_matrix(mat)
Expand Down

0 comments on commit 2422ce9

Please sign in to comment.