Skip to content

Conversation

neuralsorcerer
Copy link
Contributor

@neuralsorcerer neuralsorcerer commented Oct 5, 2025

Changes:

  • Introduced a CanonicalValue enum and numeric canonicalization routine so integers, reals, and complex values are normalized before encoding.
  • Implemented canonical fingerprint generation for SymbolExpr, which flattens sums and products, sorts normalized terms, and encodes nodes, symbols, and operators into deterministic byte sequences.

Why?

@neuralsorcerer neuralsorcerer requested a review from a team as a code owner October 5, 2025 02:03
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Oct 5, 2025
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@neuralsorcerer neuralsorcerer marked this pull request as draft October 5, 2025 02:11
@neuralsorcerer neuralsorcerer force-pushed the struct-eq branch 3 times, most recently from 0f7e662 to 866b455 Compare October 5, 2025 07:47
@neuralsorcerer neuralsorcerer marked this pull request as ready for review October 5, 2025 09:15
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18256607998

Details

  • 309 of 335 (92.24%) changed or added relevant lines in 1 file are covered.
  • 22 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.03%) to 88.251%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/circuit/src/parameter/symbol_expr.rs 309 335 92.24%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 92.03%
crates/qasm2/src/parse.rs 6 97.56%
crates/circuit/src/parameter/symbol_expr.rs 14 75.29%
Totals Coverage Status
Change from base Build 18229727033: 0.03%
Covered Lines: 93421
Relevant Lines: 105858

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

String-based comparisons in symbolic expression operations

3 participants