In [14]:
import numpy as np
# This test delivers the results for the complex device
# multiplication
c0 = 2.0
inc = 1
z1 = c0 + 1j * c0
c0 += 1.0
z2 = c0 + 1j * c0
c0 += 1.0
z3 = c0 + 1j * c0
c0 += 1.0
z4 = c0 + 1j * c0
c0 += 1.0
z5 = c0 + 1j * c0
c0 += 1.0
z6 = c0 + 1j * c0
c0 += 1.0
h1 = 1.0 + 1j * 0
h2 = 1.0 + 1j * 0
pot = 1.0
z1 = 2.0 + 1j * 2.0
z2 = z1 + 1.0 + 1j * 1.0
z3 = 4.0 + 1j * 4.0
z5 = h1 * ( z1 + z2 - 2 * z3)
print(z5)
z6 = pot * z3
print(z6)
z5 = z5 + z6
print(z5)
z5 *= 1j
print(z5)
z5 += z3
print(z5)
In [17]:
# Test for the transform diag function
z1 = 1.0 + 1j * 2.0
z2 = 2.0 + 1J * 3.0
z3 = 7.0 + 1J * 8.0
c = 3.0
x = 0
s1 = 1.0
s2 = 3.0
c = 5.0
t1 = 1.0 + 1j * 2.0
s2 = -2.0 * c + 1.0
s2 = t1 * s2
s2 = s2*1j
d = s1 + s2
print(d)
In [ ]: