Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast use_symengine input to a bool #1385

Merged
merged 3 commits into from
Feb 7, 2024

Commits on Feb 7, 2024

  1. Cast use_symengine input to a bool

    This commit works around a bug in Qiskit 0.45.x, 0.46.0, and 1.0.0rc1
    with the `use_symengine` flag on `qpy.dump()`. The dump function has a
    bug when it receives a truthy value instead of a bool literal that it
    will generate a corrupt qpy because of a mismatch between how the
    encoding was processed (the encoding is incorrectly set to sympy in the
    file header but uses symengine encoding in the actual body of the
    circuit.  This is being fixed in Qiskit/qiskit#11730 for 1.0.0, and will
    be backported to 0.46.1. But to ensure compatibility with 0.45.x, 0.46.0,
    and 1.0.0rc1 while waiting for those releases we can workaround this by
    just casting the value to a boolean.
    mtreinish committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    ba2447f View commit details
    Browse the repository at this point in the history
  2. Fix mypy failures

    mtreinish committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    9bc8604 View commit details
    Browse the repository at this point in the history
  3. Mypy fixes again

    mtreinish committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    c291a91 View commit details
    Browse the repository at this point in the history