Skip to content

Conversation

mtreinish
Copy link
Member

Summary

In #13278 we removed our dependency on symengine and replaced it with our own symbolic engine. However that PR neglected to remove symengine from the requirements list. This commit corrects this oversight and removes it from the requirements list. It also updates the release notes to make them a bit more precise and document the change in requirements and potential behavior differences with the new engine.

Details and comments

In Qiskit#13278 we removed our dependency on symengine and replaced it with
our own symbolic engine. However that PR neglected to remove symengine
from the requirements list. This commit corrects this oversight and
removes it from the requirements list. It also updates the release notes
to make them a bit more prescise and document the change in requirements
and potential behavior differences with the new engine.
@mtreinish mtreinish requested a review from a team as a code owner May 16, 2025 17:14
@mtreinish mtreinish added the Changelog: API Change Include in the "Changed" section of the changelog label May 16, 2025
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @mtreinish
  • @nkanazawa1989

@mtreinish mtreinish added this to the 2.1.0 milestone May 16, 2025
@coveralls
Copy link

coveralls commented May 16, 2025

Pull Request Test Coverage Report for Build 15171648126

Details

  • 2 of 9 (22.22%) changed or added relevant lines in 1 file are covered.
  • 12 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.005%) to 88.32%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/qpy/binary_io/schedules.py 2 9 22.22%
Files with Coverage Reduction New Missed Lines %
qiskit/qpy/binary_io/schedules.py 1 19.05%
crates/qasm2/src/lex.rs 5 92.48%
crates/qasm2/src/parse.rs 6 96.68%
Totals Coverage Status
Change from base Build 15171633158: 0.005%
Covered Lines: 78462
Relevant Lines: 88838

💛 - Coveralls

@mtreinish
Copy link
Member Author

mtreinish commented May 16, 2025

I think we can actually drop sympy from the requirements list too. I'll give a try and push up a commit if we can.

EDIT: I looked into this, it is possible to remove but there is some more work needed to address the internals of a couple functions to remove a dependency there. I'll work on this in a parallel PR.

mtreinish added 2 commits May 19, 2025 12:11
During QPY deserialization of old payloads that include pulse schedules
we are unable to construct the pulse schedule from the payload. For
circuits that include pulse gates the strategy for loading those
payloads is to emit a warning that the pulse component will be omitted
and create the rest of the circuit like normal. To do this the qpy
deserialization has to read the size of the payload to seek to the right
position. However we don't need to actually parse the expression because
it's never used. This commit removes the parsing step it is
unnecessary after we do the read that will seek the cursor
appropriately.
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a merge conflict, otherwise lgtm!

@mtreinish mtreinish requested a review from Cryoris May 21, 2025 14:44
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the updates!

@Cryoris Cryoris added this pull request to the merge queue May 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2025
@mtreinish mtreinish added this pull request to the merge queue May 22, 2025
Merged via the queue into Qiskit:main with commit 70b1d64 May 22, 2025
24 checks passed
@mtreinish mtreinish deleted the remove-symengine branch May 22, 2025 11:15
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* Remove symengine from the requirements list

In Qiskit#13278 we removed our dependency on symengine and replaced it with
our own symbolic engine. However that PR neglected to remove symengine
from the requirements list. This commit corrects this oversight and
removes it from the requirements list. It also updates the release notes
to make them a bit more prescise and document the change in requirements
and potential behavior differences with the new engine.

* Add new optional extra variant for symengine for QPY

* Stop parsing sympy and symengine pulse expressions

During QPY deserialization of old payloads that include pulse schedules
we are unable to construct the pulse schedule from the payload. For
circuits that include pulse gates the strategy for loading those
payloads is to emit a warning that the pulse component will be omitted
and create the rest of the circuit like normal. To do this the qpy
deserialization has to read the size of the payload to seek to the right
position. However we don't need to actually parse the expression because
it's never used. This commit removes the parsing step it is
unnecessary after we do the read that will seek the cursor
appropriately.

* Update releasenotes/notes/parameter-expression-rs-6fddbb2556b7e1f7.yaml

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Remove unused arguments

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants