Skip to content

Commit 7b8bc2e

Browse files
Updates to non-deterministic FTSP (#382)
## Description This PR adds some features to the non-deterministic fault-tolerant state preparation synthesis and simulations. Changes: - The idle noise parameter can now be defined explicitly in the construction of the `NoisyNDFTStatePrepSimulator`. - Added more optimized constructions for flag fault-tolerant stabilizer measurements. - Added circuits and evaluations for the state preparation of the d=7 square-octagon color code. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0961b45 commit 7b8bc2e

15 files changed

Lines changed: 4031 additions & 184 deletions

docs/StatePrep.ipynb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
"source": [
138138
"ps = [0.1, 0.05, 0.01, 0.008, 0.006, 0.004, 0.002, 0.001]\n",
139139
"\n",
140-
"non_ft_simulator.plot_state_prep(ps, min_errors=50, name=\"non-FT\")\n",
141-
"ft_simulator.plot_state_prep(ps, min_errors=50, name=\"FT\")"
140+
"non_ft_simulator.plot_state_prep(ps, min_errors=50, name=\"non-FT\", p_idle_factor=0.01)\n",
141+
"ft_simulator.plot_state_prep(ps, min_errors=50, name=\"FT\", p_idle_factor=0.01)"
142142
]
143143
},
144144
{
@@ -245,12 +245,14 @@
245245
"metadata": {},
246246
"outputs": [],
247247
"source": [
248-
"cc_simulator = NoisyNDFTStatePrepSimulator(cc_ft_sp, code=cc, zero_state=True, p=p)\n",
248+
"cc_simulator = NoisyNDFTStatePrepSimulator(cc_ft_sp, code=cc, zero_state=True)\n",
249249
"\n",
250-
"ps = [0.1, 0.05, 0.01, 0.008, 0.006, 0.004, 0.002, 0.001, 0.0008, 0.0006, 0.0004, 0.0003]\n",
250+
"ps = [0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.009, 0.008]\n",
251251
"\n",
252-
"ft_simulator.plot_state_prep(ps, min_errors=50, name=\"Distance 3\") # simulate Steane code as comparison\n",
253-
"cc_simulator.plot_state_prep(ps, min_errors=50, name=\"Distance 5\")"
252+
"ft_simulator.plot_state_prep(\n",
253+
" ps, min_errors=50, name=\"Distance 3\", p_idle_factor=0.01\n",
254+
") # simulate Steane code as comparison\n",
255+
"cc_simulator.plot_state_prep(ps, min_errors=50, name=\"Distance 5\", p_idle_factor=0.01)"
254256
]
255257
},
256258
{
@@ -418,7 +420,7 @@
418420
],
419421
"metadata": {
420422
"kernelspec": {
421-
"display_name": "venv3_12",
423+
"display_name": "Python 3 (ipykernel)",
422424
"language": "python",
423425
"name": "python3"
424426
},

0 commit comments

Comments
 (0)