Skip to content

Commit

Permalink
Fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chmwzc committed Oct 6, 2023
1 parent d64b2f8 commit 001f7ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qibochem/ansatz/hardware_efficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def hea(n_layers, n_qubits, parameter_gates=["RY", "RZ"], coupling_gates="CZ"):
"""
gate_list = []

for ilayer in range(nlayers):
for ilayer in range(n_layers):
for rgate in parameter_gates:
for iqubit in range(nqubits):
for iqubit in range(n_qubits):
gate_list.append(getattr(gates, rgate)(iqubit, theta=0))

# entanglement
for iqubit in range(nqubits - 1):
for iqubit in range(n_qubits - 1):
gate_list.append(getattr(gates, coupling_gates)(iqubit, iqubit + 1))
gate_list.append(getattr(gates, coupling_gates)(nqubits - 1, 0))
gate_list.append(getattr(gates, coupling_gates)(n_qubits - 1, 0))

return gate_list

0 comments on commit 001f7ac

Please sign in to comment.