Complex matrix multiplication speed up my explicitly coding the

derivatives
This commit is contained in:
Fabian Joswig 2021-10-18 17:36:49 +01:00
parent b1e5777586
commit 877b1a4467
2 changed files with 15 additions and 1 deletions

View file

@ -204,6 +204,10 @@ def test_cobs():
assert (my_cobs - my_cobs.conjugate()).real.is_zero()
assert not (my_cobs - my_cobs.conjugate()).imag.is_zero()
np.abs(my_cobs)
assert (my_cobs * my_cobs / my_cobs - my_cobs).is_zero()
assert (my_cobs + my_cobs - 2 * my_cobs).is_zero()
fs = [[lambda x: x[0] + x[1], lambda x: x[1] + x[0]],
[lambda x: x[0] * x[1], lambda x: x[1] * x[0]]]
for other in [1, 1.1, (1.1-0.2j), pe.CObs(obs1), pe.CObs(obs1, obs2)]: