iqm.benchmarks.entanglement.ghz_optimal.TreeCandidate#
- class iqm.benchmarks.entanglement.ghz_optimal.TreeCandidate(root: int, pairs: list[tuple[int, int]], order: list[int], cost: float, stats: dict[str, float], family: str, rank: int = 0)#
Bases:
objectOne scored spanning tree, as returned by
rank_ghz_trees().Attributes
Its position in the ranking returned by
rank_ghz_trees(),0being the best.Qubit holding the initial superposition, i.e. the starting node of the tree.
The
(control, target)CX pairs, as physical qubit indices, in gate order.The physical qubits in the order they become entangled, the root first.
Value of the search objective for this candidate; lower is better.
layers,weight,idle_costandidle_time.Which candidate family produced it, one of
"mst","subset+dijkstra","dijkstra".Methods
__delattr__(name)Implement delattr(self, name).
__eq__(other)Return self==value.
__hash__()Return hash(self).
__repr__()Return repr(self).
__setattr__(name, value)Implement setattr(self, name, value).
- Parameters:
- pairs: list[tuple[int, int]]#
The
(control, target)CX pairs, as physical qubit indices, in gate order.
- order: list[int]#
The physical qubits in the order they become entangled, the root first.
This is the logical-qubit order of the generated circuit: logical index
iisorder[i]. Passing it to the transpiler as the initial layout is what keeps the tree edges on real couplings without a layout search.
- rank: int = 0#
Its position in the ranking returned by
rank_ghz_trees(),0being the best.