Logm()
takes the matrix logarithm, and log2()
takes the logarithm base 2 of each element of a matrix.
I'm trying to compute the Von Neumann entropy, which involves the base 2 matrix logarithm. How do I do this?
Logm()
takes the matrix logarithm, and log2()
takes the logarithm base 2 of each element of a matrix.
I'm trying to compute the Von Neumann entropy, which involves the base 2 matrix logarithm. How do I do this?
If you define the matrix exponential "with base 2" as
B = expm(log(2) .* A)
, or if you analogously directly define the matrix logarithm "with base 2" via an eigendecomposition with the standard logarithm of base 2 applied eigenvalue-wise, then you can obtain a corresponding base 2 matrix logarithm by dividing bylog(2)
: