With reference to question on how to do quantum tomography on two qubits, I would like to ask you for help again. I tried to do the tomography on state
\begin{equation}\psi=\frac{1}{2}\begin{pmatrix}1 \\ i \\-1 \\-i\end{pmatrix}\end{equation}
This state can be prepared by application of $HX$ on first qubit and $SH$ on second one, both qubits were in state $|0\rangle$ at the beginning.
To do measurement of the state by the tomography, I evaluated eigenvectors of all observables present in two qubits tomogaphy and created measuring circuits.
Here is a list of observables, their eigenvectors and respective eigenvalues (please note that I omitted normalization in majority of cases because of simplicity):
- Observable $X\otimes X$:
- $-1$: $\begin{pmatrix}0 & 1 & -1 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}1 & 0 & 0 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 1 & 0\end{pmatrix}^T$
- Observable $Y\otimes Y$:
- $-1$: $\begin{pmatrix}0 & 1 & -1 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}1 & 0 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 1 & 0\end{pmatrix}^T$
- Observable $Z\otimes Z$:
- $-1$: $\begin{pmatrix}0 & 1 & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 1 & 0\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & 0\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 0 & 1\end{pmatrix}^T$
- Observable $X\otimes Y$:
- $-1$: $\begin{pmatrix}0 & 1 & i & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}1 & 0 & 0 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & -i & 0\end{pmatrix}^T$
- Observable $X\otimes Z$:
- $-1$: $\begin{pmatrix}1 & 0 & -1 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 1 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 0 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 1 & 0\end{pmatrix}^T$
- Observable $Y\otimes X$:
- $-1$: $\begin{pmatrix}0 & 1 & -i & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}1 & 0 & 0 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & i & 0\end{pmatrix}^T$
- Observable $Y\otimes Z$:
- $-1$: $\begin{pmatrix}1 & 0 & -i & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 1 & 0 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 0 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & i & 0\end{pmatrix}^T$
- Observable $Z\otimes X$:
- $-1$: $\begin{pmatrix}1 & -1 & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 1 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 1 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 1 & 0 & 0\end{pmatrix}^T$
- Observable $Z\otimes Y$:
- $-1$: $\begin{pmatrix}1 & -i & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 1 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 1 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & i & 0 & 0\end{pmatrix}^T$
- Observable $I\otimes X$:
- $-1$: $\begin{pmatrix}1 & -1 & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 1 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 1 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 1 & 0 & 0\end{pmatrix}^T$
- Observable $I\otimes Y$:
- $-1$: $\begin{pmatrix}1 & -i & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 1 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 1 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & i & 0 & 0\end{pmatrix}^T$
- Observable $I\otimes Z$:
- $-1$: $\begin{pmatrix}0 & 1 & 0 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 1 & 0\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 0 & 0 & 1\end{pmatrix}^T$
- Observable $X\otimes I$:
- $-1$: $\begin{pmatrix}1 & 0 & -1 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 1 & 0 & -1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 1 & 0\end{pmatrix}^T$
- Observable $Y\otimes I$:
- $-1$: $\begin{pmatrix}1 & 0 & -i & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 1 & 0 & -i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 0 & i\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & i & 0\end{pmatrix}^T$
- Observable $Z\otimes I$:
- $-1$: $\begin{pmatrix}0 & 0 & 1 & 0\end{pmatrix}^T$
- $-1$: $\begin{pmatrix}0 & 0 & 0 & 1\end{pmatrix}^T$
- $1$: $\begin{pmatrix}1 & 0 & 0 & 0\end{pmatrix}^T$
- $1$: $\begin{pmatrix}0 & 1 & 0 & 0\end{pmatrix}^T$
Then I realized that basis generated by eigenvectors of observables are repeating (note that I "invented" names for some basis for easier referencing further):
- z-basis: $Z\otimes Z$, $I\otimes Z$ and $Z\otimes I$
- Bell basis: $X\otimes X$ and $Y\otimes Y$
- "Imaginary" Bell basis: $X\otimes Y$ and $Y\otimes X$
- "A" basis: $X\otimes Z$ and $X\otimes I$
- "B" basis: $Y\otimes Z$ and $Y\otimes I$
- "C" basis: $Z\otimes X$ and $I\otimes X$
- "D" basis: $Z\otimes Y$ and $I\otimes Y$
After that I created for each basis a circuit for measuring in the basis, or in other words the circuit for converting basis states to z-basis ones. These circuits are here:
Having this I created a map between basis states and z-basis and assigned each state in z-basis either value -1 or 1 in the following way
\begin{matrix} \mathrm{observable} & -1 & 1\\ X\otimes X & |11\rangle, |10\rangle & |00\rangle, |01\rangle\\ Y\otimes Y & |11\rangle, |00\rangle & |10\rangle, |01\rangle\\ Z\otimes Z & |01\rangle, |10\rangle & |00\rangle, |11\rangle\\ X\otimes Y & |01\rangle, |10\rangle & |00\rangle, |11\rangle\\ X\otimes Z & |10\rangle, |11\rangle & |01\rangle, |00\rangle\\ Y\otimes X & |11\rangle, |10\rangle & |00\rangle, |01\rangle\\ Y\otimes Z & |10\rangle, |11\rangle & |01\rangle, |00\rangle\\ Z\otimes X & |10\rangle, |11\rangle & |01\rangle, |00\rangle\\ Z\otimes Y & |10\rangle, |11\rangle & |01\rangle, |00\rangle\\ I\otimes X & |10\rangle, |01\rangle & |11\rangle, |10\rangle\\ I\otimes Y & |10\rangle, |01\rangle & |11\rangle, |00\rangle\\ I\otimes Z & |01\rangle, |11\rangle & |10\rangle, |00\rangle\\ X\otimes I & |10\rangle, |01\rangle & |00\rangle, |11\rangle\\ Y\otimes I & |10\rangle, |01\rangle & |11\rangle, |00\rangle\\ Z\otimes I & |10\rangle, |11\rangle & |00\rangle, |01\rangle\\ \end{matrix}
When I calculated a density operator estimation and did spectral decomposition of that I really obtained state $\psi$ among eigenstates and its respective eigenvalue was the highest one. However, there was also one negative eigenvalue. So, as the density operator is a positive one, it seems that there is some mistake in my calculation.
To sum it all up:
- I calculated eigenvalues and eigenvectors of all observables
- I created circuits for measuring a quantum state in bases given by eigenvectors obtained in the first step
- I assigned each eigenvector its "mirror" in z-basis after measuring by circuits from step 2
- I prepared state $\psi$
- I did a measurement of state $\psi$ in all bases obtained in step 1 with help of circuits from step 2
- Based on measured probabilities, I calculated estimation of $\mathrm{Tr}(A\rho)$, where $A$ is an observable
- Then, I calculated estimation of density operator $\rho$
- Finnaly, I found eigenvalues and eigenvector of $\rho$. State $\psi$ should be one of eigenvectors, its respective eigenvalue should be close to 1 as pure state $\psi$ was measured.
I did all calculations in MatLab and I used matrix representation of quantum gates to simulate both state preparation and measurement in different bases, so the calculations are exact and there is no noise.
My question: is my above described approach right?
I really appreciate any help. Thank you in advance.