How can I do when I make a Log2 towards zero?

Click For Summary
The discussion focuses on calculating the von Neumann entropy for a qubit represented by the density matrix ρ={{0.5,0},{0,0.5}} using Mathematica. The main issue arises when attempting to compute log2 of the matrix, resulting in undefined values like ∞. Participants suggest that instead of taking the logarithm of the entire matrix, one should consider the logarithm of the diagonal elements after diagonalization. A workaround proposed includes setting a lower limit for the logarithm, such as 2^{-20}. The conversation emphasizes the importance of correctly applying matrix logarithm principles in quantum mechanics calculations.
munirah
Messages
28
Reaction score
0
Good day,

Homework Statement



I want to make a measurement on qubit by using formula von Neumann entropy using Mathematica given as below;

Homework Equations



(ρ)=−Tr(ρlog2ρ)

The Attempt at a Solution



The
ρ={{0.5,0},{0,0.5}}My problem is, when I make the

log2{{0.5,0},{0,0.5}}
I get the output

{{−1,∞},{∞,−1}}

How can I deal with this value in my measurement since it cannot be calculated?

Thank you.
 
Physics news on Phys.org
Looks like you take the logarithm of each entry in the matrix. I don't think that is what you want.
Matrix log?
 
  • Like
Likes munirah
Can you put in some lower limit, like ##2^{-20} ## ?
[edit] Ha ! o:)

[edit2] Isn't it so that you have already diagonalized ##\rho## so you can use the ## S = - \sum \eta\ln\eta ## here ?
 
Last edited:
  • Like
Likes munirah
mfb said:
Looks like you take the logarithm of each entry in the matrix. I don't think that is what you want.
Matrix log?
I'm not sure about the matrix log.I think it different
 
BvU said:
Can you put in some lower limit, like ##2^{-20} ## ?
[edit] Ha ! o:)

[edit2] Isn't it so that you have already diagonalized ##\rho## so you can use the ## S = - \sum \eta\ln\eta ## here ?
thank you for the input. I will search it and learn
 
munirah said:
I'm not sure about the matrix log.I think it different
My guess is the matrix log coincides with taking log of the diagonal elements once the matrix is diagonalized ...
 
BvU said:
My guess is the matrix log coincides with taking log of the diagonal elements once the matrix is diagonalized ...
it means only for diagonal matrices?
 
Just a guess. :smile:
 
BvU said:
Just a guess. :smile:
ok. thank you very much. i will look about it.
 
  • #10
BvU said:
My guess is the matrix log coincides with taking log of the diagonal elements once the matrix is diagonalized ...
Sure. This should be easy to see if you take the matrix exponential again.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
8K