First time studying this topic?

Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.

Topic 5.4

What is Quantum Computing? The Core Model

Understand the formal quantum circuit model: state preparation, unitary gate sequences, entanglement synthesis, and projective measurement.

Learning Objectives

  • ✓Define the Quantum Circuit model of computation
  • ✓Understand bra-ket (Dirac) notation: |psi>, <phi|, <phi|psi>
  • ✓Trace the life cycle of a quantum algorithm from initialization to readout

📖Let's Begin with a Story

In 1939, Paul Dirac introduced a notation so clean and powerful that physicists have used it ever since: Bra-Ket Notation. In Dirac notation, a column vector representing a quantum state is enclosed in a "ket": ∣ψ⟩|\psi\rangle. Its conjugate transpose row vector is enclosed in a "bra": ⟨ψ∣\langle\psi|. When you bring them together, you get a "bra-ket" (bracket!): ⟨ϕ∣ψ⟩\langle\phi \mid \psi\rangle representing the inner product between two states. With Dirac's elegant language, complex multidimensional matrix transformations become as simple and intuitive as basic algebra.

Why Should You Learn What is Quantum Computing? The Core Model?

🎯 Practical & Engineering Stakes

The language of quantum mechanics

Dirac notation is the universal language used across every quantum textbook, research paper, Qiskit script, and Cirq program in the world.

🎮 Fun Learning Zone

Grasp complex quantum concepts visually with zero prior physics or math knowledge!

Zero Prerequisites
Visual Concept Storyboard

The Orchestral Symphony of Complex Wave Harmonics

Classical: Mechanical Buzzer
🔲 🔘

Buzzer ON (1) or SILENT (0)

Binary switch. Can only buzz a single monotone frequency.

Quantum: Grand Pipe Organ
🎹 🎶 🌊

Multi-Harmonic Synthesizer

Unitary gates tune wave phases so dissonance cancels out and pure harmony rings!

Classical: Serial / ConstrainedQuantum: Coherent Wave Parallelism
Visual takeaway: Understand in 5 seconds

Everyday Analogy: The Orchestral Symphony of Complex Wave Harmonics

Many people mistakenly believe quantum computers are just super-speedy calculators that guess really fast. In reality, a quantum computer is a musical synthesizer! A classical bit is like a mechanical buzzer that can only buzz ON or stay SILENT. A quantum processor is like a grand pipe organ: it generates multiple musical notes (quantum states) with specific pitches, amplitudes, and sound phases. By running quantum gates, you conduct the music so dissonant wrong answers cancel out in silence, and the beautiful harmony of the right answer rings out loud and clear!
🧪

Interactive Mental Sandbox

Try It Yourself
Quantum Pipe Organ Harmonic Synthesizer

Adjust phase to see wave constructive harmony or destructive cancellation.

Phase Offset: 0°
🎶 🎹 🌊

HARMONIC RESONANCE (100% Amplitude)

In-phase components constructively amplify into the crystal clear right answer!

📖 The Thought Experiment Prompt:“Visualize an arrow pinned inside a sphere. A classical bit is a rigid switch: the arrow can ONLY point straight Up (0) or straight Down (1). A quantum computer frees the arrow: you can rotate it smoothly to ANY angle, point it toward the equator, or spin it around. Then, quantum algorithms apply geometric rotations (unitary matrices) to steer that arrow directly toward the bullseye solution before measuring.”

✨ The "Aha!" Moment

Quantum computing is linear algebra in a complex vector space (Hilbert space) where vectors represent states, unitary matrices represent logic gates, and wave interference isolates the solution!

What Is It?

Simple Explanation

A Quantum Computer is a machine that manipulates the quantum states of tiny particles (like electrons or photons) to solve math problems: 1. It starts with qubits in clean starting positions: ∣000…0⟩|000\dots0\rangle. 2. It pushes them through a circuit of quantum gates (which rotate their probabilities and entangle them). 3. It measures them at the end, and the right answer pops out as a string of ordinary 0s and 1s!

Technical Explanation

The standard circuit model of quantum computation specifies an initial state ∣0⟩⊗n∈H⊗n|0\rangle^{\otimes n} \in \mathcal{H}^{\otimes n}, followed by sequential application of single- and two-qubit unitary operators drawn from a universal gate set G\mathcal{G} (e.g. Clifford + TT), terminated by von Neumann projective measurements in the computational ZZ-basis.

📚 Key Terms

Ket (∣ψ⟩|\psi\rangle)

Simple: A column vector representing a quantum state.
Technical: A state vector in a complex vector space representing the state of a quantum system.

Bra (⟨ψ∣\langle\psi|)

Simple: The matching row vector with conjugate numbers.
Technical: The dual vector in the continuous dual space representing the Hermitian adjoint ⟨ψ∣=(∣ψ⟩)†\langle\psi| = (|\psi\rangle)^\dagger.

Universal Gate Set

Simple: A small toolkit of quantum gates that can build any possible quantum circuit.
Technical: A discrete set of unitary gates (e.g. {H, S, CNOT, T}) capable of approximating any arbitrary unitary transformation in U(2n)U(2^n) to arbitrary accuracy ϵ\epsilon.

Q-Sphere Lab: What is Quantum Computing? The Core Model

IBM Q-Sphere Model

Interactive 3D state vector exploration, unitary transformation gates, and Born rule collapse for Topic 5.4

Azimuth: 45°Elevation: 25°
+Z |0⟩-Z |1⟩+X |+⟩+Y |+i⟩01|ψ⟩
Q-Sphere Phase Color:
0 π/2 π 3π/2

Quantum Statevector

dim(H) = 2
|ψ⟩ = (1.000 + 0.000i)|0⟩
     + (0.000 + 0.000i)|1⟩
Polar Angle (θ):0.0° (0.000π rad)
Phase Angle (ϕ):0.0° (0.000π rad)

Born Rule Probabilities: P(x) = |⟨x|ψ⟩|²Σ P = 1.00

P(|0⟩) = |α|²100.0%
P(|1⟩) = |β|²0.0%
Quantum Measurement

Apply Single-Qubit Unitary Gates

Presets:
Continuous Polar Angle θ (0° = |0⟩, 180° = |1⟩):0.0°
Continuous Phase Angle ϕ (0° to 360°):0.0°
Recent Operations Log:
#1Initial state: |0⟩

📐 Mathematical Foundation

LaTeX KaTeX
∣ψ⟩=α∣0⟩+β∣1⟩=(αβ),∣α∣2+∣β∣2=1|\psi\rangle = \alpha |0\rangle + \beta |1\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}, \quad |\alpha|^2 + |\beta|^2 = 1

What does it mean?

General Single-Qubit State Vector: A qubit exists in a continuous linear combination of ground state ∣0⟩|0\rangle with weight α and excited state ∣1⟩|1\rangle with weight β. The squared magnitudes of these amplitudes dictate the exact measurement odds and must sum to 100%.

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
∣ψ⟩|\psi\rangleQuantum state vector (Ket-Psi)The total current state and recipe of the qubit
∣0⟩,∣1⟩|0\rangle, |1\rangleComputational basis statesThe two baseline states: ∣0⟩=[1,0]T|0\rangle = [1, 0]^T and ∣1⟩=[0,1]T|1\rangle = [0, 1]^T
α\alphaProbability amplitude for state ∣0⟩|0\rangleSquare root of the probability of measuring 0
β\betaProbability amplitude for state ∣1⟩|1\rangleSquare root of the probability of measuring 1
∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1Normalization constraintEnsures the sum of all physical outcomes equals 100% (1.0)

📊 Numerical Example

Evaluating a qubit prepared with α = √3 / 2 ≈ 0.866 and β = 1 / 2 = 0.5:

Step 1: Write State Vector: ∣ψ⟩|\psi\rangle = (√3/2)∣0⟩|0\rangle + (1/2)∣1⟩|1\rangle = [0.866, 0.5]^T Step 2: Calculate Chance of 0: P(0) = |α|^2 = (√3/2)^2 = 3/4 = 0.75 (75% probability) Step 3: Calculate Chance of 1: P(1) = |β|^2 = (1/2)^2 = 1/4 = 0.25 (25% probability) Step 4: Check Normalization: P(0) + P(1) = 0.75 + 0.25 = 1.00 (100% certainty that one outcome occurs) ✓

Result: The qubit has a 75% chance of collapsing to 0 and a 25% chance of collapsing to 1.

⚙️ How Does It Work?

1

State Prep

Reset all qubits to |0> state.

2

Gate Execution

Send precise microwave or laser pulses to rotate state vectors.

3

Readout

Couple qubits to readout resonators to measure collapse into classical bitstrings.

🌍 Where Is It Used?

Quantum Chemistry Simulation

Problem: Calculating ground-state energy of lithium hydride (LiH).

Solution: Variational Quantum Eigensolver (VQE) circuit evaluates molecular Hamiltonian on cloud QPUs.

🎯 Try It Yourself

In Dirac notation, what does |0> represent mathematically?

Interactive activity component

🐍 Python Hands-On: Creating and Simulating a Bell Entangled State in Qiskit

Construct the canonical Bell state (|00> + |11>)/sqrt(2) in Qiskit and simulate measurement correlations.

Open Colab

1Install Required Packages

For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:

Terminal / Notebook Install Commandbash
!pip install qiskit qiskit-aer
Packages:
qiskitqiskit-aer

2Import Libraries

Import Statementspython
1from qiskit import QuantumCircuit
2from qiskit.quantum_info import Statevector
3from qiskit_aer import AerSimulator

from qiskit import QuantumCircuit → Qiskit circuit class

from qiskit.quantum_info import Statevector → Simulate exact statevector

from qiskit_aer import AerSimulator → Shot-based simulator

3Demonstration Code & Logic

