B10 Quantum mechanics · Practice
Quantum gates and circuits
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 7 kinds solid
Check
A circuit has 100 gates, each with an error probability of 0.001. About what is the chance all of them succeed?
Check
Start in and apply a Hadamard gate.
(a)
What is the amplitude of afterward?
(b)
And of ?
Check
Using NumPy, build H, I2 and CNOT as matrices and start from the two-qubit state whose basis index is k = 1 ( are 0 to 3). Apply to the first qubit (np.kron(H, I2)), then CNOT. Set psi to the final state and probs to the four measurement probabilities.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Simulate Deutsch's algorithm for the one-bit function picked by f = 1: 0 is , 1 is , 2 is , 3 is . Build the oracle as a matrix mapping , start from , apply , the oracle, then , and set p1 to the probability that the first qubit is 1, and balanced to whether p1 > 0.5.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A qubit's coherence time is 50 µs and its gates take 30 ns. About how many gate times fit in one coherence time?
Check
Approximately, what is , using ?
Check
With per-gate error 0.01, after how many gates does the success probability fall to 50%?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in B10