iqm.benchmarks.entanglement.ghz.generate_ghz_linear#
- iqm.benchmarks.entanglement.ghz.generate_ghz_linear(num_qubits: int) IQMCircuit#
Generates a GHZ state by applying a Hadamard and a series of CX gates in a linear fashion.
The construction is symmetrized to halve the circuit depth.
- Parameters:
num_qubits (int) – The number of qubits of the GHZ state.
- Returns:
A quantum circuit generating a GHZ state on a given number of qubits.
- Return type: