From glancing at the source code, the implementation of lyap
seems to rely on some LAPACK
routines which probably expect strided matrices: julia/dense.jl at 69ac379c9d38f758b32e769711c8b1ac90afa25d · JuliaLang/julia · GitHub
You should be able to do lyap(copy(transpose(A)), Q)
to make this work in your case.