Skip to content

Commit

Permalink
Address basis element label ordering
Browse files Browse the repository at this point in the history
First pass at trying to resolve the fact that we typically only store have the C and A generators due to symmetry, meaning there is a preferred basis label ordering.
  • Loading branch information
Corey Ostrove committed Nov 5, 2024
1 parent 3d0764f commit 27a47e9
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 59 deletions.
6 changes: 3 additions & 3 deletions pygsti/baseobjs/errorgenbasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def local_labels(self):
if self._cached_local_labels is None:
if self._cached_global_labels is None:
self._cached_global_labels = self.global_labels()
self._cached_local_labels = tuple([_LocalElementaryErrorgenLabel.cast(lbl) for lbl in self._cached_global_labels])
self._cached_local_labels = tuple([_LocalElementaryErrorgenLabel.cast(lbl, sslbls=self.sslbls) for lbl in self._cached_global_labels])
return self._cached_local_labels

def sublabels(self, errorgen_type):
Expand All @@ -646,11 +646,11 @@ def sublabels(self, errorgen_type):
self.max_weights.get(errorgen_type, None),
self._sslbl_overlap)
if self._default_lbl_typ == 'local':
labels = tuple([_LocalElementaryErrorgenLabel.cast(lbl) for lbl in labels])
labels = tuple([_LocalElementaryErrorgenLabel.cast(lbl, sslbls=self.sslbls) for lbl in labels])
return labels

@property
def elemgen_supports(self, identity_label='I'):
def elemgen_supports(self):
"""
Returns a tuple of tuples, each corresponding to the support
of the elementary error generators in this basis, returned in
Expand Down
Loading

0 comments on commit 27a47e9

Please sign in to comment.