Skip to content

Commit

Permalink
Merge pull request #98 from qiboteam/dev_givens
Browse files Browse the repository at this point in the history
Givens gate in basis_rotation.py
  • Loading branch information
chmwzc authored Apr 18, 2024
2 parents 2440399 + bcc8586 commit fce21de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qibochem/ansatz/basis_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def basis_rotation_gates(A, z_array, parameters):
for j in range(N):
for i in range(N):
if A[i][j] == 0:
# print("CRY", i, i + 1, A[i+1][j]-1, z_array[A[i + 1][j] - 1])
gate_list.append(gates.CNOT(i + 1, i))
gate_list.append(gates.CRY(i, i + 1, z_array[A[i + 1][j] - 1]))
# gate_list.append(gates.CNOT(i + 1, i))
# gate_list.append(gates.CRY(i, i + 1, z_array[A[i + 1][j] - 1]))
gate_list.append(gates.GIVENS(i + 1, i, z_array[A[i + 1][j] - 1]))
ordered_angles.append(z_array[A[i + 1][j] - 1])
gate_list.append(gates.CNOT(i + 1, i))
# gate_list.append(gates.CNOT(i + 1, i))

return gate_list, ordered_angles

0 comments on commit fce21de

Please sign in to comment.