Skip to content

Commit

Permalink
fixed xxplusyy matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
01110011011101010110010001101111 committed Aug 25, 2023
1 parent 4ba057f commit 5dc4ab8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/operator/test_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{"qiskit": qiskit_gate.CU1Gate, "tq": tq.CU1},
# {'qiskit': qiskit_gate.?, 'tq': tq.CU2},
{"qiskit": qiskit_gate.CU3Gate, "tq": tq.CU3},
# {"qiskit": qiskit_gate.ECRGate, "tq": tq.ECR},
{"qiskit": qiskit_gate.ECRGate, "tq": tq.ECR},
# {"qiskit": qiskit_library.QFT, "tq": tq.QFT},
{"qiskit": qiskit_gate.SdgGate, "tq": tq.SDG},
{"qiskit": qiskit_gate.TdgGate, "tq": tq.TDG},
Expand All @@ -88,7 +88,7 @@
{"qiskit": qiskit_gate.CSXGate, "tq": tq.CSX},
{"qiskit": qiskit_gate.DCXGate, "tq": tq.DCX},
{"qiskit": qiskit_gate.XXMinusYYGate, "tq": tq.XXMINYY},
# {"qiskit": qiskit_gate.XXPlusYYGate, "tq": tq.XXPLUSYY},
{"qiskit": qiskit_gate.XXPlusYYGate, "tq": tq.XXPLUSYY},
# {"qiskit": qiskit_gate.C3XGate, "tq": tq.C3X},
# {"qiskit": qiskit_gate.RGate, "tq": tq.R},
]
Expand Down
4 changes: 2 additions & 2 deletions torchquantum/functional/functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,15 +623,15 @@ def xxplusyy_matrix(params):
[
torch.tensor([[0]]),
co,
(-1j * si * torch.exp(-1j * beta)),
(-1j * si * torch.exp(1j * beta)),
torch.tensor([[0]]),
],
dim=-1,
),
torch.cat(
[
torch.tensor([[0]]),
(-1j * si * torch.exp(1j * beta)),
(-1j * si * torch.exp(-1j * beta)),
co,
torch.tensor([[0]]),
],
Expand Down

0 comments on commit 5dc4ab8

Please sign in to comment.