Fundamentals of Quantum Computing
This post summarizes the core concepts of quantum computing, starting from classical reversible gates and moving through the fundamental postulates of quantum states and dynamics.
1. Classical Gates and Reversible Computing
1.1 Universality
A set of gates is called universal if it can compute any function
- Examples of universal sets include
, and the single gate .

1.2 The Need for Reversibility
Standard classical gates like AND are not reversible because you cannot uniquely determine the inputs

- The Unitary Nature of Quantum Mechanics: The time evolution of any closed quantum system is described by a Unitary Operator (
). In linear algebra, a matrix is unitary: . - Because
has an inverse ( ), you can always "undo" the operation. - The evolution
is derived from the Schrödinger Equation. When the Hamiltonian ( ) of a system is time-independent, the evolution is expressed as , which is inherently a unitary (and thus reversible) operator. - Unitary transformations preserve the
-norm (the total probability) of the quantum state, ensuring it remains exactly 1 throughout the evolution.
- Because
- Information Conservation: In classical computing, operations like AND are irreversible because they discard information.
- No Information Loss: In a quantum system, information cannot be "deleted" or "lost" into thin air; it must be preserved within the system's state.
- The Toffoli Gate Example: To perform classical-style logic (like AND) in a quantum way, we use reversible gates like the Toffoli gate (Controlled-Controlled-NOT) which is also universal. This gate uses an Ancilla bit to store the result while keeping the original inputs intact, allowing the entire process to be reversed.
- Whenever we can compute
efficiently in polynomial time, we can efficiently compute the reversible mapping .

- Physical Heat and Landauer's Principle: the physical reason for pursuing reversibility is often related to energy.
- Heat Generation: Landauer's Principle states that erasing 1 bit of information releases a specific amount of heat into the environment.
- Energy Efficiency: Because quantum evolution is unitary (reversible), it theoretically does not require the erasure of information, which is a key requirement for building hardware that avoids the massive heat dissipation seen in classical high-performance chips.
2. Postulates of Quantum Computing: States
2.1 The Qubit
A qubit is represented by a complex vector in a two-dimensional Hilbert space:
where
- Computational Basis: The vectors
and form the standard basis for a qubit. - Dirac Notation:
- Ket
: A column vector. - Bra
: The conjugate transpose (dual vector) of a ket, represented as a row vector. - Inner Product:
. - Outer Product:
(the Identity matrix).
- Ket
2.2 The Bloch Sphere
Any single-qubit state can be visualized as a point on the Bloch Sphere using the following parameters:
where

3. Quantum Dynamics
The time evolution of a closed quantum system is described by a Unitary Transformation.
- A matrix
is unitary if . - This ensures that the state remains normalized:
.
Common Single-Qubit Gates
-
Pauli Gates:
, , . -
Hadamard (H):
. -
Phase Gates:
(Note: Corrected from notes) and .
4. Composite Systems and Entanglement
4.1 Tensor Products
The state space of a composite system is the tensor product of its individual component spaces. For example, if we have two qubits in states
4.2 Quantum Entanglement
- Product States: States that can be written in the form
. - Entangled States: States that cannot be decomposed into a product of individual qubit states.
- Example: The state
is entangled. Proof: Setting while leads to a contradiction.
- Example: The state
Practical Implementation
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
# 1. Create a Bell State (Entangled State)
qc = QuantumCircuit(2)
qc.h(0) # Apply Hadamard to the first qubit
qc.cx(0, 1) # Apply CNOT (controlled by q0, targeting q1)
# View the statevector
state = Statevector.from_instruction(qc)
print("Bell State Vector:")
print(state.data)
# 2. Apply a gate to a subsystem: (I ⊗ X) acting on the Bell state
qc.x(1)
final_state = Statevector.from_instruction(qc)
print("\nState after (I ⊗ X):")
print(final_state.data)