Skip to content
New issue

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

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

Already on GitHub? # to your account

Bump rand to 0.9 and associated crates #13806

Merged
merged 7 commits into from
Feb 14, 2025
Merged

Conversation

jakelishman
Copy link
Member

Summary

This is a breaking API change, but our exposure is mostly just to some minor renames. Unfortunately the whole ecosystem hasn't migrated yet, so we're still compiling in multiple versions of rand, but with any luck, bumping hashbrown and dropping faer will help.

Details and comments

This obsoletes the three separate PRs that dependabot is trying to make (and keeps trying to jam up CI with):

Close #13745
Close #13746
Close #13747

This is a breaking API change, but our exposure is mostly just to some
minor renames.  Unfortunately the whole ecosystem hasn't migrated yet,
so we're still compiling in multiple versions of `rand`, but with any
luck, bumping hashbrown and dropping faer will help.
@jakelishman jakelishman added Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository dependencies Pull requests that update a dependency file labels Feb 7, 2025
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@jakelishman
Copy link
Member Author

Oh ugh, looks like some of the seeding behaviour has changed as well.

@jakelishman
Copy link
Member Author

Scanning through the changes to the pRNG we use between 0.8.5 and 0.9.0, and to the implementation of the standard uniform distribution, it doesn't look like we should have seen randomisation changes, which makes me a bit nervous. I wasn't expecting to see any - the mathematics of what makes up the pcg64_fast pRNG are fixed, and the internal seed mixing of those hasn't changed.

That said, running the tests locally several times shows that the randomness changes appear deterministic, so the chances are it's something I'm just missing in understanding. I'll push up the test changes to fix the random-seeded tests.

@coveralls
Copy link

coveralls commented Feb 7, 2025

Pull Request Test Coverage Report for Build 13330455581

Details

  • 17 of 20 (85.0%) changed or added relevant lines in 8 files are covered.
  • 11 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.02%) to 88.245%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/accelerate/src/circuit_library/iqp.rs 2 3 66.67%
crates/accelerate/src/synthesis/clifford/random_clifford.rs 5 6 83.33%
crates/accelerate/src/synthesis/linear/utils.rs 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/unitary_synthesis.rs 1 93.29%
qiskit/providers/basic_provider/basic_simulator.py 1 96.99%
crates/qasm2/src/lex.rs 3 92.73%
crates/qasm2/src/parse.rs 6 97.15%
Totals Coverage Status
Change from base Build 13329011740: 0.02%
Covered Lines: 78709
Relevant Lines: 89194

💛 - Coveralls

mtreinish
mtreinish previously approved these changes Feb 14, 2025
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Besides the sabre test file conflict this LGTM, I'll reapprove it once it's rebased. That being said I'm going to miss the from_entropy() function. I liked that name more.

@jakelishman jakelishman linked an issue Feb 14, 2025 that may be closed by this pull request
@jakelishman
Copy link
Member Author

Conflict should be resolved.

@mtreinish mtreinish enabled auto-merge February 14, 2025 13:59
@mtreinish mtreinish added this pull request to the merge queue Feb 14, 2025
Merged via the queue into Qiskit:main with commit 1e634df Feb 14, 2025
17 checks passed
@jakelishman jakelishman deleted the bump-rand branch February 14, 2025 15:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Changelog: None Do not include in changelog dependencies Pull requests that update a dependency file Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linting fails for lnn.rs
4 participants