qat.core.variables.real

qat.core.variables.real(number)

Real part of a (complex) number

from qat.core.variables import real

my_num = 2j + 3
print(real(my_num))
3.0
Parameters

number (Variable or ArithExpression or number) – possibly complex number

Returns

real part

Return type

ArithExpression or number