Quantum Gate Puzzle

QWordle

Pick tokens from the keyboard to build your guess.

Gate Keyboard

Simulation Insights

Fidelity: --

Guess Final State

No guess submitted yet.

Target Final State

No guess submitted yet.

Most Recent Guess Circuit (Qiskit)

No guess submitted yet.

Bloch Spheres by Step (Qiskit)

How To Play

Objective

Find the hidden 5-gate circuit in 6 guesses. Each guess must use valid gates for the selected mode.

  1. Build a guess from the gate keyboard.
  2. In 2/3 qubit modes, click a pending tile to cycle qubit mappings (target/control/swap indices).
  3. Submit the guess and use tile feedback plus simulation insights to refine your next guess.
  4. Win by matching the exact 5-token sequence in order.

Feedback colors: green = correct token in correct slot, yellow = token exists in another slot, gray = token not in the answer.

The simulation panel shows fidelity, final state terms, Qiskit circuit drawing, and Bloch-sphere evolution by step.

Worked Example

Suppose the hidden answer is H0 CX01 T0 X1 Z0.

Guess:     H0 CZ01 T0 X1 Z0
Feedback:  correct | absent | correct | correct | correct
Reason:    only the 2nd gate is wrong (CZ01 vs CX01)

Your next guess should keep slots 1, 3, 4, 5 and replace slot 2. Fidelity and Bloch spheres can still reveal closeness even when token order is not solved yet.

Gate Reference + Matrices

Matrices are shown in the standard computational basis. Single-qubit basis is |0>, |1>. Two-qubit basis is |00>, |01>, |10>, |11>. Three-qubit basis is |000>..|111>.

X (Pauli-X)

Bit flip.

[ [0, 1],
  [1, 0] ]

Y (Pauli-Y)

Bit+phase rotation.

[ [0, -i],
  [i,  0] ]

Z (Pauli-Z)

Phase flip.

[ [ 1, 0],
  [ 0,-1] ]

H (Hadamard)

Creates/undoes equal superposition.

(1/sqrt(2)) * [ [ 1,  1],
                [ 1, -1] ]

S (Phase)

Applies +90 degree phase to |1>.

[ [1, 0],
  [0, i] ]

T (pi/8)

Applies +45 degree phase to |1>.

[ [1, 0],
  [0, exp(i*pi/4)] ]

CX (Controlled-X)

Flip target when control is |1>.

[ [1,0,0,0],
  [0,1,0,0],
  [0,0,0,1],
  [0,0,1,0] ]

CZ (Controlled-Z)

Apply phase flip to |11>.

[ [1,0,0,0],
  [0,1,0,0],
  [0,0,1,0],
  [0,0,0,-1] ]

SWAP

Exchange two qubits.

[ [1,0,0,0],
  [0,0,1,0],
  [0,1,0,0],
  [0,0,0,1] ]

CCX (Toffoli)

Flip target when both controls are |1>.

[ [1,0,0,0,0,0,0,0],
  [0,1,0,0,0,0,0,0],
  [0,0,1,0,0,0,0,0],
  [0,0,0,1,0,0,0,0],
  [0,0,0,0,1,0,0,0],
  [0,0,0,0,0,1,0,0],
  [0,0,0,0,0,0,0,1],
  [0,0,0,0,0,0,1,0] ]

CSWAP (Fredkin)

Swap two targets when control is |1>.

[ [1,0,0,0,0,0,0,0],
  [0,1,0,0,0,0,0,0],
  [0,0,1,0,0,0,0,0],
  [0,0,0,1,0,0,0,0],
  [0,0,0,0,1,0,0,0],
  [0,0,0,0,0,0,1,0],
  [0,0,0,0,0,1,0,0],
  [0,0,0,0,0,0,0,1] ]

Stats