qit.gate.mod_inc

qit.gate.mod_inc(x, dim, N=None)

Modular incrementation gate.

Parameters
  • x (int) – increment

  • dim (tuple[int]) – register dimensions

  • N (int) – cutoff dimension, default is prod(dim)

Returns

modular incrementation gate U

Return type

Lmap

U:|y|y+x(modN)

If N is given, we must have N <= prod(dim), and U will act trivially on computational states >= N.