circuit_complexity¶
- autoeis.utils.circuit_complexity(circuit: str) list[int] ¶
Computes the component complexity of the circuit.
Component complexity is defined as how deep it is nested in the circuit.
- Parameters:
circuit (str) – CDC string representation of the input circuit. See here for details.
- Returns:
A list of component complexity values.
- Return type:
list[int]
Examples
>>> circuit_complexity("R1-[P2,[P3,R4]]-R5") [0, 1, 2, 2, 0]