Trace: hottblockp2

Post 2 — Unitary Evolutions as Paths on the Sphere

This entry introduces how unitary operations generate continuous paths on the Bloch sphere with the accompanying Python code.


1. SU(2) rotations

A unitary rotation about a unit axis $\mathbf{n}$ through an angle $\theta$ is given by

\[ U(\theta) = \cos\left(\tfrac{\theta}{2}\right) I - i \sin\left(\tfrac{\theta}{2}\right)(\mathbf{n} \cdot \boldsymbol{\sigma}). \]

Here:

* $I$ is the 2×2 identity matrix, * $\boldsymbol{\sigma} = (\sigma_x, \sigma_y, \sigma_z)$ are the Pauli matrices, * $\mathbf{n}$ is a normalized real vector in $\mathbb{R}^3$.

This construction ensures $U(\theta) \in SU(2)$, corresponding to a rotation in physical space.


2. Paths on the Bloch sphere

Given an initial qubit state $|\psi_0\rangle$, we define a continuous path

\[ |\psi(t)\rangle = U(t\theta) |\psi_0\rangle, \quad t \in [0,1]. \]

The corresponding Bloch vectors trace a curve on the unit sphere $S^2$.


3. Using the code

The function unitary_path constructs such paths. Example: rotation about the z-axis starting from the superposition state $|+\rangle$.

import numpy as np
import hottbloch as h
 
# Initial state |+> = (|0> + |1>)/√2
ket_plus = (np.array([1,0]) + np.array([0,1])) / np.sqrt(2)
 
# Generate path: rotation around z-axis by 2π
states, bloch_points = h.unitary_path(
    psi=ket_plus,
    axis=np.array([0,0,1]),
    theta=2*np.pi,
    num=200
)
 
print("First point on path:", bloch_points[0])
print("Last point on path:", bloch_points[-1])

The start and end points coincide, completing a closed path.


4. Visualization

To plot this trajectory on the Bloch sphere:

python hottbloch.py --out ./hott_outputs --loop equator --theta 6.283185

This produces a figure of the equatorial loop traced by $|+\rangle$ under full rotation about the z-axis.


Conclusion

Unitary operations act as rotations of qubit states, and their action becomes visible as smooth curves on the Bloch sphere. This sets the stage for the study of closed loops and the Berry phase in the next post.

projects/quantum/hottblockp2.txt · Last modified: 2025/09/23 12:20