In the review of PR #159, there were concerns about efficiency of the forloops. In the future, it will be good to convert this to matrix multiplication. For the pairwise case, it will be r1 = A.dot(np.exp(1j*theta)). For the triangle case, it will be r2 = np.exp(-1j*theta).dot(B).dot(np.exp(2j*theta)). It takes a long time to create these A and B matrices. So, if we find a faster way of creating these, the code could be faster.
In the review of PR #159, there were concerns about efficiency of the forloops. In the future, it will be good to convert this to matrix multiplication. For the pairwise case, it will be
r1 = A.dot(np.exp(1j*theta))
. For the triangle case, it will ber2 = np.exp(-1j*theta).dot(B).dot(np.exp(2j*theta))
. It takes a long time to create these A and B matrices. So, if we find a faster way of creating these, the code could be faster.