diff --git a/pysisyphus/wavefunction/dma.py b/pysisyphus/wavefunction/dma.py index 288b3de93..166031c18 100644 --- a/pysisyphus/wavefunction/dma.py +++ b/pysisyphus/wavefunction/dma.py @@ -15,7 +15,6 @@ # Benda, Cances, Ehrlacher, Stamm, 2022 -import dataclasses import itertools as it import time from typing import Tuple diff --git a/scripts/gen_m2m.py b/scripts/gen_m2m.py index d973dfd5e..73dc52074 100755 --- a/scripts/gen_m2m.py +++ b/scripts/gen_m2m.py @@ -3,6 +3,9 @@ """ Generate python code to shift multipoles. See pysisyphus.wavefunction.dma for more information. + +Requires the sympleints-package: + https://github.com/eljost/sympleints """ import black @@ -107,16 +110,6 @@ def get_W_sym(L_max: int = _LE_MAX): expr = expr.evalf(PREC) Wsym[key] = expr -# All non-zero keys -present_keys = set(Wsym.keys()) -# Search for keys in all_keys for values that aren't 0.0. -nonzero_keys = [key for key in all_keys if key in present_keys] -# We can select nonzero_keys to get the expressions in the correct order -W_exprs = [Wsym[key] for key in nonzero_keys] - -# Common subexpression elimination -repls, reduced = sym.cse(W_exprs, order="none", optimizations="basic") - Wmat = sym.ImmutableSparseMatrix(num, num, Wsym) # Dummy multipole matrix Q = sym.MatrixSymbol("Q", 1, num)