{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Exercise 5\n",
    "\n",
    "\n",
    "## 1. Clifford Gates and Paulis\n",
    "\n",
    "\n",
    "(a) For $n$ qubits, there are $4^n$ possible tensor products of Paulis (one of which is the $n$-qubit identity). Show that (up to a phase) these can be expressed as a product of $2n$ $n$-qubit Paulis.\n",
    "\n",
    "(b) If $U$ is a Clifford gate, the following property holds\n",
    "\n",
    "$$\n",
    "U P U^\\dagger \\sim P' \\,\\,\\,\\,\\, \\forall P,\n",
    "$$\n",
    "\n",
    "where $P$ and $P'$ are Paulis and $\\sim$ denotes equality up to a factor of $\\pm 1$ or $\\pm i$. If this relation holds for the $2n$ Pauli generators of part (a), show that it also holds for all $n$-qubit Paulis.\n",
    "\n",
    "\n",
    "\n",
    "## 2. Single-Qubit Clifford Gates\n",
    "\n",
    "\n",
    "(a) Show that the Paulis are Cliffords themselves.\n",
    "\n",
    "(b) Show that $H$, $S$ and $S^\\dagger$ are Clifford gates.\n",
    "\n",
    "(c) Show that $T=S^{1/2}$ is not a Clifford gate.\n",
    "\n",
    "\n",
    "## 3. Two-Qubit Clifford Gates\n",
    "\n",
    "For more than one qubit, Clifford gates map between tensor products of Pauli operators.\n",
    "\n",
    "For two qubits\n",
    "\n",
    "$$\n",
    "U \\,( P \\otimes Q )\\, U^\\dagger \\sim P' \\otimes Q' \\,\\,\\,\\,\\, \\forall P,Q\n",
    "$$\n",
    "\n",
    "where $P$, $Q$, $P'$ and $Q'$ are all Paulis and $\\sim$ denotes equality up to a factor of $\\pm 1$ or $\\pm i$.\n",
    "\n",
    "(a) Show that the controlled-NOT is a Clifford gate.\n",
    "\n",
    "(b) Show that the controlled-Hadamard is not a Clifford gate.\n",
    "\n",
    "## 4. Three-Qubit Clifford Gates\n",
    "\n",
    "(a) Provide an example of a three-qubit Clifford gate, and show that it is indeed a Clifford. This should be a truly three qubit gate, and therefore not one that can be expressed purely as a tensor product of single- and two-qubit gates.\n",
    "\n",
    "(b) Show that the Toffoli gate is not Clifford."
   ]
  },
  {
   "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
}
