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: object

One scored spanning tree, as returned by rank_ghz_trees().

Attributes

rank

Its position in the ranking returned by rank_ghz_trees(), 0 being the best.

root

Qubit holding the initial superposition, i.e. the starting node of the tree.

pairs

The (control, target) CX pairs, as physical qubit indices, in gate order.

order

The physical qubits in the order they become entangled, the root first.

cost

Value of the search objective for this candidate; lower is better.

stats

layers, weight, idle_cost and idle_time.

family

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:
root: int#

Qubit holding the initial superposition, i.e. the starting node of the tree.

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 i is order[i]. Passing it to the transpiler as the initial layout is what keeps the tree edges on real couplings without a layout search.

cost: float#

Value of the search objective for this candidate; lower is better.

stats: dict[str, float]#

layers, weight, idle_cost and idle_time.

Type:

The terms behind cost

family: str#

Which candidate family produced it, one of "mst", "subset+dijkstra", "dijkstra".

rank: int = 0#

Its position in the ranking returned by rank_ghz_trees(), 0 being the best.