tensorcircuit.zx.simplifier¶

ZX graph simplification wrapper.

tensorcircuit.zx.simplifier.full_reduce(g: Any, param_safe: bool = True) None[source]¶

Apply PyZX full_reduce to the graph.

Parameters:
  • g (Any) – The ZX graph.

  • param_safe (bool, optional) – Whether to use parameter-safe simplification, defaults to True.

tensorcircuit.zx.simplifier.t_count(g: Any) int[source]¶

Return the T-count of the graph.

Parameters:

g (Any) – The ZX graph.

Returns:

Number of T or T-like vertices.

Return type:

int

tensorcircuit.zx.simplifier.teleport_reduce(g: Any) Any[source]¶

Apply PyZX teleport_reduce to the graph.

Parameters:

g (Any) – The ZX graph.

Returns:

A new simplified graph.

Return type:

Any