Skip to content

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 a team and vtomole 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!

@codecov
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
@mhucka mhucka changed the title Correct the sweep order example in the docstring Correct the sweep order example in the docstring of class Product in cirq-core/cirq/study/sweeps.py Apr 8, 2025
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
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