> ## Documentation Index
> Fetch the complete documentation index at: https://tsim.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# stabrank

> Stabilizer rank decomposition for non-Clifford ZX graphs.

## `find_stab`

```python theme={null}
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:**

* `graph` (`BaseGraph`) — The ZX graph to decompose.
* `strategy` (`DecompositionStrategy`) — Decomposition strategy. Must be one of "cat5", "bss", "cutting".

**Returns:**

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

## `find_stab_magic`

```python theme={null}
find_stab_magic(graphs: Iterable[BaseGraph], strategy: DecompositionStrategy) -> list[BaseGraph]
```

Recursively decompose ZX-graphs into stabilizer components via magic-state removal.

## `find_stab_u3`

```python theme={null}
find_stab_u3(graphs: Iterable[BaseGraph], strategy: DecompositionStrategy) -> list[BaseGraph]
```

Recursively decompose ZX-graphs by removing U3 phases.
