Error Correcting Codes

Error-detecting Checks

class py_qcode.ErrorCheck(primal_sets, dual_points, rule)

This is the primitive operation of measurement for error-correcting codes; it takes a list of errors on a subset of the primal lattice of the code and translates it into syndromes on a subset of the dual lattice.

Parameters:
  • primal_sets (collection of whatever maps to py_qcode.Point objects) – co-ordinates from which the error check will collect syndromes. I’ll add input checking so that tuples of co-ordinates can be entered on their own instead of the objects which wrap them.
  • dual_points (set/list of tuples or py_qcode.Point objects.) – points on the dual lattice to which the syndrome for this error check will be written
  • rule (function or dict) – lookup table or other mechanism that maps errors to syndromes.

Stabilizer Checks

class py_qcode.StabilizerCheck(primal_sets, dual_points, stabilizer, indy_css=False)

subclass of py_qcode.ErrorCheck, takes anything that can be cast to a qecc.Pauli instead of a rule, and uses commutation to determine the syndrome.

class py_qcode.ErrorCorrectingCode(parity_check_list, name='Un-named')

Wraps a bunch of parity checks.

Parameters:parity_check_list (list) – A list of py_qcode.ErrorCheck objects, which can be a mix of any subclass of py_qcode.ErrorCheck.
measure()

Evaluates all the parity checks.

Pre-defined Codes

py_qcode.toric_code(primal_grid, dual_grid)

Uses a few convenience functions to produce the toric code on a set of square lattices.

py_qcode.square_octagon_code(primal_grid, dual_grid)

Uses a few convenience functions to produce the concatenated toric/[[4,2,2]] code on a set of square lattices.

Table Of Contents

Previous topic

Points and Lattices

Next topic

Error Models

This Page