Skip to content

Introduce Qiskit native ParameterExpression serialization #13252

@mtreinish

Description

@mtreinish

What should we add?

Right now QPY relies on symengine's native serialization format for serializing the internal symbolic expression used by the parameter expression. At the time this made a lot of sense because we could relying on symengine to manage how best to represent it's internal data model and it was also C++ relying on the cereal library so it was very fast. But as was recently discovered by the symengine 0.13 release the payload format is version specific, and symengine will error if you try to load a expression generated with a different symengine version. For the immediate term we were able to "workaround" this issue here: #13251 but this isn't a general solution as symengine could change the format between versions, that's why they have the check.

Moving forward for qiskit 1.3.0 we must come up with a qiskit native serialization for ParameterExpression for QPY instead of relying on symengine or sympy to do it for us. This should be introduced in QPY version 13, this version mismatch is still a possibility for users of QPY version >=10 and < 13 when loading a historically generated payload, but in those cases the only option is to install a compatible version of symengine if the payload format is relying on it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions