localuf.decoders.node_buf

Classes

NodeBUF(code[, dynamic, inclination])

The graph used by Bucket UF decoder in Huang2020.

class localuf.decoders.node_buf.NodeBUF(code, dynamic=False, inclination='default')[source]

Bases: NodeUF

The graph used by Bucket UF decoder in Huang2020.

Extends decoders.NodeUF.

Overriden attributes:

  • buckets replaces active_clusters

    and is a dictionary where each key a cluster size; value, a set of all active clusters of that size.

Overriden methods:

  • reset.

  • load.

  • validate_syndrome.

  • _update_self_after_union.

Parameters:
  • code (Code)

  • dynamic (bool)

  • inclination (Literal['default', 'west'])

reset()[source]

Factory reset.

Parameters:

no_boundaries – whether to treat all boundary nodes as detectors too.

load(syndrome)[source]

Load a new syndrome.

Parameters:

syndrome (set[tuple[int, ...]])

validate(syndrome, log_history=False)[source]

Grow clusters (always smallest first) until they are all valid.