量子行走

oracq.algorithms.common.walks

Discrete-time coined quantum walk.

oracq.algorithms.common.walks.cycle_walk(width, *, steps=1)[源代码]

Generate a Hadamard coined walk on a periodic lattice.

参数:
  • width -- Position bit width; the period length is 2**width.

  • steps -- Nonnegative number of steps.

返回:

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.

返回类型:

Operation

The input state is prepared by the caller; the zero input corresponds to starting at position zero with coin zero.