= Solution
Use the <Hilbert-Schmidt inner product> normalized by the dimension: $(A,B)=\tfrac12\operatorname{Tr}(A^\dagger B)$. The identity and the three <Pauli matrices> are Hermitian, each has square $I$, and each nonidentity <Pauli matrix> has zero <trace>. For distinct nonidentity indices, the <Pauli matrix multiplication law> gives $\sigma_j\sigma_k=i\sum_l\varepsilon_{jkl}\sigma_l$, which is traceless. Therefore
$$
\frac12\operatorname{Tr}(\sigma_j^\dagger\sigma_k)=\delta_{jk}\qquad(0\le j,k\le3).
$$
There are four such <orthonormal> operators, and the complex <vector space> of two-by-two <matrices> has <dimension> four. Hence they form an <orthonormal basis>. Taking the <inner product> of any $E$ with each basis element proves, for arbitrary complex $E$ and not just Hermitian ones,
$$
\boxed{E=\frac12\sum_{k=0}^3\operatorname{Tr}(\sigma_kE)\sigma_k.}
$$
For example, if $E=\begin{pmatrix}a&b\\c&d\end{pmatrix}$, its four coefficients are $(a+d)/2$, $(b+c)/2$, $i(b-c)/2$, and $(a-d)/2$, respectively.
For the joint error, regard the two prescribed basis outputs as the columns of an environment-valued <linear map>. Its coefficient array in the usual output-row, input-column convention is
$$
M=\begin{pmatrix}|e_{00}\rangle&|e_{10}\rangle\\|e_{01}\rangle&|e_{11}\rangle\end{pmatrix}.
$$
The source's other array is arranged as a column of the images of basis kets; it must not be mistaken for this coefficient array acting on an amplitude column. Applying the just-proved <Pauli matrix> expansion componentwise in any environment <orthonormal basis> gives the <Pauli decomposition of a qubit-environment isometry>:
$$
\boxed{\begin{aligned}
|e_0\rangle&=\tfrac12(|e_{00}\rangle+|e_{11}\rangle),&
|e_1\rangle&=\tfrac12(|e_{01}\rangle+|e_{10}\rangle),\\
|e_2\rangle&=\tfrac{i}{2}(|e_{10}\rangle-|e_{01}\rangle),&
|e_3\rangle&=\tfrac12(|e_{00}\rangle-|e_{11}\rangle).
\end{aligned}}
$$
To check the potentially delicate sign of the <Pauli Y gate> coefficient, use $Y|0\rangle=i|1\rangle$ and $Y|1\rangle=-i|0\rangle$. The four terms then give
$$
\begin{aligned}
\sum_k\sigma_k|0\rangle|e_k\rangle
&=|0\rangle(|e_0\rangle+|e_3\rangle)+|1\rangle(|e_1\rangle+i|e_2\rangle)
=|0\rangle|e_{00}\rangle+|1\rangle|e_{01}\rangle,\\
\sum_k\sigma_k|1\rangle|e_k\rangle
&=|0\rangle(|e_1\rangle-i|e_2\rangle)+|1\rangle(|e_0\rangle-|e_3\rangle)
=|0\rangle|e_{10}\rangle+|1\rangle|e_{11}\rangle.
\end{aligned}
$$
<Linearity> proves the expansion for every input <pure state>. The environment coefficient vectors need not be normalized or mutually orthogonal. Consequently this expansion includes coherent combinations of <Pauli errors>, rather than asserting that every <quantum channel> is a probabilistic <Pauli channel>.
For the recovery probability, use the usual independent-use interpretation of the given <phase-flip channel>: each of the three transmitted <qubits> has a <Pauli Z gate> error independently with probability $q$. The <phase-flip repetition code> uses logical codewords $|+++\rangle$ and $|---\rangle$. The decoding <Hadamard gates> convert physical phase flips to bit flips because $HZH=X$. We can then analyze the two decoding <controlled-NOT gates> and the final <Toffoli gate> directly, rather than assuming a recovery rule.
Let $b_1,b_2,b_3$ be the error bits after this basis conversion. For a logical basis input $t\in\{0,1\}$, the three data bits before inverse encoding are $t\oplus b_1,t\oplus b_2,t\oplus b_3$. The two <controlled-NOT gates> produce
$$
|t\oplus b_1\rangle\,|b_1\oplus b_2\rangle\,|b_1\oplus b_3\rangle.
$$
The <Toffoli gate> flips the first wire when both of the last two bits are one. Its residual error is
$$
r(b)=b_1\oplus\bigl[(b_1\oplus b_2)(b_1\oplus b_3)\bigr]
=\begin{cases}0,&b_1+b_2+b_3\le1,\\1,&b_1+b_2+b_3\ge2.\end{cases}
$$
The last two wires carry an <error syndrome> independent of $t$. Thus this transformation preserves the amplitudes of an arbitrary superposition: zero or one phase error returns the original unknown <qubit>, while two or three phase errors leave the logical <Pauli X gate> applied to it. The probability of universally successful recovery is therefore
$$
\boxed{P_{\mathrm{success}}=(1-q)^3+3q(1-q)^2=1-3q^2+2q^3.}
$$
Equivalently, the decoded <quantum channel> is $\rho\mapsto(1-p_L)\rho+p_LX\rho X$, with <logical failure of the three-qubit phase-flip repetition code> $p_L=3q^2-2q^3$. For $0<q<1/2$, the failure probability is below $q$, since $q-p_L=q(1-q)(1-2q)>0$. A special input that is a <Pauli X eigenstate> is unchanged even by the residual logical error; this does not make the code correct that error on an unknown input. Its squared <quantum fidelity> with a particular pure input is $1-p_L+p_L|\langle\chi|X|\chi\rangle|^2$. If the errors on different channel uses are correlated, the marginal probability $q$ alone is insufficient: the general universal success probability is the probability of at most one error.
Back to article page