qat.lang.AQASM.arithmetic.mult_const_mod
- qat.lang.AQASM.arithmetic.mult_const_mod(reg_size: int, acc_size: int, constant: int, modulus: int)
Generates a
QRoutine
performing the following operation:\[| a \rangle | b \rangle \mapsto |a \rangle | b + a \times \textrm{constant} \mod \textrm{modulus} \rangle\]- Parameters
reg_size (int) – the register size
acc_size (int) – the accumulator size
constant (int) – the constant to add
modulus (int) – the modulus value
Warning
Some additional qubits might be allocated by sub-routines inside this routine.
This routine calls:
qat.lang.AQASM.arithmetic.add_const_mod()
with arguments (acc_size, _, _)