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
change type annotation from float to TParamVal for theta and phi #4266
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1181,7 +1181,7 @@ def test_run_floquet_characterization_for_moments(): | |||||
itertools.product([0.1, 0.7], [-0.3, 0.1, 0.5], [-0.3, 0.2, 0.4], [-0.6, 0.1, 0.6], [0.2, 0.6]), | ||||||
) | ||||||
def test_fsim_phase_corrections( | ||||||
theta: float, zeta: float, chi: float, gamma: float, phi: float | ||||||
theta: cirq.value.TParamVal, zeta: float, chi: float, gamma: float, phi: cirq.value.TParamVal | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is available on the main
Suggested change
Can do this throughout cirq_google, since it's external to cirq_core. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a reason why only theta / phi should accept |
||||||
) -> None: | ||||||
a, b = cirq.LineQubit.range(2) | ||||||
|
||||||
|
@@ -1209,7 +1209,7 @@ def test_fsim_phase_corrections( | |||||
), | ||||||
) | ||||||
def test_phase_corrected_fsim_operations_with_phase_exponent( | ||||||
theta: float, zeta: float, chi: float, gamma: float, phi: float | ||||||
theta: cirq.value.TParamVal, zeta: float, chi: float, gamma: float, phi: cirq.value.TParamVal | ||||||
) -> None: | ||||||
a, b = cirq.LineQubit.range(2) | ||||||
|
||||||
|
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.
I don't think we should make the changes here since below
_decompose_
explicitly checks thatself
should not be parameterized and hence the parameter will always be afloat
here.