Skip to content

Conversation

@pavoljuhas
Copy link
Collaborator

@pavoljuhas pavoljuhas commented May 31, 2025

  • noise_properties_from_calibration - show deprecation warning when
    called without gate_times_ns and introduce literal "legacy" as
    an alias for the old gate times default.

  • load_device_noise_properties - update to use legacy gate times for
    old virtual processors and make tests more comprehensive.

Related to b/395705720

…d virtual processors

Add tests for all known virtual processors.
…times_ns

Show deprecation warning when `gate_times_ns` argument is not provided.
Introduce literal "sycamore" value as an alias for legacy defaults.
Replace use of noise_properties_from_calibration for more convenience
with gate_times_ns argument.
@pavoljuhas pavoljuhas requested review from a team, verult, vtomole and wcourtney as code owners May 31, 2025 01:49
@github-actions github-actions bot added the size: M 50< lines changed <250 label May 31, 2025
@codecov
Copy link

codecov bot commented May 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.68%. Comparing base (e27d883) to head (0e7c505).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7399   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files        1112     1112           
  Lines       97709    97737   +28     
=======================================
+ Hits        96427    96455   +28     
  Misses       1282     1282           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 117 to 120
gate_times_ns: Map of gate durations in nanoseconds or "sycamore"
to use the Sycamore gate times listed in `known_devices.py`.
Note this argument has changed from optional to mandatory.
Use "sycamore" to get the legacy default values.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Calling the old defaults "Sycamore" values might give the false impression that gates on Sycamore devices always used these durations. For example, in the M2 paper, the CZ gate was 34 ns, not 32 ns, and readout was 500 ns, not 4000 ns, even though that was a Sycamore processor (see M2 SM, Sec I.D, I.E). Maybe we can call them old defaults or something. We can also have a name for the durations in the new QVM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point - done in 0e7c505. Renamed to "legacy".

Update notebooks in next PR.  They need a dev release on PyPI first.

This reverts commit ff2f7d1.
Should be less confusing than "sycamore".
Copy link
Collaborator

@eliottrosenberg eliottrosenberg left a comment

Choose a reason for hiding this comment

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

Thanks, Pavol!

@pavoljuhas pavoljuhas added this pull request to the merge queue Jun 2, 2025
Merged via the queue into quantumlib:main with commit 123cbf8 Jun 2, 2025
35 checks passed
@pavoljuhas pavoljuhas deleted the qmv-deprecate-default-gate-times-for-noise-props branch June 2, 2025 19:03
@pavoljuhas pavoljuhas added the BREAKING CHANGE For pull requests that are important to mention in release notes. label Jun 3, 2025
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…ation (quantumlib#7399)

* `noise_properties_from_calibration` - show deprecation warning when
  called without `gate_times_ns` and introduce literal "legacy" as
  an alias for the old gate times default.

* `load_device_noise_properties` - update to use legacy gate times for
  old virtual processors and make tests more comprehensive.

Related to b/395705720
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request Sep 9, 2025
…tion

The default value for the `gate_times_ns` argument of
`noise_properties_from_calibration` was deprecated in quantumlib#7399.
Here we make the argument mandatory.

Note the literal "legacy" value, i.e., `gate_times_ns="legacy"`,
can be used as a stand-in for the old default.

Related to b/395705720
github-merge-queue bot pushed a commit that referenced this pull request Sep 11, 2025
…tion (#7644)

The default value for the `gate_times_ns` argument of
`noise_properties_from_calibration` was deprecated in #7399.
Here we make the argument mandatory.

Note the literal "legacy" value, i.e., `gate_times_ns="legacy"`,
can be used as a stand-in for the old default.

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

Labels

BREAKING CHANGE For pull requests that are important to mention in release notes. size: M 50< lines changed <250

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants