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 bug in documentation of phase_flip and bit_flip methods #5977

Merged
merged 2 commits into from
Jan 8, 2023

Conversation

tanujkhattar
Copy link
Collaborator

Fixes #5974

#1545 updated the implementation and documentation for PhaseFlipChannel and BitFlipChannel classes but forgot to update the phase_flip and bit_flip factory methods. This PR fixes the bug.

@tanujkhattar tanujkhattar requested review from a team, vtomole and cduck as code owners January 4, 2023 01:15
@tanujkhattar tanujkhattar requested a review from maffoo January 4, 2023 01:15
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jan 5, 2023
Copy link
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

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

LGTM. Verified:

In [2]: cirq.kraus(cirq.bit_flip(0.36))
Out[2]: 
(array([[0.8, 0. ],
        [0. , 0.8]]),
 array([[0. +0.j, 0.6+0.j],
        [0.6+0.j, 0. +0.j]]))

In [3]: cirq.kraus(cirq.phase_flip(0.36))
Out[3]: 
(array([[0.8, 0. ],
        [0. , 0.8]]),
 array([[ 0.6+0.j,  0. +0.j],
        [ 0. +0.j, -0.6+0.j]]))

@viathor viathor added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jan 8, 2023
@viathor viathor merged commit 25ecba9 into master Jan 8, 2023
@viathor viathor deleted the channels_documentation_update branch January 8, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells CirqBot to sync and merge this PR. (If it's running.) size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation incorrect for phase_flip factory method
3 participants