Skip to content

Commit

Permalink
Merge pull request #188 from teaguetomesh/update-plugin-path
Browse files Browse the repository at this point in the history
Update module path to qiskit_unitary_gate
  • Loading branch information
Hanrui-Wang authored Aug 31, 2023
2 parents 370ac70 + 2422ce9 commit 728592d
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 728592d

Please sign in to comment.