Skip to content

Commit

Permalink
changed or statement in is_noncontextual
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRalli committed Oct 17, 2023
1 parent 01bc997 commit 9898184
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions symmer/operators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,11 +1130,12 @@ def is_noncontextual(self) -> bool:
# check for overlap (array of ones == no overlap)
return np.all(np.sum(clique_mask, axis=0) == 1)
else:
gens = self.generators
if check_adjmat_noncontextual(gens.adjacency_matrix):
return True
from symmer.utils import get_generators_including_xz_products
gens_xyz = get_generators_including_xz_products(self)
gens = self.generators
return check_adjmat_noncontextual(gens.adjacency_matrix) or check_adjmat_noncontextual(
gens_xyz.adjacency_matrix)
return check_adjmat_noncontextual(gens_xyz.adjacency_matrix)



Expand Down

0 comments on commit 9898184

Please sign in to comment.