diff --git a/src/qibochem/ansatz/hardware_efficient.py b/src/qibochem/ansatz/hardware_efficient.py index 6493330..c84c96a 100644 --- a/src/qibochem/ansatz/hardware_efficient.py +++ b/src/qibochem/ansatz/hardware_efficient.py @@ -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