unitaria.ConstantIntegerMultiplication

class unitaria.ConstantIntegerMultiplication(bits: int, constant: int)[source]

Bases: ProxyNode

Node implementing the (wrapping) multiplication of an odd constant with an integer.

The constraint for the factor to be odd means the multiplication operation is invertible.

Parameters:
  • bits – The size of the quantum state. The addition is performed modulo 2 ** bits.

  • constant – The contant factor that should be multiplied. Has to be positive and odd.