• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 15621930851

12 Jun 2025 10:17PM UTC coverage: 88.144% (+0.01%) from 88.131%
15621930851

Pull #14591

github

mergify[bot]
Fix random number generator seed argument for quantum_volume (#14586)

* Fix random number generator seed argument for quantum_volume

The `seed` argument to `quantum_volume` being a `numpy.random.Generator`
resulted in `integers` being called with 0 for the `low` argument. When
called with only a `low` argument like this, this value is taken as one
more than the maximum and 0 is treated as the minimum. This resulted in a
`TypeError` because the range is from 0 to -1. Here the handling of
`Generator` was updated to match how the deprecated `QuantumVolume`
class handled `seed` (which was slightly odd -- it caps the range at the
int64 limit even though the argument is a `u64` in the Rust function --
but probably fine; keeping the range helps keep the behavior consistent
between `QuantumVolume` and `quantum_volume` for a generator with the
same seed).

* Address pylint's misunderstanding of the test import

(cherry picked from commit ba74b5c47)
Pull Request #14591: Fix random number generator seed argument for quantum_volume (backport #14586)

2 of 2 new or added lines in 1 file covered. (100.0%)

7 existing lines in 2 files now uncovered.

72965 of 82779 relevant lines covered (88.14%)

346755.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.23
/crates/qasm2/src/lex.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc