Skip to content

Commit a4340dc

Browse files
committed
Remove self-assignments
In lines 587-589, a variable is getting assigned to itself, which is probably an error: ```python else: delta_gs = [g_vectors] * num_kpts g_mapping = g_mapping ``` Around lines 912-917, the same thing happens with another variable: ```python elif kmeans_weighting_function == "sum_squares": # w(r) = sum_{i} |phi_{ki}(r)| weighting_function = np.einsum( "kRi,kRi->R", bloch_orbitals_mo.conj(), bloch_orbitals_mo, optimize=True ) weighting_function = weighting_function ```
1 parent fbeb56d commit a4340dc

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

  • src/openfermion/resource_estimates/pbc/thc/factorizations

src/openfermion/resource_estimates/pbc/thc/factorizations/isdf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ def kpoint_isdf_double_translation(
586586
delta_gs = delta_gs_unique
587587
else:
588588
delta_gs = [g_vectors] * num_kpts
589-
g_mapping = g_mapping
590589
zeta = np.zeros((num_kpts,), dtype=object)
591590
for iq in range(num_kpts):
592591
num_g = len(delta_gs[iq])
@@ -914,7 +913,6 @@ def solve_kmeans_kpisdf(
914913
weighting_function = np.einsum(
915914
"kRi,kRi->R", bloch_orbitals_mo.conj(), bloch_orbitals_mo, optimize=True
916915
)
917-
weighting_function = weighting_function
918916
else:
919917
raise ValueError(f"Unknown value for weighting function {kmeans_weighting_function}")
920918
interp_indx = kmeans.find_interpolating_points(

0 commit comments

Comments
 (0)