{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Exercise 4\n",
    "\n",
    "\n",
    "## 1. Alternative Pauli Basis States\n",
    "\n",
    "There are an infinite number of possible single qubit states.  From a theoretical stand-point,  the  one  we  choose  to  label $| 0 \\rangle$ is  arbitrary.   So  let’s  consider  the  following alternative.\n",
    "\n",
    "$$\n",
    "| \\bar 0 \\rangle = \\cos(\\theta) \\, | 0 \\rangle + \\sin(\\theta) \\, | 1 \\rangle.\n",
    "$$\n",
    "\n",
    "For this $| \\bar 0 \\rangle$:\n",
    "\n",
    "(a) Find a corresponding orthogonal state $| \\bar 1 \\rangle$;\n",
    "\n",
    "(b)  For this basis $| \\bar 0 \\rangle$, $| \\bar 1 \\rangle$, find mutually unbiased basis states $| \\bar + \\rangle$ and $| \\bar - \\rangle$;\n",
    "\n",
    "## 2. Properties of the Pauli Matrices\n",
    "\n",
    "Note: Sometimes the Pauli matrices are written as $X$, $Y$ and $Z$, and sometimes as $\\sigma_x$, $\\sigma_y$ and $\\sigma_z$. For  the  most  part,  the  convention  is  an  arbitrary  choice. Once  you’ve used them enough,  you’ll hardly notice the difference (to the great annoyance of your students!).\n",
    "\n",
    "The Pauli matrices are defined\n",
    "\n",
    "$$\n",
    "X = \n",
    "\\begin{pmatrix} \n",
    "0 & 1 \\\\\n",
    "1 & 0 \\\\\n",
    "\\end{pmatrix}, \\,\\,\n",
    "Y = \n",
    "\\begin{pmatrix} \n",
    "0 & -i \\\\\n",
    "i & 0 \\\\\n",
    "\\end{pmatrix}, \\,\\,\n",
    "Z = \n",
    "\\begin{pmatrix} \n",
    "1 & 0 \\\\\n",
    "0 & -1 \\\\\n",
    "\\end{pmatrix}, \\,\\,\n",
    "$$\n",
    "\n",
    "(a) Show that each squares to the identity matrix.\n",
    "\n",
    "$$\n",
    "I = \n",
    "\\begin{pmatrix} \n",
    "1 & 0 \\\\\n",
    "0 & 1 \\\\\n",
    "\\end{pmatrix}\n",
    "$$\n",
    "\n",
    "(b) Show that $P_1 P_2 = - P_2 P_1$ for any pair of Paulis $P_1$ and $P_2$.\n",
    "\n",
    "(c) Show that $P_1 P_2 \\sim P_3$ for any pair of Paulis $P_1$ and $P_2$, where $P_3$ is the remaining Pauli.\n",
    "\n",
    "(d) Find the eigenvectors and eigenvalues of each Pauli.\n",
    "\n",
    "\n",
    "## 3. The Hadamard\n",
    "\n",
    "The Hadamard matrix can be expressed\n",
    "\n",
    "$$\n",
    "H = \\frac{1}{\\sqrt{2}}\n",
    "\\begin{pmatrix} \n",
    "1 & 1 \\\\\n",
    "1 & -1 \\\\\n",
    "\\end{pmatrix}\n",
    "$$\n",
    "\n",
    "(a) Find the eigenvectors and eigenvalues of this matrix.\n",
    "\n",
    "(b) Show that $H$ also squares to identity.\n",
    "\n",
    "(c) Show that $H P_1 H^\\dagger \\sim P_2$ for Paulis $P_1$ and $P_2$. \n",
    "\n",
    "\n",
    "## 4. Two-qubit Paulis\n",
    "\n",
    "For two qubits we can define a set of matrices $X_0$, $Y_0$ and $Z_0$ that behave as Paulis (i.e. they have the same properties as in 3a, 3b and 3c above). We can also define another separate set of matrices $X_1$, $Y_1$ and $Z_1$ that also behave as Paulis. Furthermore, any matrix from one of these sets will commute with any matrix from the other\n",
    "\n",
    "$$\n",
    "P_0 P_1 = P_1 P_0, \\,\\, \\forall \\,\\, P_j \\, \\in \\, \\{X_j, Y_j, Z_j\\}.\n",
    "$$\n",
    "\n",
    "Usually we define these sets in a very simple way, using the Paulis of one qubit for one set, and the Paulis of the other qubit for the other set,\n",
    "\n",
    "$$\n",
    "X_0 = X \\otimes I, \\, X_1 = I \\otimes X, \\, \\rm{etc}.\n",
    "$$\n",
    "\n",
    "But since this is an exercise, let's do something a bit more interesting! Consider the following choice of the first set,\n",
    "\n",
    "$$\n",
    "X_0 = X \\otimes X, \\, Y_0 = Y \\otimes X,\\, Z_0 = Z \\otimes I\n",
    "$$\n",
    "\n",
    "Find a corresponding $X_1$, $Y_1$ and $Z_1$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
