diff --git a/symmer/operators/noncontextual_op.py b/symmer/operators/noncontextual_op.py index c49fc278..4463449c 100644 --- a/symmer/operators/noncontextual_op.py +++ b/symmer/operators/noncontextual_op.py @@ -698,8 +698,7 @@ def energy_via_brute_force(self) -> Tuple[float, np.array, np.array]: nu_list[:,~self.fixed_ev_mask] = np.array(list(itertools.product([-1,1],repeat=np.sum(~self.fixed_ev_mask)))) # # optimize over all discrete value assignments of nu in parallel - tracker = get_noncon_energy(nu_list, self.NC_op) - full_search_results = zip(tracker, nu_list) + full_search_results = get_noncon_energy(nu_list, self.NC_op) energy, fixed_nu = min(full_search_results, key=lambda x:x[0]) return energy, fixed_nu @@ -736,4 +735,4 @@ def get_noncon_energy(nu: np.array, noncon_H:NoncontextualOp) -> float: """ The classical objective function that encodes the noncontextual energies. """ - return noncon_H.get_energy(nu) \ No newline at end of file + return noncon_H.get_energy(nu), nu \ No newline at end of file