|q⟩
Bad Qubits
Play
Quest
Questions
Learn
Playground
☕
← Question Bank
Multiple choice
A device provides CNOT but not a native SWAP. Using the circuit identity from the lesson, how is SWAP(0,1) realized with CNOTs only?
Two Hadamards and one CNOT: h(0); cx(0,1); h(1)
Two CNOTs with the same control: cx(0,1); cx(0,1)
Three alternating CNOTs: cx(0,1); cx(1,0); cx(0,1)
A single CNOT: cx(0,1)
Check answer