qat.lang.AQASM.qint.QArithExp

class qat.lang.AQASM.qint.QArithExp(scope, operator, operands=None, reverse_bit_order=True)

Class describing arithmetic expressions whose operands contain quantum integers.

This class is not designed to be instantiated by hand, but rather built via the addition, substraction, and multiplication of quantum integers with other quantum integers or python integers.

from qat.lang.AQASM import QRoutine, QInt

rout = QRoutine()
qint = rout.new_wires(10, QInt)
print(type(qint + 33))
<class 'qat.lang.AQASM.qint.QArithExp'>
evaluate(nbqbit=None)

Builds a piece of circuit evaluating the arithmetic expression.

Parameters

nbqbits (optional, int) – the number of qbits of the output register.