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

Add utilities that allow to characterize circuits using Floquet calibration #3711

Merged
merged 155 commits into from Feb 1, 2021

Conversation

mrwojtek
Copy link
Collaborator

@mrwojtek mrwojtek commented Jan 27, 2021

This adds two major methods:

  • make_floquet_request_for_circuit that generates a set of characterization requests that later can be used to trigger characterization, and
  • run_floquet_characterization_for_circuit that uses make_floquet_request_for_circuit and executes the characterization against cirq.google.Engine.

The logic is simple and supports ISWAP ** -0.5 gates only at this moment.

There is a notion of "moments mapping" introduced which is used to connect characterization requests/results to the moments in the circuit. Alternatively this could be automated but it's not a trivial problem from the algorithmic point of view.

# Conflicts:
#	cirq/google/calibration/phased_fsim.py
layers already calibrated and the second one the total number of layers to calibrate.

Returns:
Tuple of:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated based on that conversation

Copy link
Collaborator

@mpharrigan mpharrigan left a comment

Choose a reason for hiding this comment

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

no blockers from me, since I reviewed the "fork" version.



# Workaround for: https://github.com/python/mypy/issues/5858
def lru_cache_typesafe(func: Callable[..., T]) -> T:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have an issue where we can record all the places where mypy makes things worse? @balopat

@mrwojtek
Copy link
Collaborator Author

PTAL. Now make_floquet_request_for_circuit and run_floquet_characterization_for_circuit return dataclasses instead of tuples.

@mrwojtek
Copy link
Collaborator Author

mrwojtek commented Feb 1, 2021

I'm slightly blocked on this now. I'll submit it - if there are any further comments I'll create a follow-up PRs to fix them.

@mrwojtek mrwojtek merged commit b0023c2 into quantumlib:master Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants