iqm.benchmarks.entanglement.ghz_optimal#
Choosing the qubits, the tree and the gate order of a GHZ state.
The GHZ state is prepared by spreading entanglement from one root qubit along a spanning tree of the
chip’s coupling graph, so the tree decides both the gate error paid (its edges are the CZ gates
played) and the circuit depth (its shape decides how many of them can run in parallel). Optimizing
only the first of those – taking the minimum spanning tree, which minimizes the total
-log(CZ fidelity) and nothing else – degenerates on a chip of similar couplers into a long
snake, where every qubit is entangled early and then idles through the remaining layers while the
rest of the tree is built.
This module backs the "tree" state generation routine of
iqm.benchmarks.entanglement.ghz, and picks all three together:
_ghz_graph()builds the weighted connectivity graph over the layout;_tree_candidates()enumerates the trees worth considering;_schedule_cost()prices each one against the objective inTreeSearchOptions;rank_ghz_trees()returns the best candidate of each root, ordered by that price, andgenerate_ghz_tree_optimal()turns the requested rank of that ranking into a circuit.
The root qubit is the one the objective weighs most heavily: it carries the extra Hadamard, normally holds the highest degree of the tree, and is entangled before the first layer, so it is exposed to the whole idle window. Which root wins therefore depends on its single-qubit gate fidelity, T1 and T2 as well as on the CZ fidelities of the tree edges.
Calibration comes from extract_fidelities_unified(), which does not
report gate durations, so a single CZ_GATE_DURATION is assumed for every CZ layer.
Module Attributes
Duration assumed for every CZ layer, in seconds. |
|
Accepted values of |
Functions
|
Recover the physical-index CX pairs of a generated GHZ circuit, in circuit order. |
|
Assign each CX of the tree to the earliest layer it can run in. |
|
Build a shallow GHZ circuit from one of the ranked trees over the layout. |
|
Score one spanning tree per possible root qubit and return them best first. |
|
Choose the qubits, the tree and the gate order of the GHZ state. |
Classes
|
One scored spanning tree, as returned by |
|
How the tree search trades gate fidelity against circuit depth. |
Inheritance
