Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
meandmytram committed Dec 18, 2024
1 parent 23ca4a3 commit a5850e3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
34 changes: 24 additions & 10 deletions docs/source/quantum_five_qubit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
"outputs": [],
"source": [
"stabilizer_generators = [\n",
" \"XZZXI\", # 1001011000 -> 0, 3, 5, 6\n",
" \"IXZZX\", # 0010010110 -> 2, 5, 6, 7\n",
" \"XIXZZ\", # 1000100101 -> 0, 4, 7, 8\n",
" \"ZXIXZ\", # 0110001001 -> 1, 2, 6, 8\n",
" \"XZZXI\", # 1001011000 -> 0, 3, 5, 6 -> 2, 5, 7, 8\n",
" \"IXZZX\", # 0010010110 -> 2, 5, 7, 8 -> 4, 7, 9, 10\n",
" \"XIXZZ\", # 1000100101 -> 0, 4, 7, 9 -> 2, 6, 9, 11\n",
" \"ZXIXZ\", # 0110001001 -> 1, 2, 6, 9 -> 3, 4, 8, 11\n",
"]\n",
"\n",
"logical_operators = [\n",
" \"XXXXX\", # X -> 0101010101\n",
" \"ZZZZZ\", # Z -> 1010101010\n",
" \"XXXXX\", # X -> 0101010101 -> 1, 3, 5, 7, 9\n",
" \"ZZZZZ\", # Z -> 1010101010 -> 0, 2, 4, 6, 8\n",
"]"
]
},
Expand All @@ -84,7 +84,7 @@
{
"data": {
"text/plain": [
"[[2, 4, 6, 8], [4, 6, 8, 10], [2, 6, 8, 10], [2, 4, 8, 10]]"
"[[2, 5, 7, 8], [4, 7, 9, 10], [2, 6, 9, 11], [3, 4, 8, 11]]"
]
},
"execution_count": 3,
Expand All @@ -98,9 +98,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"[[[2], [5, 7], [3, 4, 6], [8]],\n",
" [[4], [7, 9], [5, 6, 8], [10]],\n",
" [[2], [6, 9], [3, 4, 5, 7, 8, 10], [11]],\n",
" [[3], [4, 8], [5, 6, 7, 9, 10], [11]]]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"custom_code_constraint_sites(stabilizer_generators, logical_operators)"
]
Expand All @@ -111,7 +125,7 @@
"metadata": {},
"outputs": [],
"source": [
"custom_code_logicals(stabilizer_generators, logical_operators)"
"custom_code_logicals(logical_operators)"
]
},
{
Expand Down
23 changes: 15 additions & 8 deletions docs/source/shor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 2/2 [00:00<00:00, 196.19it/s]\n",
"100%|██████████| 6/6 [00:00<00:00, 547.94it/s]\n",
"100%|██████████| 1/1 [00:00<00:00, 181.89it/s]\n",
"100%|██████████| 1/1 [00:00<00:00, 132.59it/s]\n"
"100%|██████████| 2/2 [00:00<00:00, 194.04it/s]\n",
"100%|██████████| 6/6 [00:00<00:00, 506.47it/s]\n",
"100%|██████████| 1/1 [00:00<00:00, 157.70it/s]\n",
"100%|██████████| 1/1 [00:00<00:00, 123.62it/s]\n"
]
}
],
Expand Down Expand Up @@ -454,13 +454,20 @@
"text": [
"0it [00:00, ?it/s]/Users/aleksandrberezutskii/mdopt/mdopt/mps/canonical.py:274: RuntimeWarning: invalid value encountered in divide\n",
" dense /= np.linalg.norm(dense, ord=norm)\n",
"27it [00:00, 61.83it/s]\n"
"27it [00:00, 57.28it/s]\n"
]
}
],
"source": [
"one_qubit_outputs = [\n",
" decode_css(code, error, bias_type=\"Bitflip\", renormalise=renormalise, silent=True, bias_prob=0)\n",
" decode_css(\n",
" code,\n",
" error,\n",
" bias_type=\"Bitflip\",\n",
" renormalise=renormalise,\n",
" silent=True,\n",
" bias_prob=0,\n",
" )\n",
" for error in tqdm(one_qubit_paulis)\n",
"]\n",
"one_qubit_corrections_distribution = [output[0] for output in one_qubit_outputs]"
Expand All @@ -475,7 +482,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"324it [00:04, 74.09it/s]\n"
"324it [00:04, 71.60it/s]\n"
]
}
],
Expand All @@ -496,7 +503,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2268it [00:31, 70.93it/s]\n"
"2268it [00:32, 68.75it/s]\n"
]
}
],
Expand Down

0 comments on commit a5850e3

Please sign in to comment.