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

In summary: It's easy to see that for diagonal matrices, the exponential is just the diagonal matrix with the exponents of the diagonal elements. So, since the log is the inverse of the exponential, it should be just the log of the diagonal elements.
  • #1
munirah
31
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
  • #2
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
  • #3
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
  • #4
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
 
  • #5
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
 
  • #6
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 ...
 
  • #7
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?
 
  • #8
Just a guess. :smile:
 
  • #9
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.
 

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

What is a Log2 towards zero?

A Log2 towards zero is a mathematical operation where the logarithm of a number is calculated with a base of 2 and rounded towards zero, meaning any decimal value is dropped and only the whole number is kept.

Why would someone want to do a Log2 towards zero?

A Log2 towards zero can be useful in situations where only the magnitude of a number is important and the exact value is not necessary. It can also be used to simplify calculations or data analysis.

How do I perform a Log2 towards zero?

To perform a Log2 towards zero, you can use a calculator or a programming language that has a built-in function for logarithms. Alternatively, you can use the formula log2(x) = log(x) / log(2), where x is the number you want to take the logarithm of.

What is the difference between a Log2 towards zero and a regular Log2?

The main difference between a Log2 towards zero and a regular Log2 is the rounding. A regular Log2 will round to the nearest whole number, while a Log2 towards zero will always round down to the nearest whole number.

Are there any practical applications of a Log2 towards zero?

Yes, there are several practical applications of a Log2 towards zero. For example, it can be used in data compression algorithms, signal processing, and in computer science for calculating the time complexity of algorithms.

Similar threads

Back
Top