\documentclass[12pt]{report}

\include{jm-tex-macros-public}
\include{no-revtex}
\input{Qcircuit.tex}

%\input{Qcircuit.tex}

\usepackage{mathtools} % for inclusion arrow \xhookrightarrow{}


\renewcommand{\theequation}{\arabic{equation}}
\newif{\ifeq}           % defines a new condition @eq tested by the conditional \ifeq
\eqtrue                 % if uncommented, declares @eq to be true
\eqfalse              % if uncommented, declares @eq to be false
%                                %
%                                % to use this, wrap text with the conditional, eg:
%                                %
%                                % \ifeq
%                                % SHOW THIS IFF \eqtrue HAS BEEN DECLARED
%                                % \fi
%
\def\answer#1
{
\ifeq
\textcolor{darkblue}{#1}
\fi
}
\begin{document}
\begin{center}

University of California at San Diego -- 
Department of Physics --
Prof.~John McGreevy

{\Large\bf  YOUR NAME HERE}\\



{\Large\bf  Physics 230 Quantum Phases of Matter, Spring 2024}\\
{\Large\bf Assignment 1 \answer{--~~~ Solutions} }
\end{center}


\noindent
\hfill {\bf Due 11pm {Thursday, April 11, 2024}} 


%Thanks for following the submission guidelines on \htmladdnormallink{hw01}{https://mcgreevy.physics.ucsd.edu/s21/2021S-211C-hw01.pdf}.  Please ask me by email if you have any trouble.


%I will add another problem later today.
\bigskip
\hrule


\def\aa{{\bf a}}
\def\nnn{{\bf n}}
\begin{enumerate}



\item {\bf Simple stabilizer codes.}

I've mentioned the toric code as an important solvable example of topological order.  
We can solve it because it is an example of what is called a {\it stabilizer code}.  
This means that the systems is made from a bunch of qubits and all the terms in the Hamiltonian are made of Pauli $X$s and $Z$s\footnote{A comment about notation:
the notation $\sigma^x_\ell, \sigma^z_\ell$ is pretty terrible
(at least for someone with deteriorating eyesight like me)
because the crucial information ($x$ or $z$) is hidden in the superscript.
Much better is to write
$$ \sigma^x_\ell \equiv X_\ell, \sigma^z \equiv Z_\ell.$$

Also, I use $ \ket{0}$, $\ket{1}$ to denote the $\pm 1$ eigenstates of $Z$, and $\ket{\pm}$ 
to denote the $\pm 1$ eigenstates of $X$.
}
and all commute with each other.  
This problem is a warmup problem to get used to this idea.

\begin{enumerate}

\item 
\label{prob1a}
Consider the Hamiltonian on two qbits
$$ - H = X_1 X_2 + Z_1 Z_2 . $$
Show that the terms commute and that the groundstate is 
$$  { \ket{00} + \ket{11} \over \sqrt{2}} .$$


\item 

Consider the (non-local) Hamiltonian on $N$ qbits
\be\label{eq:ghz} H_\text{GHZ} = - X_1 \cdots X_N - \sum_{i=1}^{N-1} Z_i Z_{i+1} .\ee
Show that all the terms commute.
Show that the groundstate is (the `GHZ state' or `cat state')
$$ { \ket{00...0} + \ket{11...1} \over \sqrt{2}} .$$



\item{} [bonus] Show that the following circuit $U$ produces the GHZ state from the product state $ \ket{0}^{\otimes N}$.
$$ \Qcircuit @C=.7em @R=.4em @! {
  \lstick{\ket{0}_N} & \qw & \qw & \qw & \qw & \cdots & \qw &\targ & \qw    \\  % \gate{H} & \meter & \control \cw\\
  \lstick{\ket{0}_{N-1}} & \qw & \qw & \qw & \qw & \cdots & \targ &\ctrl{-1} & \qw    \\  % \gate{H} & \meter & \control \cw\\
				  &   	&	&	&	\vdots & & & & \\ 
  \lstick{\ket{0}_3} & \qw & \qw & \targ & \qw  & \cdots & \qw  & \qw& \qw  \\  % \gate{H} & \meter & \control \cw\\
  \lstick{\ket{0}_2} & \qw & \targ & \ctrl{-1} & \qw  & \cdots & \qw  & \qw& \qw  \\ %&     \meter & \cwx\\
  \lstick{\ket{0}_1} & \gate{H} & \ctrl{-1} & \qw  & \qw& \cdots & \qw  & \qw & \qw \\ % &    \qw & \gate{X} \cwx & \gate{Z} \cwx &    \rstick{\ket{\psi}} \qw
}$$
Let me explain the notation.  Each horizontal line represents a qubit.  
$H$ represents the `hadamard gate' acting on one qubit by $ H \ket{\up} = \ket{+}, H\ket{\down} = \ket{-}$, \ie
\be  H =   \ketbra{+}{\up} + \ketbra{-}{\down}. \ee
The vertical line segments represent the `control-X gate' that acts on two qubits by 
\be \mathsf{CX} =   \ketbra{0,0}{0,0}  + \ketbra{1,1}{1,0} .\ee
(The first qubit is the one with the black dot, and the second is the one with the circled $+$.)

Notice that this circuit has depth $N$.




\item{} [bonus] What state does $U$ produce from $\ket{1}_1 \otimes \ket{0}^{\otimes N-1} $?  

\item{} [bonus] Find the result of feeding the Hamiltonian $ - \sum_i Z_i $  (whose groundstate is the product state $\ket{0}^{\otimes N}$)
through the circuit, \ie~what is 
$$ U \( - \sum_i Z_i \) U^\dagger ~~?$$
Hint: use the rules for the action of $\mathsf{CX}$ by conjugation given in lecture.
%Show that the Hamiltonian $ - \sum_i Z_i $  (whose groundstate is the product state $\ket{0}^{\otimes N}$) is mapped by the circuit to $H_\text{GHZ}$ in \eqref{eq:ghz},
%i.e. 

\end{enumerate}




\item {\bf Gauge theory can emerge from a local Hilbert space.}  
\def\ssigma{\sigma}
\def\ttau{\ssigma}

The Hilbert space of a gauge theory is a funny thing: 
states related by a gauge transformation are physically equivalent.
In particular, it is not a tensor product over independent local Hilbert spaces
associated with regions of space.    Because of this,
there is much hand-wringing about defining entanglement 
in gauge theory.  The following is helpful for thinking about this.
It is a realization of $\IZ_2$ lattice gauge theory, 
beginning from a model with no redundancy in its Hilbert space.
In this avatar it is due to \htmladdnormallink{Kitaev}{http://xxx.lanl.gov/abs/quant-ph/9707021} 
and is called the {\it toric code}.

To define the Hilbert space, put a qubit on every link $\ell$ of a lattice,
say the 2d square lattice, 
so that $ \CH = \otimes_{\ell} \CH_{\ell} $.
Let $ \ttau^x_\ell, \ttau^z_\ell$ be the associated Pauli operators, 
and recall that $\{ \ttau^x_\ell, \ttau^z_\ell\} = 0$.
$ \CH_\ell  = \text{span} \{ \ket{ \sigma^z_\ell = 1}, \ket{\sigma^z_\ell = -1}  \} $ 
is a useful basis for the Hilbert space of a single link.


\parbox{.79\textwidth}{
One term in the hamiltonian is associated with each 
site $ j \to  A_j \equiv \prod_{l\in j} \ssigma^z_l $
and one with each
plaquette $p \to B_p \equiv \prod_{l\in \partial p} \ssigma^x_l $, as indicated in the figure
at right.  
$$\HH = - \Gamma_e \sum_j A_j  - \Gamma_m \sum_p B_p.$$
}
~\parfig{.19}{fig-TC-H.pdf}

\begin{enumerate}
\item   Show that all these terms commute with each other.



\item The previous result means we can diagonalize the Hamiltonian by 
diagonalizing one term at a time.  Let's imagine that $\Gamma_e \gg \Gamma_m$ 
so we'll minimize the `star' terms $A_j$ first.
Which states satisfy the `star condition' $A_j = 1$?  
In the $\ttau^x$ basis there is an extremely useful visualization: 
we say a link $l$ of $\hat\Gamma$ is covered with a segment of string 
(an electric flux line)
if $\ttau^{\cor z}_l = -1$ (so the electric field on the link is $ \bfe_l = 1$) and is not covered if $\ttau^{\cor z}_l = +1$ (so the electric field
on the link is $ \bfe_l=0$): 
$\parbox{1cm}{\includegraphics[width=1cm]{fig-electric-segment.png}} \equiv 
( \ssigma^z_{\ell} = - 1 )$.  
Draw all possible configurations incident on a single vertex $j$
and characterize which ones satisfy $A_j=1$.


\item{} [bonus] What is the effect of adding a term $\Delta \HH= \sum_\ell g \ttau^x$?  
Convince yourself that in the limit $ \Gamma_e \gg \Gamma_m$, 
for energies $ E \ll \Gamma_e$, 
this is identical to $\IZ_2$ lattice gauge theory, 
where $ A_j=1$ is a discrete version of the Gauss law constraint.
%[This part is a bonus problem because I have not yet explained
%how to go from the euclidean lattice gauge theory to a Hamiltonian formulation.
%If you want to figure it out yourself, 



\item{} Set $g=0$ again.  In the subspace of solutions of the star condition, 
find the groundstate(s) of the plaquette term.  
First consider a simply-connected region of lattice, 
then consider periodic boundary conditions.


\end{enumerate}


\item {\bf Groundstate degeneracy and 1-form symmetry algebra.}  
\begin{enumerate}

\item Suppose we have a system with Hamiltonian $H$
with string operators $W_C$ and $V_{\check C}$ supported on closed curves, and commuting with $H$, and satisfying $W^N = V^N =1$.

In all parts of this problem you should make the assumption that the string operators are {\it deformable}: 
$W_C$ acts in the same way as $W_{C+ \partial p}$ on groundstates.  


Suppose $[W_C, W_{C'}] = 0, [V_{\check C}, {\check C'}]$ for all curves but 
$$ W_C V_{\check C}  =  \omega^{\# \( C \cap \check C \) }   V_{\check C} W_C$$
where $\omega \equiv e^{ 2 \pi \ii \over N} $ and 
$\# \( C \cap \check C \) $ is the number of intersection points of the curves.
How many groundstates does such a system have on the two-torus (that is, with periodic boundary conditions on both spatial directions)?  

This is what happens in the $\IZ_N$ toric code.


\item Now suppose in a different system we have just one set of string operators $W_C$ satisfying 
$$ W_C W_{C'} =  \omega^{\# \( C \cap C'  \) }  W_{C'} W_C,$$
with the same definitions as above.
How many groundstates does this system have on the two-torus? 

This is what happens in the Laughlin fractional quantum Hall state with filling fraction ${1\over N}$.  



\item{} [Bonus problem] Redo the previous problems for a genus $g$ Riemann surface, \ie~the surface of a donut with $g$ handles.
\end{enumerate}



\item {\bf Simplicial homology and the toric code.}  [Bonus]

%In lecture we discussed the (de Rham) cohomology
%of the exterior derivative $ \dd$ acting on vector spaces
%(over $\IR$) of differential forms on some smooth manifold $X$.  
%The dimensions $b^p(X, \IR)$ of the cohomology groups
%are topological properties of $X$.
%This same data is manifested in many other ways;
%in this problem we study another one, along with an important and familiar physical realization of it.
%You could say that this problem is the punchline to the previous problem about the toric code.

The toric code is a physical realization of {\it homology}, a construction that extracts topological invariants of topological spaces.  This problem explains the relation.

\def\DDD{\boldsymbol{\Delta}}
\begin{enumerate}
\item The toric code we've discussed so far has qbits 
on the links $ \ell \in \Delta_1(\DDD)$ of a graph $\DDD$.  
But the definition of the Hamiltonian involves more information
than just the links of the graph:
we have to know which vertices $v$ lie at the boundaries of each link $\ell$, 
and we have to know which links are boundaries of which faces.
The Hamiltonian has two kinds of terms:
a `plaquette' operator $B_p = \prod_{\ell \in \partial p } X_\ell$ 
associated with each 2-cell (plaquette) $p \in \Delta_2(\DDD)$.
and `star' operators, $A_s = \prod_{\ell \in  \partial^{-1}(s)} Z_\ell$,
associated with each 0-cell (site) $s \in \Delta_0(\DDD)$.
Here I've introduced some notation that will be useful, please be patient: 
$\Delta_k$ denotes 
a collection of $k$-dimensional polyhedra 
which I'll call $k$-simplices or 
more accurately
%the vector space (over some ring $R$ to be determined, it is $\IZ_2$ for the ordinary toric code) 
$k$-cells -- $k$-dimensional objects making up the space.
(It is important that each of these objects is topologically a $k$-ball.)
This information constitutes (part of) a {\it simplicial complex}, 
which says how these parts are glued together:
\be\label{eq:cell-complex} \Delta_d \buildrel{\partial}\over{\to} \Delta_{d-1} \buildrel{\partial}\over{\to} 
\cdots \Delta_1 \buildrel{\partial}\over{\to} \Delta_0 \ee
where $\partial$ is the (signed) boundary operator.
For example, the boundary of a link is $\partial \ell = s_1 - s_0 $,
the difference of the vertices at its ends.
The boundary of a face $ \partial p = \sum_{\ell \in \partial p} \ell $ 
is the (oriented) sum of the edges bounding it.  
By $ \partial^{-1}(s)$ I mean the set of links which contain the site $s$ in their boundary (with sign).

Think of this collection of objects as a triangulation (or more generally some chopping-up)
of a smooth manifold $X$.
Convince yourself that the sequence of maps \eqref{eq:cell-complex} 
is a complex in the sense that $ \partial^2 = 0$ (mod two).

\item {} [not actually a question]  This means that the simplicial complex defines a set of homology groups, which are topological invariants of $X$, 
in the following way.
(It is homology and not cohomology because $ \partial$ decreases the degree $k$).
To define these groups, we should introduce one more 
gadget, which is a collection of vector spaces over some ring $R$ 
(for the ordinary toric code, $R = \IZ_2$)
$$ \Omega_p(\DDD, R) , ~p= 0...d \equiv \text{dim}(X) $$ 
basis vectors for which are $p$-simplices: 
$$ \Omega_p(\DDD, R) = \text{span}_{R} \{   \sigma \in \Delta_p \} $$
-- that is, we associate a(n orthonormal) basis vector 
to each $p$-simplex (which I've just called $\sigma$), and these vector spaces
are made by taking linear combinations of these spaces,
with coefficients in $R$.
Such a linear combination of $p$-simplices is called a $p$-{\it chain}.
It's important that we can {\it add} (and subtract) $p$-chains, $ C + C' \in \Omega_p$.
A $p$-chain with a negative coefficient can be regarded as having the opposite orientation.
We'll see below how better to interpret the coefficients.


The boundary operation on $\Delta_p$ induces one on $\Omega_p$.
%I made a small abuse of notation above:
%the $p$-th homology should
%really be defined in terms of
%a vector space whose 
%elements are labelled by 
%{\it collections} of $p$-simplices 
A chain $C$ satisfying $ \partial C = 0 $ is called a {\it cycle}, and is said to be {\it closed}.
%So by $\Delta_p$ above I really mean
%a vector space of $p$-simplices, with integer coefficients.


So the $p$th homology is the group of equivalence classes of $p$-cycles,
modulo boundaries of $p+1$ cycles:
$$ H_p(X, R) \equiv
{ \text{ker}\( \partial:  \Omega_p \to \Omega_{p-1} \) \subset \Omega_p  \over \text{Im}\( \partial: 
\Omega_{p+1} \to \Omega_p \) \subset \Omega_p } $$
This makes sense because $\partial^2 = 0 $ --
the image of $\partial: 
\Omega_{p+1} \to \Omega_p $ 
is a subset of  $\text{ker}\( \partial:  \Omega_p \to \Omega_{p-1} \)$.
It's a theorem that the dimensions of these groups
are the same for different (faithful-enough) discretizations $\DDD$ of $X$.
Furthermore, their dimensions (as vector spaces over $R$) $b_p(X)$ 
contain (much of\footnote{I don't want to talk about torsion homology.}) the same information as the Betti numbers defined by de Rham cohomology.
For more information and proofs, see the great book by Bott and Tu, {\it Differential forms in algebraic topology}.

%$$H_k(X, R) \equiv { \ker \partial  \subset \Delta_k \over \Im \partial  \subset \delta k} $$

\item 
A state of the toric code on a cell-complex $\DDD$ can be written 
(for the hamiltonian described above, this is in the basis where
$Z_\ell$ is diagonal) as 
an element of $ \Omega_1(X, \IZ_2)$,
$$ \ket{\Psi} = \sum_C \Psi(C) \ket{C} $$
where $C$ is an assignment of an element of $\IZ_2$ in $X$ (the eigenvalue of $Z_\ell$).
For the case of $\IZ_2$ coefficients, $ 1=-1 \text{ mod } 2$ 
and we don't care about the orientations of the cells.
Show that the conditions for a state $\Psi(C)$
to be a groundstate of the toric code 
%$ $
($ A_s \ket{\Psi} = \ket{\Psi} \forall s$ and  $B_p \ket{\Psi} = \ket{\Psi} \forall p$)
are exactly
those defining an element of $ H_1(X, \IZ_2)$.  

\item Consider putting a spin variable on the $p$-simplices of $\DDD$.
More generally, let's put an $N$-dimensional hilbert space 
$\CH_N \equiv \text{span} \{ \ket{n}, n=1..N \}$
on each $p$-simplex,
on which act the operators
$$ \XX \equiv \sum_{n=1}^N \ket{n}\bra{n} \omega^n 
= \begin{pmatrix} 1 & 0 & 0 & \dots \cr 0 & \omega & 0 & \dots \cr 0 & 0 & \omega^2 & \dots \cr
0 & 0 & 0 & \ddots  \end{pmatrix}, ~~~~
\ZZ \equiv \sum_{n=1}^N \ket{n}\bra{n+1}
=
%\cor  
\begin{pmatrix} 0 & 1 & 0 & 0 \cr 
 0 & 0 & 1  & 0 \cr 
  \vdots & \vdots & \vdots & \ddots \cr 
   1 & 0 & 0 & \hdots \cr \end{pmatrix} 
$$
%(this matrix should be transposed).\cob
where $\omega^N=1$ is an $n$th root of unity.
If you haven't already, check that they satisfy the clock-shift algebra:  $  \ZZ\XX= \omega\XX\ZZ$.
For $N=2$ these are Pauli matrices and $\omega=-1$.


Consider the Hamiltonian
$$ \HH_p = - J_{p-1} \sum_{ s\in \Delta_{p-1} } A_{s}
- J_{p+1} \sum_{\mu \in \Delta_{p+1} } B_{\mu}
- g_p \sum_{ \sigma \in \Delta_p} \ZZ_\sigma ~~$$
with 
$$ A_s \equiv \prod_{\sigma \in \partial^{-1}(s) \subset \Delta_p} \ZZ_\sigma $$
$$ B_\mu \equiv \prod_{ \sigma \in \partial \mu} \XX_\sigma ~.$$
 This is a lattice version of $p$-form $\IZ_N$ gauge theory, 
 at a particular, special point in its phase diagram (the RG fixed point for the deconfined phase).
 
Show that 
 $$ 0 = [A_s, A_{s'}] = [B_\mu, B_{\mu'} ] = [A_s, B_\mu], ~~\forall s, s', \mu, \mu' $$
so that for $ g_p = 0 $ this is solvable.

\item Show that the groundstates 
of $\HH_p$ (with $g_p=0$) are in one-to-one correspondence
with elements of $ H_p(\DDD, \IZ_N)$.

\end{enumerate}
\end{enumerate}


\end{document}