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

[XEB] Cycle depths during analysis #4278

Merged
merged 4 commits into from Jul 7, 2021

Conversation

mpharrigan
Copy link
Collaborator

  • Make the argument optional in benchmark_
  • If provided, you can do a subset of those in sampled_df
  • More robust checking that it matches sampled_df

 - Make optional
 - If provided, you can do a subset of those in sampled_df
 - More robust checking that it matches sampled_df
@mpharrigan mpharrigan requested review from cduck, mrwojtek, vtomole and a team as code owners June 30, 2021 18:23
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Jun 30, 2021
if len(cycle_depths) == 0:
raise ValueError("`cycle_depths` should be a non-empty array_like")
not_in_sampled = np.setdiff1d(cycle_depths, sampled_cycle_depths)
if len(not_in_sampled) > 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just if not_in_sampled:?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know some style guides disagree, but I think in Cirq and me personally we usually are explicit. I think it reads closer to the intent

f"The `cycle_depths` provided include some not "
f"available in `sampled_df`: {not_in_sampled}"
)
sim_cycle_depths = np.intersect1d(cycle_depths, sampled_cycle_depths)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't the interesect1d redundant here? sampled_cycle_depths is always a superset of cycle_depths because of the previous condition, and result is always cycle_depths?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes that's true. removed

@mpharrigan mpharrigan added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 7, 2021
@mpharrigan mpharrigan assigned mrwojtek and unassigned dstrain115 Jul 7, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 7, 2021
@CirqBot
Copy link
Collaborator

CirqBot commented Jul 7, 2021

Automerge cancelled: A required status check is not present.

Missing statuses: ['Changed files test', 'Doc test']

@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jul 7, 2021
@mpharrigan mpharrigan added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 7, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 7, 2021
@CirqBot
Copy link
Collaborator

CirqBot commented Jul 7, 2021

Automerge cancelled: A required status check is not present.

Missing statuses: ['Changed files test', 'Doc test']

@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jul 7, 2021
@Strilanc Strilanc merged commit 6cfdda7 into quantumlib:master Jul 7, 2021
@Strilanc
Copy link
Contributor

Strilanc commented Jul 7, 2021

Beep boop

rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
 - Make the argument optional in benchmark_
 - If provided, you can do a subset of those in sampled_df
 - More robust checking that it matches sampled_df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xeb cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants