以2为底的矩阵对数 [英] Matrix Logarithm in Base 2
问题描述
Logm()
取矩阵的对数,而log2()
取矩阵的每个元素的对数以2为底.
Logm()
takes the matrix logarithm, and log2()
takes the logarithm base 2 of each element of a matrix.
我正在尝试计算冯·诺依曼熵,它涉及以2为底的矩阵对数.我该怎么做?
I'm trying to compute the Von Neumann entropy, which involves the base 2 matrix logarithm. How do I do this?
推荐答案
如果将矩阵指数以2为底"定义为B = expm(log(2) .* A)
,或者类似地通过特征分解直接定义矩阵对数以2为底"在以特征值方式应用以2为底的标准对数的情况下,可以通过除以log(2)
来获得对应的以2为底的矩阵对数:
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)
这篇关于以2为底的矩阵对数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!