DiCarloLab-Delft / PycQED_py3

Python3 version of PycQED using QCoDeS as backend
MIT License
67 stars 41 forks source link

QuTech_QCC and QuTech_CCL simultaneous support in pycqed (for different setups) #632

Closed caenrigen closed 4 years ago

caenrigen commented 4 years ago

Steps to reproduce

The commit number 29be857a70af971febc38e15ec133d099e12027b broke the Chimera setup where it was not possible to connect to the QCC due to cryptic driver issues.

Error bellow for future reference

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-c3e6ae37cbfa> in <module>
    217 # CC
    218 ################################################
--> 219 QCC = QuTech_QCC.QCC('QCC', address='192.168.0.200', port=5025)
    220 station.add_component(QCC)
    221

d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\physical_instruments\QuTech_QCC.py in __init__(self, name, address, port, log_level, **kwargs)
     82         self.add_standard_parameters()
     83         self.add_additional_parameters()
---> 84         self._init_submodules()
     85         self.connect_message()
     86

d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\physical_instruments\QuTech_QCC.py in _init_submodules(self)
     90         """
     91         self.microcode = QCCMicrocode()
---> 92         self.QISA = QCC_QISA_Driver()
     93
     94         """

NameError: name 'QCC_QISA_Driver' is not defined

In [2]: from qcc_qisa_as import QCC_QISA_Driver, qisa_qmap
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-df1dbe09d26a> in <module>
----> 1 from qcc_qisa_as import QCC_QISA_Driver, qisa_qmap

c:\users\tud278337\.virtualenvs\userenv-qye-cjoa\lib\site-packages\qcc_qisa_as\__init__.py in <module>
----> 1 from .pyQCCQisaAs import QCC_QISA_Driver, qisa_qmap

c:\users\tud278337\.virtualenvs\userenv-qye-cjoa\lib\site-packages\qcc_qisa_as\pyQCCQisaAs.py in <module>
     16         mname = '.'.join((pkg, '_pyQCCQisaAs')).lstrip('.')
     17         return importlib.import_module(mname)
---> 18     _pyQCCQisaAs = swig_import_helper()
     19     del swig_import_helper
     20 elif version_info >= (2, 6, 0):

c:\users\tud278337\.virtualenvs\userenv-qye-cjoa\lib\site-packages\qcc_qisa_as\pyQCCQisaAs.py in swig_import_helper()
     15         pkg = __name__.rpartition('.')[0]
     16         mname = '.'.join((pkg, '_pyQCCQisaAs')).lstrip('.')
---> 17         return importlib.import_module(mname)
     18     _pyQCCQisaAs = swig_import_helper()
     19     del swig_import_helper

c:\users\tud278337\.virtualenvs\userenv-qye-cjoa\lib\importlib\__init__.py in import_module(name, package)
    124                 break
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)
    127
    128

ImportError: DLL load failed: The specified procedure could not be found.

Expected behaviour

QuTech_QCC and QuTech_CCL should both be supported to be used on different setups with the same code base.

@MiguelSMoreira we need a decent fix for this

After fixing we need to let Thijs know about any breaking changes

caenrigen commented 4 years ago

Solved by 35cc822e5bdb424af46d4a33729a3f6e90a976dc

There was an import that came up likely from some improper code merging from an older PC. Fixed by just not having the problematic import and allowing any cc type without explicit type specification.

Related older issues, for reference: https://github.com/DiCarloLab-Delft/UserEnv/pull/31 https://github.com/DiCarloLab-Delft/PycQED_py3/pull/544