Coder Social home page Coder Social logo

Comments (1)

astafan8 avatar astafan8 commented on August 12, 2024

Could you check what version of zhinst-qcodes and zhinst-toolkit you have installed in your environment? if it's 0.3.*, then it's likely that you're facing the consequences of this refactor https://docs.zhinst.com/zhinst-qcodes/en/latest/refactoring/index.html .

The solution for this HF2LI driver in qcodes_ms_drivers could be the following:

  • implement a version check upon import of zhinst-qcodes (the 0.3 reports __version__ correctly, while the 0.2.* versions did not even have it), and throw an error or warning to the user suggesting to downgrade to zhinst-qcodes 0.2.* to keep this driver working
  • [my recommendation] update the driver to work with 0.3, and still implement the version check that asks the user to update to the 0.3 version of zhinst-qcodes.

the version check could be smth like:

from packaging import version

def is_zi_version_0_3_or_higher() -> bool:
    try:
        zhinst_qcodes_version = zhinst.qcodes.__version__
    except (ImportError, ModuleNotFoundError):
        zhinst_qcodes_version = "0.0"
    return version.parse(zhinst_qcodes_version) >= version.parse("0.3")

from qcodes_contrib_drivers.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.