Qiskit Practice
EXAM C1000-3000 (Impossible) 68 questions

Qiskit v2.x mock exam

Select one answer per question. Submit to see the explanation.

Question 23 / 68
A regression test sets X on q₀, swaps q₀ and q₁, then measures q₀ into c₀ and q₁ into c₁. OptimizeSwapBeforeMeasure legally removes the final SWAP by retargeting the measurements. What measured output must be preserved?
qc = QuantumCircuit(2, 2)
qc.x(0)
qc.swap(0, 1)
qc.measure([0, 1], [0, 1])
optimized = PassManager([OptimizeSwapBeforeMeasure()]).run(qc)