sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
137 stars 55 forks source link

distribution_info broken for map layouts #492

Open coreyostrove opened 2 months ago

coreyostrove commented 2 months ago

Jotting down some details on a low-priority bug for future reference.

When calling the distribution_info method of the DistributableCOPALayout class, which is a parent class to MapCOPALayout this results in the following exception.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[7], line 1
----> 1 test_layout_2Q_size_prop.distribution_info(1)

File ~\Documents\pyGSTi_API_updates\pygsti\layouts\distlayout.py:1381, in DistributableCOPALayout.distribution_info(self, nprocs)
   1378 info = {}
   1379 subcomm_ranks = _collections.defaultdict(list)
-> 1381 nAtomComms = self.num_atom_processing_subcomms
   1382 nAtoms = len(self.atoms)
   1383 assert(nAtomComms <= nAtoms), "Cannot request more sub-comms ({nAtomComms}) than there are atoms ({nAtoms})!"

AttributeError: 'MapCOPALayout' object has no attribute 'num_atom_processing_subcomms'

The only references to this attribute I can find with a search of the codebase are in this method, so presumably this is referring to an attribute that was either renamed or removed. We should fix this at some indeterminate point in the future (or else decide to remove the broken method if it isn't an easy fix).