mqt.qudits.core.dfs_tree

Module Contents

class Node(key: int, rotation: R | CustomOne, u_of_level: numpy.typing.NDArray[numpy.complex128], graph_current: LevelGraph | None, current_cost: float, current_decomp_cost: float, max_cost: tuple[float, float], pi_pulses: list[R], parent_key: int | None = None, children: list[Node] | None = None)[source]
key
children: list[Node] = None
rotation
u_of_level
finished: bool = False
current_cost
current_decomp_cost
max_cost
size = 0
parent_key = None
graph
PI_PULSES
add(new_key: int, rotation: R | CustomOne, u_of_level: numpy.typing.NDArray[numpy.complex128], graph_current: LevelGraph | None, current_cost: float, current_decomp_cost: float, max_cost: tuple[float, float], pi_pulses: list[R]) → None[source]
__str__() → str[source]
__bool__() → bool[source]
class NAryTree[source]
size: int = 0
global_id_counter: int = 0
add(new_key: int, rotation: R | CustomOne, u_of_level: numpy.typing.NDArray[numpy.complex128], graph_current: LevelGraph | None, current_cost: float, current_decomp_cost: float, max_cost: tuple[float, float], pi_pulses: list[R], parent_key: int | None = None) → None[source]
find_node(node: Node, key: int) → Node | None[source]
depth(key: int) → int[source]
max_depth(node: Node) → int[source]
static size_refresh(node: Node) → int[source]
static found_checker(node: Node) → bool[source]
static min_cost_decomp(node: Node) → tuple[list[Node], tuple[float, float], LevelGraph | None][source]
retrieve_decomposition(node: Node) → tuple[list[Node], tuple[float, float], LevelGraph | None][source]
is_empty() → bool[source]
property total_size: int
print_tree(node: Node, str_aux: str) → str[source]
__str__() → str[source]