Measurement and Quantum States

What is Measurement in Quantum Computing?

Measurement in quantum computing is the process of converting a quantum state into a classical bit. It’s how we extract usable information from a quantum system.

  • Before measurement: A qubit can be in a superposition of |0⟩ and |1⟩.
  • After measurement: The qubit collapses to either |0⟩ or |1⟩, based on probabilities determined by the amplitudes.

Probabilistic Outcome:

  • If a qubit is in state \(|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\), then:
  • Probability of 0: \(|\alpha|^2\)
  • Probability of 1: \(|\beta|^2\)

Key Insight: The act of measuring disturbs the quantum system. Unlike classical systems, you can’t look without changing the outcome.


Quantum States and Bra-Ket Notation

Quantum states are represented using the Dirac notation:

  • \(|0\rangle\) and \(|1\rangle\) are basis states.
  • Superpositions like \(\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)\) describe a qubit equally likely to be 0 or 1.

Bloch Sphere Representation

  • Any single qubit state can be visualized on the Bloch Sphere using angles θ and φ.
  • This helps us understand rotations and transformations via quantum gates.

Interactive Visualization: View or manipulate qubit state vectors on the Bloch Sphere


Code Example: Measuring a Qubit

from qiskit import QuantumCircuit, Aer, execute

qc = QuantumCircuit(1, 1)
qc.h(0)  # Put qubit into superposition
qc.measure(0, 0)  # Measure qubit

simulator = Aer.get_backend('qasm_simulator')
result = execute(qc, simulator, shots=1000).result()
counts = result.get_counts()
print(counts)  # Should print something like {'0': 500, '1': 500}

This simulates 1000 measurements of a qubit in a superposition and prints how often each classical result occurs.


Multi-Qubit Measurement

  • Each qubit in a multi-qubit system can be measured independently.
  • Entangled states require careful interpretation: measurement of one qubit affects others.

Example: Measuring a Bell state results in correlated outputs:

  • Both qubits yield 00 or 11, never 01 or 10.
from qiskit import QuantumCircuit, Aer, execute

qc = QuantumCircuit(2, 2)
qc.h(0)      # Superposition on qubit 0
qc.cx(0, 1)  # Entangle with qubit 1
qc.measure([0,1], [0,1])

simulator = Aer.get_backend('qasm_simulator')
result = execute(qc, simulator, shots=1024).result()
print(result.get_counts())  # Expect mostly '00' and '11'

Quantum AI Relevance

  • Output Interpretation: Measurements yield classical labels from quantum classifiers.
  • Training Signals: Gradient-based optimization relies on statistical measurement outcomes.
  • Hybrid Systems: Final predictions in hybrid models are extracted via quantum measurement.

Noise and Error Mitigation: Measurement results can be noisy due to quantum decoherence and gate errors. Mitigating this noise is a key part of real-world quantum AI.


Summary

Measurement is a critical step in every quantum computation. It collapses the probabilistic nature of quantum systems into deterministic outputs, enabling interaction with classical algorithms and evaluation of model performance.

It bridges the quantum and classical worlds, playing a pivotal role in hybrid models, learning feedback loops, and real-world applications.


👉 Continue to: Quantum Speedup and Complexity