Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Correct the sweep order example in the docstring #7104

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

ikd-sci
Copy link
Contributor

@ikd-sci ikd-sci commented Feb 28, 2025

The following code can be used to confirm the order of loops:

sweep = cirq.Product(cirq.Points('a', [0, 1 ,2]), cirq.Points('b', [2, 3]))
list(sweep)

Outputs:

[cirq.ParamResolver({'a': 0, 'b': 2}),
 cirq.ParamResolver({'a': 0, 'b': 3}),
 cirq.ParamResolver({'a': 1, 'b': 2}),
 cirq.ParamResolver({'a': 1, 'b': 3}),
 cirq.ParamResolver({'a': 2, 'b': 2}),
 cirq.ParamResolver({'a': 2, 'b': 3})]

Leftmost sweep is the outer loop in a product of sweeps.

@ikd-sci ikd-sci requested review from vtomole and a team as code owners February 28, 2025 20:04
@ikd-sci ikd-sci requested a review from dabacon February 28, 2025 20:04
@CirqBot CirqBot added the Size: XS <10 lines changed label Feb 28, 2025
Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

Thanks for fixing that!

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.15%. Comparing base (e60e686) to head (7a4fc3a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7104   +/-   ##
=======================================
  Coverage   98.15%   98.15%           
=======================================
  Files        1089     1089           
  Lines       95251    95251           
=======================================
  Hits        93496    93496           
  Misses       1755     1755           

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

@pavoljuhas pavoljuhas enabled auto-merge February 28, 2025 21:39
@pavoljuhas pavoljuhas added this pull request to the merge queue Feb 28, 2025
Merged via the queue into quantumlib:main with commit 2ad4136 Feb 28, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants