Skip to content

Chapter 4: New Quantum

Lecture 1: Fundamentals of Quantum States and Measurements

Date: February 24, 2025


Introduction

Quantum computing relies on quantum mechanics principles to manipulate information. This lecture introduces:

  • Basis and Orthonormal Basis
  • Bra-Ket Notation (Dirac Notation)
  • Quantum Measurement
  • Representing a state in different basis sets

Basis and Orthonormal Basis

A basis is a set of vectors that spans a vector space. Any vector in that space can be expressed as a linear combination of basis vectors.

Example in \(\mathbb{R}^2\) (standard basis):

\[ e_1 = \begin{bmatrix}1 \\ 0\end{bmatrix}, \quad e_2 = \begin{bmatrix}0 \\ 1\end{bmatrix} \]

Any vector \(v \in \mathbb{R}^2\) can be written as:

\[ v = a e_1 + b e_2 \]

A basis is orthonormal if:

  1. \(\langle e_i | e_j \rangle = 0\) for \(i \ne j\)
  2. \(\langle e_i | e_i \rangle = 1\)

Computational basis for qubits:

\[ |0\rangle = \begin{bmatrix}1 \\ 0\end{bmatrix}, \quad |1\rangle = \begin{bmatrix}0 \\ 1\end{bmatrix} \]

Bra-Ket Notation (Dirac Notation)

  • A ket \(|\psi\rangle\) is a column vector in Hilbert space
  • A bra \(\langle \psi|\) is the conjugate transpose

Example:

\[ |\psi\rangle = \begin{bmatrix}a \\ b\end{bmatrix}, \quad \langle \psi| = \begin{bmatrix}a^* & b^*\end{bmatrix} \]

Inner product: $$ \langle \phi | \psi \rangle = \sum_i \phi_i^* \psi_i $$

Outer product: $$ |\psi\rangle \langle \phi| $$


Quantum Measurement

A qubit state can be written as:

\[ |\psi\rangle = \alpha |0\rangle + \beta |1\rangle \]

Where \(\alpha, \beta\) are complex numbers and:

\[ |\alpha|^2 + |\beta|^2 = 1 \]

Measurement outcomes:

  • \(|0\rangle\) occurs with probability \(|\alpha|^2\)
  • \(|1\rangle\) occurs with probability \(|\beta|^2\)

Example:

\[ |\psi\rangle = \frac{1}{\sqrt{2}} |0\rangle + \frac{1}{\sqrt{2}} |1\rangle \]

This yields 50% probability of \(|0\rangle\) or \(|1\rangle\).


Representing a State in Different Basis Sets

Hadamard Basis:

\[ |+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}, \quad |-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}} \]

Eigenbasis of Pauli-X

\[ X = \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix} \]

Eigenvectors:

\[ |+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}, \quad |-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}} \]

Python and Qiskit Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from qiskit import QuantumCircuit, Aer, execute
from qiskit.visualization import plot_bloch_vector
import numpy as np

# Define a quantum circuit with one qubit
qc = QuantumCircuit(1)
qc.h(0)  # Apply Hadamard gate
qc.measure_all()

# Simulate the circuit
simulator = Aer.get_backend('aer_simulator')
result = execute(qc, simulator, shots=1000).result()
counts = result.get_counts()
print("Measurement Results:", counts)

# Plot the Bloch vector of |+> state
def plot_state():
    plot_bloch_vector([1/np.sqrt(2), 0, 1/np.sqrt(2)])

plot_state()

Qiskit Example

```python from qiskit import QuantumCircuit

qc = QuantumCircuit(1) qc.h(0) qc.measure_all() qc.draw()