Skip to content

Conversation

senecameeks
Copy link
Collaborator

Fixes #7001

@senecameeks senecameeks requested review from wcourtney, vtomole, verult and a team as code owners January 30, 2025 02:05
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jan 30, 2025
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.89%. Comparing base (08b1efb) to head (a4a66da).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7005   +/-   ##
=======================================
  Coverage   97.89%   97.89%           
=======================================
  Files        1085     1085           
  Lines       95121    95131   +10     
=======================================
+ Hits        93114    93129   +15     
+ Misses       2007     2002    -5     

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

self,
processor_id: Union[str, List[str]],
run_name: str = "",
snapshot_id: str = "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

for backwards compatiblity, shouldn't snapshot_id be last since it's a new arg?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In #6739 , the reviewer suggestion was to put snapshot_id next to run_name since they are related. I'd like to keep the APIs consistent. I don't think our guarantees of backwards compatibility is stringent in cirq-google

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On second thought moving snapshot_id to the last arg is consistent with the get_sampler API on the EngineProcessor. Moving it

@senecameeks senecameeks enabled auto-merge January 30, 2025 18:36
@senecameeks senecameeks added this pull request to the merge queue Jan 30, 2025
Merged via the queue into quantumlib:main with commit 3208b94 Jan 30, 2025
38 checks passed
@senecameeks senecameeks deleted the u/smeeks/engine_get_sampler branch January 30, 2025 19:01
mhucka pushed a commit to mhucka/Cirq that referenced this pull request Jan 30, 2025
…#7005)

* add snapshot to get_sampler interface on engine object

* backwards compat
@mhucka mhucka changed the title add snapshot_id to get_sampler interface on engine object Add snapshot_id to get_sampler interface on cirq-google engine object Apr 8, 2025
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…#7005)

* add snapshot to get_sampler interface on engine object

* backwards compat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snapshot_id option not working for engine.get_sampler()
4 participants