qat.lang.AQASM.qftarith.mult_const
- qat.lang.AQASM.qftarith.mult_const(reg_size: int, reg_size_2: int, constant: int)
Builds a circuit performing a multiplication by a constant c. Only the content of the second register is changed:
\[|a\rangle|b\rangle \mapsto |a\rangle|b+ a\times c\rangle\]The multiplication is performed by a repeated additions of c into the second register. All additions, unless specified, are modulo \(2^n\) where n is the size of the register holding the result.
- Parameters
reg_size (int) – the number of qbits of the first register
reg_size_2 (int) – the number of qbits holding the final result (second register)
constant (int) – the constant number to multiply