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

Fix instability in _decompose_interaction_into_two_b_gates_ignoring_single_qubit_ops #2609

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

Strilanc
Copy link
Contributor

@Strilanc Strilanc commented Dec 2, 2019

  • In the windows tests, values were going slightly outside the input ranges of inverse trig functions

…ingle_qubit_ops

- In the windows tests, values were going slightly outside the input ranges of inverse trig functions
@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Dec 2, 2019
@Strilanc
Copy link
Contributor Author

Strilanc commented Dec 2, 2019

Must verify that the windows tests are not printing out warnings now.

a2 = max(0.0, min(1, a2)) # Clamp out-of-range floating point error.
b2 = np.arcsin(np.sqrt(a2))
r = max(0.0, r) # Clamp out-of-range floating point error.
if r > 0.499999999999:
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace constant with 0.5 - EPS?

@Strilanc Strilanc added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Dec 17, 2019
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Dec 17, 2019
@CirqBot CirqBot merged commit b928a87 into master Dec 17, 2019
@CirqBot CirqBot removed the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Dec 17, 2019
@CirqBot CirqBot deleted the stable_decompose branch December 17, 2019 00:53
@CirqBot CirqBot removed the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Dec 17, 2019
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