Hybrid starter · reviewed 2026-08-20
QAOA Max-Cut 4-node
Try a small graph problem and inspect how a quantum circuit evaluates different ways to divide it.
Recorded simulator example · open starter templates to create your own run. Open starter templates →

- Qubits
- 4
- Operations
- 24
- Shots
- 8,192
Encode
Map the four-node ring edges into the p=1 cost layer.
graph.json + circuitParameterize
Record gamma 0.72 and beta 0.39 without implying optimization.
parameters.jsonSample
Execute 8,192 seeded shots and retain every outcome.
counts.json + traceEvaluate
Score outcomes and compare with a classical baseline in the next iteration.
evidence manifest
Workflow question
What this sample is testing.
Encode one p=1 QAOA circuit for a four-node ring Max-Cut problem, run a fixed parameter point, and preserve the distribution needed for a later classical objective calculation.
Route rationale
Simulator run with provider-fit notes; optimizer benchmark is marked as pilot scope
Complete fixed-parameter distribution exported with graph and parameter context
Method
Prepare |+> on four qubits, apply cost unitaries for ring edges (0,1), (1,2), (2,3), and (3,0) with gamma 0.72, then apply the RX mixer with beta 0.39.
Execute 8,192 shots on Qiskit Aer with simulator and transpiler seed 2048. Keep every returned bitstring, the fixed parameters, graph, source, and evidence manifest together.
How to read the result
The stored distribution is a single parameter-point sample, not an optimizer result. High-frequency bitstrings can be scored against the four-node ring objective, then compared with classical baselines and other parameter choices.
The complete count table sums to 8,192 shots. Keeping all outcomes prevents a selected-top-results chart from being mistaken for the full distribution.
Measured distribution
Complete seeded count table
8,192 shots
Complete ideal-simulator distribution. Engine Qiskit Aer 0.17.0; simulator and transpiler seed 2048. This static public fixture is not a live provider run.
Proof boundary
- No classical optimizer loop is run on this page, so it does not claim convergence, approximation ratio, business value, or quantum advantage.
- The result is from an ideal local simulator. Hardware noise, transpilation, shot budget, parameter initialization, and mitigation can materially change the distribution.
- A meaningful benchmark must score every bitstring, compare against the known classical optimum, and report the parameter-search method.
Generated representations
Inspect the source behind the counts.
The public code is a review fixture. Provider credentials, workspace members, billing context, and private notes stay excluded.
Qiskit circuit
Pythonfrom qiskit import QuantumCircuit
gamma = 0.72
beta = 0.39
qc = QuantumCircuit(4, 4)
qc.h(range(4))
for a, b in [(0, 1), (1, 2), (2, 3), (3, 0)]:
qc.cx(a, b)
qc.rz(2 * gamma, b)
qc.cx(a, b)
qc.rx(2 * beta, range(4))
qc.measure(range(4), range(4))OpenQASM circuit
OpenQASM 3OPENQASM 3;
include "stdgates.inc";
bit[4] c;
qubit[4] q;
h q[0];
h q[1];
h q[2];
h q[3];
cx q[0], q[1];
rz(1.44) q[1];
cx q[0], q[1];
cx q[1], q[2];
rz(1.44) q[2];
cx q[1], q[2];
cx q[2], q[3];
rz(1.44) q[3];
cx q[2], q[3];
cx q[3], q[0];
rz(1.44) q[0];
cx q[3], q[0];
rx(0.78) q[0];
rx(0.78) q[1];
rx(0.78) q[2];
rx(0.78) q[3];
c[0] = measure q[0];
c[1] = measure q[1];
c[2] = measure q[2];
c[3] = measure q[3];Evidence manifest
JSON{
"workflowId": "QF-SAMPLE-QAOA-4",
"runner": "qiskit-aer",
"artifacts": [
"graph.json",
"parameters.json",
"counts.json",
"cost-trace.csv",
"evidence-manifest.json"
],
"privateFieldsExcluded": [
"providerCredentialId",
"budgetControls",
"internalApproverNotes"
]
}What the reviewer receives
- graph.json
- parameters.json
- counts.json
- cost-trace.csv
- evidence-manifest.json
Explicitly excluded
- providerCredentialId
- budgetControls
- internalApproverNotes
Questions this record answers
Workflow FAQ
What does this QAOA Max-Cut workflow demonstrate?
It demonstrates circuit encoding, fixed parameters, complete simulator sampling, and the evidence needed for a later classical scoring and optimizer loop.
Is this a completed QAOA optimization benchmark?
No. It samples one p=1 parameter point. It does not run an optimizer or claim convergence, approximation ratio, or quantum advantage.
Why publish the full QAOA distribution?
A complete distribution lets reviewers verify the shot total, score every bitstring, and avoid confusing a selected-results chart with the full experiment output.