Code Monkey home page Code Monkey logo

Comments (3)

jakelishman avatar jakelishman commented on August 19, 2024 1

This looks severely like a bug in the QPY serialisation/deserialisation - on close inspection, the UUIDs for the read parameters are offset by two bytes compared to the inputs. I'm not entirely sure how that's managed to happen without completely failing all tests, but there we are. I'll look into getting it fixed in Terra ASAP, and then look to release a 0.19.2.

from qiskit-ibm-runtime.

daka1510 avatar daka1510 commented on August 19, 2024

@mtreinish, @jakelishman - do you happen to know how to properly fix this? Do we need to update the encoder/decoder code?

from qiskit-ibm-runtime.

jakelishman avatar jakelishman commented on August 19, 2024

Ah no, sorry - I'm wrong. In this case it's that you're using an old version of the parameter expression unpacking. There was a new QPY serialisation format, and since you're using internal functions of qpy_serialization, there wasn't any stability there. The new v3 format has an extra byte in the ParameterExpression header in the QPY format, and an extra byte in the map elements. So when your parameter expressions only had one parameter in them, that's where the extra two bytes came from.

This is possible to fix, but I think you'll have to detect the version of Terra, because you need to know whether to set your reader to _read_parameter_expression or _read_parameter_expression_v3. I'll make a PR for you.

from qiskit-ibm-runtime.

Related Issues (20)

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.