surface_sim.layouts.check_code_definition#

check_code_definition(layout)[source]#

Checks if the QEC code defined in the layout satisfies the following properties:

  1. stabilisers commute with each other

  2. logical Paulis commute with all stabilisers

  3. logical Xi and Zi anticommute

  4. logical Paulis are independent (i.e. no product of them is in the stabilizer group)