Matrix Logarithm in Base 2

555 views Asked by At

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?

1

There are 1 answers

0
Thales On BEST ANSWER

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 by log(2):

A = logm(B) ./ log(2)