arXiv:2507.07432 Appendix D.2 "Bloch Walk Process"
- α = 1.0
- β = √51 ≈ 7.141428
- 4 symbols: {0, 1, 2, 3}
- Single qubit quantum memory (2-dimensional Hilbert space)
- No finite classical HMM can generate this process
We implement the Bloch Walk using the fundamental Kraus operator formulation rather than the derived GHMM representation. This is more direct and avoids issues with the GHMM formulation in the paper.
The four Kraus operators K₀, K₁, K₂, K₃ are 2×2 matrices:
K₀ = γ * [[α+β, 0 ],
[ 0, α-β]]
K₁ = γ * [[α-β, 0 ],
[ 0, α+β]]
K₂ = γ * [[α, β],
[β, α]]
K₃ = γ * [[α, -β],
[-β, α]]
Paper's value: γ = 1/(2α² + β²) = 1/53 ≈ 0.0189
Correct value for Kraus operators: γ = 1/√(2(α+β)² + 2(α-β)²) = 1/√208 ≈ 0.0693
The Kraus operators must satisfy the completeness relation:
Σₙ Kₙ† Kₙ = I
With the paper's γ value, this sum equals 0.074·I, not I. The correct normalization is γ = 1/√208.
The belief states are represented as Bloch vectors on the Bloch sphere:
- b_x, b_y, b_z ∈ [-1, 1]
- √(b_x² + b_y² + b_z²) ≤ 1 (equality for pure states)
- Extracted from density matrix ρ via: b_i = tr(ρ σ_i)
Due to the Kraus operators' structure:
- b_y ≈ 0 (beliefs live in the x-z plane, a 2D slice of the Bloch ball)
- Symbol 0 → pushes toward +|z⟩ (north pole)
- Symbol 1 → pushes toward -|z⟩ (south pole)
- Symbol 2 → pushes toward +|x⟩ (positive x-axis)
- Symbol 3 → pushes toward -|x⟩ (negative x-axis)
- Initial state: Fully mixed ρ = I/2 (center of Bloch ball)
- For each timestep:
- Compute probabilities: p_n = tr(Kₙ ρ Kₙ†)
- Sample outcome n ∈ {0,1,2,3} with probabilities (p₀, p₁, p₂, p₃)
- Update density matrix: ρ ← Kₙ ρ Kₙ† / tr(Kₙ ρ Kₙ†)
- Convert to Bloch vector for belief state
make_blochwalk_hmm(): Returns dummy HMM structure (for interface compatibility)_make_blochwalk_kraus_operators(): Creates the 4 Kraus operators with correct normalization_density_matrix_to_bloch(): Converts density matrix to Bloch vector_sample_blochwalk_ghmm(): Samples sequences using Kraus operators_filter_blochwalk_beliefs(): Computes belief states (Bloch vectors) via quantum filteringgenerate_blochwalk_sequence(): Main interface function
generate_blochwalk_sequence(length, rng) returns:
{
"tokens": np.ndarray, # shape (L,), dtype int64, values in {0,1,2,3}
"beliefs": np.ndarray, # shape (L, 3), dtype float64, Bloch vectors [b_x, b_y, b_z]
}Test results confirm:
- ✅ Kraus operators satisfy Σₙ Kₙ† Kₙ = I
- ✅ Bloch vectors stay in x-z plane (|b_y| < 10⁻⁶)
- ✅ Bloch vector radius ≤ 1 for all belief states
- ✅ Tokens are valid integers in {0, 1, 2, 3}
- ✅ Belief dynamics match expected push directions
To train a neural network on Bloch Walk:
- Use
generate_blochwalk_sequence()to create training data - Set
vocab_size=4in training config - The belief states will be 3D Bloch vectors (actually 2D in x-z plane)
- Neural network should learn to linearly represent these Bloch vectors in its activations