Skip to content

Commit

Permalink
Fix bug in documentation of phase_flip and bit_flip methods (#5977)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanujkhattar committed Jan 8, 2023
1 parent 7f0c278 commit 25ecba9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions cirq-core/cirq/ops/common_channels.py
Expand Up @@ -1010,15 +1010,15 @@ def _phase_flip(p: float) -> PhaseFlipChannel:
$$
\begin{aligned}
M_0 =& \sqrt{p} \begin{bmatrix}
M_0 =& \sqrt{1 - p} \begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}
\end{bmatrix}
\\
M_1 =& \sqrt{1-p} \begin{bmatrix}
M_1 =& \sqrt{p} \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
\end{bmatrix}
\end{aligned}
$$
Expand Down Expand Up @@ -1046,15 +1046,15 @@ def phase_flip(p: Optional[float] = None) -> Union[common_gates.ZPowGate, PhaseF
$$
\begin{aligned}
M_0 =& \sqrt{p} \begin{bmatrix}
M_0 =& \sqrt{1 - p} \begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}
\end{bmatrix}
\\
M_1 =& \sqrt{1-p} \begin{bmatrix}
M_1 =& \sqrt{p} \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
\end{bmatrix}
\end{aligned}
$$
Expand Down Expand Up @@ -1162,14 +1162,14 @@ def _bit_flip(p: float) -> BitFlipChannel:
$$
\begin{aligned}
M_0 =& \sqrt{p} \begin{bmatrix}
M_0 =& \sqrt{1-p} \begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}
\\
M_1 =& \sqrt{1-p} \begin{bmatrix}
M_1 =& \sqrt{p} \begin{bmatrix}
0 & 1 \\
1 & -0
1 & 0
\end{bmatrix}
\end{aligned}
$$
Expand Down Expand Up @@ -1198,14 +1198,14 @@ def bit_flip(p: Optional[float] = None) -> Union[common_gates.XPowGate, BitFlipC
$$
\begin{aligned}
M_0 =& \sqrt{p} \begin{bmatrix}
M_0 =& \sqrt{1-p} \begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}
\\
M_1 =& \sqrt{1-p} \begin{bmatrix}
M_1 =& \sqrt{p} \begin{bmatrix}
0 & 1 \\
1 & -0
1 & 0
\end{bmatrix}
\end{aligned}
$$
Expand Down

0 comments on commit 25ecba9

Please sign in to comment.