Mathematica has a way of integrating with Julia, and automatically convert Julia outputs into Mathematica objects (Julia seems to have nice support for low-rank approximation). What is the best way to use Mathematica matrices as Julia inputs?
For instance I can get get trace of Cholesky factor as follows
FindExternalEvaluators["Julia"]
jj[cmd_] := ExternalEvaluate["Julia", cmd];
jj["using LinearAlgebra;A=[2 1;1 2];tr(cholesky(A).U)"]
But a more useful scenario would be to try it on a A
like below:
d = 4000;
A = RandomReal[{-1, 1}, {d, d}];
A = A + Transpose[A] + 2. Sqrt[d] IdentityMatrix[d];
Tr@CholeskyDecomposition@A