qat.core.variables.imag

qat.core.variables.imag(number)

Imaginary part of a (complex) number

from qat.core.variables import imag

my_num = 2j + 3
print(imag(my_num))
2.0
Parameters

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

Returns

imaginary part

Return type

ArithExpression or number