Skip to content

Commit 5f76bdb

Browse files
committed
Update week7.do.txt
1 parent b9c0478 commit 5f76bdb

File tree

1 file changed

+235
-9
lines changed

1 file changed

+235
-9
lines changed

doc/src/week7/week7.do.txt

Lines changed: 235 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,174 @@ represented by a Pauli-$\bm{Z}$ gate/matrix.
451451

452452

453453
!split
454-
===== Explicit expressions =====
455-
In order to perform our measurements we need the following operators $\bm{U}$
454+
===== Rewriting our strings of Pauli matrices =====
455+
456+
457+
458+
As discussed last week and reviewed above, to perform a measurement,
459+
it is often useful to rewrite the string of Pauli matrices in a
460+
specific order or to simplify the expression.
461+
462+
Consider a string of Pauli matrices of the form:
456463
!bt
457-
\begin{align*}
458-
\bm{Z}\otimes\bm{I}\hspace{1cm} & \bm{U}=\bm{I}\otimes\bm{I}\\
459-
\bm{I}\otimes\bm{Z}\hspace{1cm} & \bm{U}=\text{SWAP}\\
460-
\bm{Z}\otimes\bm{Z}\hspace{1cm} & \bm{U}=CX_{10}\\
461-
\bm{X}\otimes\bm{X}\hspace{1cm} & \bm{U}=CX_{10}(\bm{H}\otimes\bm{H})\\
462-
\end{align*}
464+
\[
465+
P = \sigma_{i_1} \otimes \sigma_{i_2} \otimes \cdots \otimes \sigma_{i_n},
466+
\]
467+
!et
468+
where each $\sigma_{i_k}$ is one of the Pauli matrices $\bm{X}$, $\bm{Y}$, $\bm{Z}$, or the identity matrix $\bm{I}$.
469+
470+
!split
471+
===== Rewriting the string of matrices =====
472+
473+
To rewrite this string for measurement purposes, follow these steps:
474+
!bblock Commute and reorder:
475+
Use the commutation relations of the Pauli matrices to reorder the string. The commutation relations are:
476+
!bt
477+
\[
478+
[\sigma_i, \sigma_j] = 2i \epsilon_{ijk} \sigma_k,
479+
\]
480+
where $\epsilon_{ijk}$ is the Levi-Civita symbol. This allows you to move certain Pauli matrices to the left or right in the string.
481+
!et
482+
!eblock
483+
!bblock Simplify using identities:
484+
Use the fact that $\sigma_i^2 = I$ and $\sigma_i \sigma_j = -\sigma_j \sigma_i$ for $i \neq j$ to simplify the expression. For example:
485+
!bt
486+
\[
487+
\sigma_x \sigma_y = -\sigma_y \sigma_x = i \sigma_z.
488+
\]
489+
!et
490+
!eblock
491+
!split
492+
===== More rewriting tricks =====
493+
494+
!bblock Group terms:
495+
Group terms that are easier to measure together. For example, if you have a term like $\sigma_x \otimes \sigma_x$, you can measure both qubits in the $X$-basis simultaneously.
496+
!eblock
497+
!bblock Diagonalize if necessary:
498+
If the final expression is not diagonal, you may need to apply a unitary transformation to diagonalize it before measurement. For example,to measure $\sigma_x$, you can apply the Hadamard gate $H$ to transform it into $\sigma_z$:
499+
!bt
500+
\[
501+
H \sigma_x H = \sigma_z.
502+
\]
503+
!et
504+
!bblock
505+
!split
506+
===== Example =====
507+
508+
A simple example is
509+
!bt
510+
\[
511+
\bm{P} = \bm{X} \bm{Y} \otimes bm{Z}.
512+
\]
513+
!et
514+
To rewrite this for measurement we use the commutation relations to reorder the terms if needed.
515+
Then we eimplify using identities:
516+
!bt
517+
\[
518+
\bm{X} \bm{Y} = i \bm{Z}.
519+
\]
520+
!et
521+
522+
We obtain then
523+
!bt
524+
\[
525+
\bm{P} = (i \bm{Z}) \otimes \bm{Z} = i (\bm{Z} \otimes \bm{Z}).
526+
\]
527+
!et
528+
529+
!split
530+
===== The $\bm{Z}\otimes \bm{I}$ term =====
531+
532+
The explicit matrix is
533+
!bt
534+
\[
535+
\bm{Z}\otimes \bm{I} = \begin{bmatrix}
536+
1 & 0 & 0 & 0 \\
537+
0 & 1 & 0 & 0 \\
538+
0 & 0 & -1 & 0 \\
539+
0 & 0 & 0 & -1
540+
\end{bmatrix}.
541+
\]
542+
!et
543+
544+
When we perform a measurement on the first qubit, we see that this
545+
matrix gives us the correct eigenvalues for the first qubit (but not
546+
for the second one). To see this multiply the above matrix with our
547+
computational basis states, that is the states $\vert 00\rangle =\vert 0\rangle
548+
\times \vert 0\rangle$, $\vert 01 \rangle$, $\vert 10\rangle$ and
549+
$\vert 11\rangle$.
550+
551+
!split
552+
===== The specific eigenvalues =====
553+
554+
Multiplying with the $\vert 00\rangle$ state we get
555+
!bt
556+
\[
557+
\bm{Z}\otimes \bm{I} = \begin{bmatrix}
558+
1 & 0 & 0 & 0 \\
559+
0 & 1 & 0 & 0 \\
560+
0 & 0 & -1 & 0 \\
561+
0 & 0 & 0 & -1
562+
\end{bmatrix}\begin{bmatrix} 1\\ 0 \\ 0 \\ 0\end{bmatrix}=\begin{bmatrix} 1\\ 0 \\ 0 \\ 0\end{bmatrix},
563+
\]
564+
!et
565+
and
566+
!bt
567+
\[
568+
\bm{Z}\otimes \bm{I} = \begin{bmatrix}
569+
1 & 0 & 0 & 0 \\
570+
0 & 1 & 0 & 0 \\
571+
0 & 0 & -1 & 0 \\
572+
0 & 0 & 0 & -1
573+
\end{bmatrix}\begin{bmatrix} 0\\ 0 \\ 1 \\ 0\end{bmatrix}=-1\begin{bmatrix} 0\\ 0 \\ 1 \\ 0\end{bmatrix}.
574+
\]
575+
!et
576+
We don't get the correct eigenvalues if we perform the measurement on the second qubits!
577+
578+
!split
579+
===== The $\bm{I}\otimes \bm{Z}$ term =====
580+
581+
Our strategy is to rewrite all the strings of Pauli operators via
582+
specific unitary transformations in order to obtain a final operator
583+
$\bm{P}=\bm{Z}_1\bm{I}_2\dots\bm{I}_N$, where the subscripts indicate
584+
the various qubits. We can then perform the measurement on the first qubit only.
585+
586+
We can rewrite $\bm{I}\otimes \bm{Z}$ via the SWAP gate
587+
!bt
588+
\[
589+
\text{SWAP} = \begin{bmatrix}
590+
1 & 0 & 0 & 0 \\
591+
0 & 0 & 1 & 0 \\
592+
0 & 1 & 0 & 0 \\
593+
0 & 0 & 0 & 1
594+
\end{bmatrix}.
595+
\]
596+
!et
597+
We have then that
598+
!bt
599+
\[
600+
\bm{P}=\text{SWAP}^{\dagger}(\bm{I}\otimes\bm{Z})\text{SWAP}=\bm{Z}\otimes\bm{I}.
601+
\]
602+
!et
603+
604+
We note that the original $\bm{I}\otimes \bm{Z}$ does not give the
605+
correct eigenvalues when measured on the first qubit. Try this as an exercise.
606+
607+
608+
609+
!split
610+
===== The $\bm{Z}\otimes \bm{Z}$ term =====
611+
612+
This term gives the correct eigenvalue when operating on the first
613+
qubit. In principle thus we don't need to rewrite string of operators.
614+
However, let us rewrite it via a unitary transformation in
615+
order to have $\bm{P}=\bm{Z}\otimes\bm{I}$. To do so, consider the
616+
transformation
617+
618+
!bt
619+
\[
620+
\bm{P}= CX_{10}^{\dagger}(\bm{Z}\otimes\bm{Z})CX_{10},
621+
\]
463622
!et
464623
where we have
465624
!bt
@@ -473,11 +632,78 @@ where we have
473632
\]
474633
!et
475634

