OPENQASM 3.0; // A GHZ state the plain way: a Hadamard, then a chain of CX down the line. // Depth n, n - 1 two-qubit gates. input uint n; qubit[n] q; h q[0]; for uint i in [0:n-2] { cx q[i], q[i + 1]; }