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. :param num_qubits: the number of qubits of the GHZ state
- Returns:
A quantum circuit generating a GHZ state of n qubits
- Parameters:
num_qubits (int) –
- Return type:
IQMCircuit