635+
!split
636+
===== Performing the transformation =====
637+
638+
Performing the operation gives
639+
!bt
640+
\[
641+
\bm{P}= CX_{10}^{\dagger}(\bm{Z}\otimes\bm{Z})CX_{10}=\begin{bmatrix}
642+
1 & 0 & 0 & 0 \\
643+
0 & 1 & 0 & 0 \\
644+
0 & 0 & -1 & 0 \\
645+
0 & 0 & 0 & -1
646+
\end{bmatrix}=\bm{Z}\otimes\bm{I},
647+
\]
648+
!et
649+
650+
which allows us to transform the original tensor product
651+
$\bm{Z}\otimes \bm{Z}$ into a matrix where we perform the measurement
652+
in the basis of the first qubit.
653+
654+
To see this, act with $\bm{P}$ on the states $\vert 00\rangle =\vert
655+
0\rangle \times \vert 0\rangle$, $\vert 01 \rangle$, $\vert 10\rangle$
656+
and $\vert 11\rangle$.
657+
658+
!split
659+
===== More terms =====
660+
661+
Let us look at the $\bm{X}\otimes \bm{X}$.
662+
This term can be rewritten as
663+
664+
!bt
665+
\[
666+
\bm{P}= (CX_{10}(\bm{H}\otimes\bm{H}))^{\dagger}(\bm{X}\otimes\bm{X})(CX_{10}(\bm{H}\otimes\bm{H})),
667+
\]
668+
!et
669+
which results in
670+
!bt
671+
\[
672+
\begin{bmatrix}
673+
1 & 0 & 0 & 0 \\
674+
0 & 0 & 0 & 1 \\
675+
0 & 0 & 1 & 0 \\
676+
0 & 1 & 0 & 0
677+
\end{bmatrix}.
678+
\]
679+
!et
680+
681+
682+
!split
683+
===== Explicit expressions =====
684+
In order to perform our measurements for our simple two-qubit Hamiltonian
685+
we need the following unitary transformations $\bm{U}$
686+
!bt
687+
\begin{align*}
688+
\bm{Z}\otimes\bm{I}\hspace{1cm} & \bm{U}=\bm{I}\otimes\bm{I}\\
689+
\bm{I}\otimes\bm{Z}\hspace{1cm} & \bm{U}=\text{SWAP}\\
690+
\bm{Z}\otimes\bm{Z}\hspace{1cm} & \bm{U}=CX_{10}\\
691+
\bm{X}\otimes\bm{X}\hspace{1cm} & \bm{U}=CX_{10}(\bm{H}\otimes\bm{H})\\
692+
\end{align*}
693+
!et
694+
476695
!split
477696
===== More complete list and derivations of expressions for strings of operators =====
478697

479698
For a two qubit system we list here the possible transformations
480-
699+
!bt
700+
\begin{align*}
701+
\bm{Z}\otimes\bm{I}\hspace{1cm} & \bm{U}=\bm{I}\otimes\bm{I}\\
702+
\bm{I}\otimes\bm{Z}\hspace{1cm} & \bm{U}=\text{SWAP}\\
703+
\bm{Z}\otimes\bm{Z}\hspace{1cm} & \bm{U}=CX_{10}\\
704+
\bm{X}\otimes\bm{X}\hspace{1cm} & \bm{U}=CX_{10}(\bm{H}\otimes\bm{H})\\
705+
\end{align*}
706+
!et
481707

482708
!split
483709
===== Lipkin model =====

0 commit comments

Comments
 (0)