Qubit Representation & Superposition
A qubit exists in a superposition of states, represented as |ψ⟩ = α|0⟩ + β|1⟩, where α and β are complex amplitudes. The magnitude squared of each amplitude (|α|^2 and |β|^2) represents the probability of measuring the qubit in the corresponding state.
Quantum gates operate on these superpositions to transform them into new states. For example, a Hadamard gate (H) creates an equal superposition of |0⟩ and |1⟩: H|ψ⟩ = (1/√2)(|0⟩ + |1⟩)|ψ⟩.
|ψ⟩ = α|0⟩ + β|1⟩ (α, β are complex amplitudes)
Single-Qubit Gates
Several single-qubit gates exist, each performing a specific transformation. The Hadamard gate (H) is fundamental, creating superposition.
The Pauli X gate (X) acts like a bit flip: X|0⟩ = |1⟩ and X|1⟩ = |0⟩. The Pauli Y gate (Y) performs a phase shift, and the Pauli Z gate (Z) applies a rotation around the z-axis of the Bloch sphere.
X|ψ⟩ = -i|ψ⟩ Z|ψ⟩ = exp(iθ)|ψ⟩
Multi-Qubit Gates & Entanglement
Multi-qubit gates operate on two or more qubits simultaneously. The Controlled-NOT gate (CNOT) is a key example, where the state of one qubit (the control) determines whether the other qubit (the target) is flipped.
Entanglement arises when qubits become correlated in such a way that their states are linked, regardless of the distance separating them. The CNOT gate is crucial for creating and manipulating entanglement.
CNOT: |00⟩ → |00⟩, |01⟩ → |01⟩, |10⟩ → |11⟩, |11⟩ → |10⟩
Quantum Circuit Representation
Quantum gates are arranged in sequences to form quantum circuits. These circuits represent a specific quantum algorithm.
The order of gate application is crucial, as it dictates the evolution of the qubit states. The simulation allows you to build and execute these circuits to observe their effects on the qubits.
Frequently asked questions
What is a Bloch sphere?
The Bloch sphere is a geometrical representation of a qubit's state, mapping its complex amplitudes onto angles.
Why are quantum gates important?
Quantum gates enable the manipulation of qubits and the execution of quantum algorithms, which can solve certain problems much faster than classical computers.
What is entanglement?
Entanglement is a quantum phenomenon where two or more particles become linked in such a way that they share the same fate, no matter how far apart they are.
Try it live
Everything above runs in your browser — open SPH Fluid and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open SPH Fluid simulation