iqm.benchmarks.entanglement.ghz.generate_ghz_spanning_tree

iqm.benchmarks.entanglement.ghz.generate_ghz_spanning_tree#

iqm.benchmarks.entanglement.ghz.generate_ghz_spanning_tree(graph: Graph, qubit_layout: list[int], n_state: int | None = None) tuple[IQMCircuit, list[int]]#

Generates a GHZ state in log-depth by computing a minimal spanning tree for a given coupling map.

Parameters:
  • graph (Graph) – A graph of the backend coupling map

  • qubit_layout (list[int]) – The subset of system-qubits used in the protocol, indexed from 0

  • n_state (int | None) – The number of qubits for which a GHZ state should be created. This values should be smaller or equal to the number of qubits in qubit_layout

Returns:

A quantum circuit generating a GHZ state of n qubits The list of qubits on which the GHZ state is defined. This is a subset of qubit_layout with size n_state

Return type:

tuple[IQMCircuit, list[int]]