qat.lang.AQASM.qftarith.add_const
- qat.lang.AQASM.qftarith.add_const(reg_size: int, constant: int)
Builds a circuit performing an addition by a constant:
\[|a\rangle \mapsto |a + C\rangle\]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 on which to perform the addition
constant (int) – the constant number to add