CirQuS-UTS / QuanGuru

QuanGuru (pronounced Kangaroo) is a Python library for numerical modelling of quantum systems. It is still under-development, and it consists of tools for numerical simulations of Quantum systems.
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

Sigma M and Sigma P definitions are incorrect #249

Closed adriendilonardo closed 2 weeks ago

adriendilonardo commented 8 months ago

Given Quanguru defines

$$ \ket{0} = \left(\begin{array}{cc} 1\ 0 \end{array}\right) $$

$$ \ket{1} = \left(\begin{array}{cc} 0\ 1 \end{array}\right) $$

Then we should have

$$ \sigma_- = \ket{0}\bra{1} = \left(\begin{array}{cc} 1\ 0 \end{array}\right) \left(\begin{array}{cc} 0 & 1 \end{array}\right) = \left(\begin{array}{cc} 0 & 1\ 0 & 0 \end{array}\right) $$

$$ \sigma_+ = \ket{1}\bra{0} = \left(\begin{array}{cc} 0\ 1 \end{array}\right) \left(\begin{array}{cc} 1 & 0 \end{array}\right) = \left(\begin{array}{cc} 0 & 0\ 1 & 0 \end{array}\right) $$

But instead, we have

$$ \sigma_- = \left(\begin{array}{cc} 0 & 0\ 1 & 0 \end{array}\right) $$

$$ \sigma_+ = \left(\begin{array}{cc} 0 & 1\ 0 & 0 \end{array}\right) $$

These definitions need to be reversed

cahitkargi commented 8 months ago

I don't agree for several reasons: (i) the definitions in the Quantum Toolbox are the same as in qutip and all the other toolboxes that I have ever seen and (ii) this is because we use physics definitions where $\ket{0} = \ket{e}$ (e for excited), (iii) see equation 7.68 in Neilsen and Chuang for the definiton of sigma P and M (which gives us exactly the same definition as it is currently in the quantum toolbox, see the docstrings as well), and (iv) sigma P (and sigma M) is a special case of J_P (and J_M) with j=0.5.

In short, definitions are correct and consistent will the literature (including Neilsen and Chuang eq 7.68), it is just that the computational basis state $\ket{0}$ should be interpreted as the exited state.