Python Execution Codepython
1# 1. Create a 2-qubit Bell State: (|00> + |11>)/sqrt(2)
2qc = QuantumCircuit(2, 2)
3qc.h(0) # Put qubit 0 into equal superposition
4qc.cx(0, 1) # Entangle qubit 1 with qubit 0
5print('Qiskit Bell State Circuit Diagram:')
6print(qc.draw('text'))
7
8# 2. Theoretical Statevector
9sv = Statevector.from_instruction(qc)
10print('\nStatevector Amplitudes:')
11for state, prob in sv.probabilities_dict().items():
12 print(f' |{state}> : Probability = {prob * 100:.1f}%')
13
14# 3. Measure on AerSimulator (1024 shots)
15qc.measure([0, 1], [0, 1])
16sim = AerSimulator()
17counts = sim.run(qc, shots=1024).result().get_counts()
18print('\nAerSimulator Measurement Results (1024 shots):')
19print(' ', counts)
Step-by-Step Code Breakdown:

# 1. Create a 2-qubit Bell State: (|00> + |11>)/sqrt(2)

Setup Bell circuit

qc = QuantumCircuit(2, 2)

2 qubits and 2 classical bits

qc.h(0) # Put qubit 0 into equal superposition

Create superposition on control

qc.cx(0, 1) # Entangle qubit 1 with qubit 0

CNOT entangler

print('Qiskit Bell State Circuit Diagram:')

Diagram label

print(qc.draw('text'))

Print text-based circuit

# 2. Theoretical Statevector

Inspect statevector

sv = Statevector.from_instruction(qc)

Compute statevector

print('\nStatevector Amplitudes:')

Label

for state, prob in sv.probabilities_dict().items():

Iterate probabilities

print(f' |{state}> : Probability = {prob * 100:.1f}%')

Show 50% for |00> and 50% for |11>

# 3. Measure on AerSimulator (1024 shots)

Simulate measurement

qc.measure([0, 1], [0, 1])

Add measurement gates

sim = AerSimulator()

Initialize simulator

counts = sim.run(qc, shots=1024).result().get_counts()

Run 1024 shots

print('\nAerSimulator Measurement Results (1024 shots):')

Display counts

print(' ', counts)

Outcome dictionary

📋 Complete Script (All-in-One)

Click "Copy for Colab", open Google Colab, paste into a single cell, and run.

Google Colab Notebook Scriptpython
1# =========================================================
2# Creating and Simulating a Bell Entangled State in Qiskit
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install qiskit qiskit-aer
8
9# Step 2: Import libraries
10from qiskit import QuantumCircuit
11from qiskit.quantum_info import Statevector
12from qiskit_aer import AerSimulator
13
14# Step 3: Run Demonstration
15# 1. Create a 2-qubit Bell State: (|00> + |11>)/sqrt(2)
16qc = QuantumCircuit(2, 2)
17qc.h(0) # Put qubit 0 into equal superposition
18qc.cx(0, 1) # Entangle qubit 1 with qubit 0
19print('Qiskit Bell State Circuit Diagram:')
20print(qc.draw('text'))
21
22# 2. Theoretical Statevector
23sv = Statevector.from_instruction(qc)
24print('\nStatevector Amplitudes:')
25for state, prob in sv.probabilities_dict().items():
26 print(f' |{state}> : Probability = {prob * 100:.1f}%')
27
28# 3. Measure on AerSimulator (1024 shots)
29qc.measure([0, 1], [0, 1])
30sim = AerSimulator()
31counts = sim.run(qc, shots=1024).result().get_counts()
32print('\nAerSimulator Measurement Results (1024 shots):')
33print(' ', counts)
⚡ How to Run in Google Colab (3 Quick Steps)
  1. Click "Copy for Google Colab" above.
  2. Click Open New Google Colab Notebook (opens in a new tab).
  3. Click on the first empty code cell, press Ctrl + V (or Cmd + V) to paste, then press Shift + Enter to execute!

🔄 Algorithmic Execution Flow

1
Prepare Superposition

Apply Hadamard gate to qubit 0.

→
2
Entangle Wires

Apply CNOT from qubit 0 to qubit 1, producing non-separable Bell state (|00> + |11>)/sqrt(2).

→
3
Measure Correlations

Execute 1024 shots on AerSimulator confirming perfect correlation: only '00' and '11' are observed.

📥 Input / Initial State
QuantumCircuit with H(0) and CNOT(0, 1).
📤 Expected Output
Statevector: |00>: 50.0%, |11>: 50.0%
AerSimulator counts (1024 shots): {'00': ~512, '11': ~512}
💡 What Does This Demonstration Show?

The two qubits are maximally entangled: measuring qubit 0 immediately determines the state of qubit 1 with 100% certainty, even before qubit 1 is measured.

Course Learning Resource • Slide Deck19 Slides

Comprehensive Foundation in Quantum Computing

From Probability and Complex Numbers to Qubits, Interference, Entanglement, and Multi-Qubit Systems by Dr. Syed Muzamil Basha.

Author: Dr. Syed Muzamil Basha• FDP Approved Curriculum
Open in New Tab
Available Slide Decks:

📝 Learning Check

Test your understanding with these questions. Remember, this is for learning, not examination!

Question 1: What is the sum of the squared magnitudes of the probability amplitudes (|alpha|^2 + |beta|^2) for any valid quantum state?