Skip to main content

Module walk

Module walk 

Source
Expand description

The walk operator U = V(J) M C and its application on the CPU, in f64 or f32.

Structs§

SpinWalk
A walker on a graph coupled to one spin per edge (K. Sellapillay and A. D. Verga, Phys. Rev. E 103, 032123 (2021)). One step is U = V(J) M C:

Constants§

PLUS
Spin along +x, |+⟩ = (|0⟩ + |1⟩)/√2.
UP
Spin up |0⟩.

Traits§

Real
The real type of a state on the CPU: f64, or f32 for half the memory traffic and twice the SIMD width, at about 10⁻⁷ of relative error per step (see crate::gpu for checked runs in reduced precision).

Functions§

fourier
Fourier coin e^{2iπ jk/d} / √d.
grover
Grover coin 2/d 𝟙 − I (𝟙 the matrix of ones).
rotation
Coin R(θ) = [[cos θ, −sin θ], [sin θ, cos θ]] on the two colors of a node.
to_double
A state converted to f64.
to_single
A state converted to f32.