circuits / qaoa-maxcut-2
QAOA (MaxCut, 2 nodes)
✓FEATUREDQAOA circuit for the MaxCut problem on a 2-node graph. Uses alternating problem and mixer layers.
openqasm2q7 gatesdepth 50 views0 saves0 forks0 downloads
Source Code
OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
// Initial superposition
h q[0]; h q[1];
// Problem layer (gamma)
cx q[0],q[1];
rz(0.8) q[1];
cx q[0],q[1];
// Mixer layer (beta)
rx(0.6) q[0];
rx(0.6) q[1];
measure q -> c;Cite this circuit
MITquantumcomputer.dev. "QAOA (MaxCut, 2 nodes)". quantumcomputer.dev/circuits/qaoa-maxcut-2. 2026.