yaleqc/qtcodes

[Surface][Circuit] Encode rotated surface code with arbitrary width and height

Closed this issue · 0 comments

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:

  1. 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.
  2. 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.
  3. Update the call-sites of XXZZQubit and XZZXQubit to use XXZZSquareQubit and XZZXSquareQubit, which can be subclasses of the now more general XXZZQubit and XZZXQubit rectangular rotated surface code classes.
  4. It may be possible to have RepetitionQubit extend from XXZZQubit (or at least RotatedQubit), as the Repetition code can be thought of as a very slim surface code. (Moved to #60)
  5. Track/demonstrate your changes in a Jupyter Notebook stored under tutorials/.
  6. Add unittests to tests/.
  7. 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.
  8. 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:

  1. Please use the black python formatter (tutorial using vscode).
  2. Please add typing hints and docstrings to any new code you write and wherever you find these missing.