Skip to content

Commit

Permalink
Merge branch 'master' into visualisation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhiggott committed Mar 13, 2021
2 parents f34b1d6 + 712d4eb commit b51eb73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"\n",
"The total error is now given by the sum (modulo 2) of the noise and the correction:\n",
"```\n",
"error = noise^correction\n",
"error = (noise + correction) % 2\n",
"```\n",
"\n",
"PyMatching is guaranteed to give a correction that returns us to the code space, so a logical $Z$ error will anti-commute with at least one of the $X$ logicals. Therefore a logical error has occurred if the condition\n",
Expand All @@ -162,7 +162,7 @@
" noise = np.random.binomial(1, p, H.shape[1])\n",
" syndrome = H@noise % 2\n",
" correction = matching.decode(syndrome)\n",
" error = noise^correction\n",
" error = (noise + correction) % 2\n",
" if np.any(error@logicals.T % 2):\n",
" num_errors += 1\n",
" return num_errors"
Expand All @@ -187,8 +187,8 @@
"Simulating L=4...\n",
"Simulating L=8...\n",
"Simulating L=12...\n",
"CPU times: user 2min 14s, sys: 1.28 s, total: 2min 15s\n",
"Wall time: 2min 21s\n"
"CPU times: user 1min 52s, sys: 199 ms, total: 1min 52s\n",
"Wall time: 1min 52s\n"
]
}
],
Expand Down

0 comments on commit b51eb73

Please sign in to comment.