Quantum walks¶
oracq.algorithms.common.walks
Discrete-time coined quantum walk.
- oracq.algorithms.common.walks.cycle_walk(width, *, steps=1)[source]¶
Generate a Hadamard coined walk on a periodic lattice.
- Parameters:
width – Position bit width; the period length is 2**width.
steps – Nonnegative number of steps.
- Returns:
Exposes position and a one-bit coin. Each step updates the coin first, then moves by +1 or -1 according to the 0/1 value.
- Return type:
The input state is prepared by the caller; the zero input corresponds to starting at position zero with coin zero.