StabSubSystemCode

class StabSubSystemCode(gauge_group=None, *, shell=None, qubit_data=None, qubit_count=None)[source]

Bases: Code

The “StabSubSystemCode” inherits the “Code” class

Stabilizer Subsystem System Code Class

A stabilizer subsystem code can be initialized by providing either a gauge group of a shell and associated data but not both.

Parameters:
  • gauge_group (optional) – Gauge group defining the subsystem. Defaults to None.

  • shell (optional) – Shell definging the subsystem. Defaults to None.

  • qubit_data (optional) – Qubit data associated with defining shell. Defaults to None.

  • qubit_count (optional) – Qubit count data associated with defining shell. Defaults to None.

Examples

>>> generators = PauliList(['X1X2','Z3Z4', 'X3Z9'])
>>> gauge_group = GaugeGroup(generators)
>>> code = StabSubSystemCode(gauge_group)
>>> qubit_data = QubitData()
>>> qubit_count = QubitCount()
>>> origin = numpy.array([0,0])
>>> shell = CheckerBoardTile(origin=origin,
                             qubit_data=qubit_data,
                             qubit_count=qubit_count)
>>> code = StabSubSystemCode(shell)

Methods

draw(**kwargs)[source]

Draws the subsytem code if a shell exists

Return type:

None

Attributes

generators

Returns the Pauli generators for the subsystem

n

_summary_

Returns:

_description_

Return type:

int