Skip to content

tsim.compile.stabrank.find_stab

← Module overview

functionfind_stabsource

tsim.compile.stabrank.find_stab

Signature
def find_stab(graph: BaseGraph, strategy: DecompositionStrategy) -> list[BaseGraph]

Decompose a ZX-graph into a sum of stabilizer components.

This is the main entry point for stabilizer rank decomposition. It first removes U3 phases, then decomposes T gates via BSS decompositions, producing a sum of scalar graphs.

Parameters

NameTypeDescription
graphBaseGraphThe ZX graph to decompose.
strategyDecompositionStrategyDecomposition strategy. Must be one of "cat5", "bss", "cutting".

Returns

list[BaseGraph]A list of scalar graphs whose sum equals the original graph.

source