You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the product $(A_1 \otimes B_1) \cdot \dots\cdot (A_n \otimes B_n)$ is falsely computed as $(A_n\cdot\dots\cdot A_1) \otimes (B_n\cdot\dots\cdot B_1)$ and not like $(A_1\cdot\dots\cdot A_n) \otimes (B_1\cdot\dots\cdot B_n)$ (the order of maps reversed)
One can check the following minimal working example:
using LinearAlgebra
using LinearMaps
A = [0 1; 0 0]
B = [0 0; 1 0]
J = LinearMap(I, 1)
Matrix(kron(J, A*B)) == Matrix(kron(J, A) * kron(J, B)) # should be true
Applying reverse() on the tuples before the product should do the trick
It seems that the product$(A_1 \otimes B_1) \cdot \dots\cdot (A_n \otimes B_n)$ is falsely computed as
$(A_n\cdot\dots\cdot A_1) \otimes (B_n\cdot\dots\cdot B_1)$ and not like $(A_1\cdot\dots\cdot A_n) \otimes (B_1\cdot\dots\cdot B_n)$ (the order of maps reversed)
One can check the following minimal working example:
Applying
reverse()
on the tuples before the product should do the trickLinearMaps.jl/src/kronecker.jl
Line 275 in ee91b4f
The text was updated successfully, but these errors were encountered: