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
Conversation
… the calibration progress.
# Conflicts: # cirq/google/calibration/phased_fsim.py
cirq/google/calibration/workflow.py
Outdated
layers already calibrated and the second one the total number of layers to calibrate. | ||
|
||
Returns: | ||
Tuple of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also mrwojtek#3 (comment)
There was a problem hiding this comment.
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
There was a problem hiding this 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: |
There was a problem hiding this comment.
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
PTAL. Now make_floquet_request_for_circuit and run_floquet_characterization_for_circuit return dataclasses instead of tuples. |
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. |
This adds two major methods:
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.