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) – networkx.Graph A graph of the backend coupling map

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

  • n_state (int | None) – int 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:

QuantumCircuit

A quantum circuit generating a GHZ state of n qubits

participating_qubits: List[int]

The list of qubits on which the GHZ state is defined. This is a subset of qubit_layout with size n_state

Return type:

qc