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

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
9 replies · 2K views
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
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   Reactions: 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?
 
BvU said:
Just a guess. :smile:
ok. thank you very much. i will look about it.
 
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.