diff --git a/qlat/auto_contractor/compile.py b/qlat/auto_contractor/compile.py index 4d912814..f88476f1 100644 --- a/qlat/auto_contractor/compile.py +++ b/qlat/auto_contractor/compile.py @@ -791,6 +791,20 @@ def collect_op(self): # collect common prod into variables self.variables_prod = collect_subexpr_in_cexpr(self.variables_tr) + def list(self): + return [ + self.diagram_types, + self.positions, + self.variables_factor_intermediate, + self.variables_factor, + self.variables_prop, + self.variables_color_matrix, + self.variables_prod, + self.variables_tr, + self.named_terms, + self.named_exprs, + ] + ### ---- def increase_type_dict_count(type_dict, key): diff --git a/qlat/auto_contractor/wick.py b/qlat/auto_contractor/wick.py index 1739db07..67fa2067 100644 --- a/qlat/auto_contractor/wick.py +++ b/qlat/auto_contractor/wick.py @@ -109,7 +109,7 @@ def __repr__(self) -> str: return f"{self.otype}({self.f!r},{self.p!r},{self.s!r},{self.c!r})" def list(self): - return [self.otype, self.f, self.p, self.s, self.c] + return [ self.otype, self.f, self.p, self.s, self.c, ] def __eq__(self, other) -> bool: return self.list() == other.list() @@ -203,7 +203,7 @@ def __repr__(self) -> str: return f"{self.otype}({self.f!r},{self.p1!r},{self.p2!r},{self.s1!r},{self.s2!r},{self.c1!r},{self.c2!r})" def list(self): - return [self.otype, self.f, self.p1, self.p2, self.s1, self.s2, self.c1, self.c2] + return [ self.otype, self.f, self.p1, self.p2, self.s1, self.s2, self.c1, self.c2, ] def __eq__(self, other) -> bool: return self.list() == other.list() @@ -246,7 +246,7 @@ def __repr__(self) -> str: return f"{self.otype}({self.tag!r},{self.s1!r},{self.s2!r})" def list(self): - return [self.otype, self.tag, self.s1, self.s2] + return [ self.otype, self.tag, self.s1, self.s2, ] def __eq__(self, other) -> bool: return self.list() == other.list() @@ -280,7 +280,7 @@ def __repr__(self) -> str: return f"{self.otype}({self.tag!r},{self.p!r},{self.mu!r},{self.c1!r},{self.c2!r})" def list(self): - return [self.otype, self.tag, self.p, self.mu, self.c1, self.c2] + return [ self.otype, self.tag, self.p, self.mu, self.c1, self.c2, ] def __eq__(self, other) -> bool: return self.list() == other.list() @@ -340,7 +340,7 @@ def __repr__(self) -> str: return f"{self.otype}({self.ops!r},{self.tag!r})" def list(self): - return [self.otype, self.tag, self.ops] + return [ self.otype, self.tag, self.ops, ] def __eq__(self, other) -> bool: return self.list() == other.list()