// Grover's search on two qubits for |11⟩: one iteration finds it on every shot. // The oracle and the diffusion each a controlled-Z written with `ctrl @`. OPENQASM 3.1; include "stdgates.inc"; qubit[2] q; bit[2] c; h q; ctrl @ z q[0], q[1]; h q; x q; ctrl @ z q[0], q[1]; x q; h q; c = measure q;