[Surface][Circuit] Encode rotated surface code with arbitrary width and height
Closed this issue · 0 comments
Phionx commented
Let's generalize the square rotated surface code encoder to a rectangular rotated surface code encoder.
Here are some steps to guide you in this task:
- Create a new branch on this repo named "feature/28/rectangular-surface-code". Please regularly merge changes from master into this branch as you work on this task to keep the branch up to date.
- Start by reading through rotated_surface.py, xxzz.py and xzzx.py and notice where
self.params["d"]
is used and relied upon. In this task, you will primarily change these files. Update the call-sites ofXXZZQubit
andXZZXQubit
to useXXZZSquareQubit
andXZZXSquareQubit
, which can be subclasses of the now more generalXXZZQubit
andXZZXQubit
rectangular rotated surface code classes.It may be possible to have(Moved to #60)RepetitionQubit
extend fromXXZZQubit
(or at leastRotatedQubit
), as the Repetition code can be thought of as a very slim surface code.- Track/demonstrate your changes in a Jupyter Notebook stored under tutorials/.
- Add unittests to tests/.
- Once you have completed the above steps and there are no obvious bugs/broken code, please make a PR to merge your branch changes into master.
- After getting reviewed and undergoing changes, the PR will be merged into master.
(Very Rough) Estimated Time: 2-3 weeks
Other things to keep in mind:
- Please use the black python formatter (tutorial using vscode).
- Please add typing hints and docstrings to any new code you write and wherever you find these missing.