Hands-on lab · 1 step
SWAP from three CNOTs
Build the two-qubit SWAP gate, which exchanges the states of the two wires, using only CNOT gates and at most three of them.
0/1 step passedBest score 0/100
Step 1: Exchange two qubits
Using only CNOT gates (at most three, in either direction), build a two-qubit circuit whose unitary equals that is, for all . Qubit 0 is the most significant bit, so the basis order is . The grader computes your circuit unitary and the process fidelity , which equals exactly when for some real . Measurements are not allowed.