Skip to content

Commit

Permalink
fix all tox -e docs warnings (#396)
Browse files Browse the repository at this point in the history
* fix all tox -e docs warnings

* Update tox.ini

* removed verbatim

---------

Co-authored-by: grace-harper <[email protected]>
  • Loading branch information
arnaucasau and grace-harper authored Oct 13, 2023
1 parent 45b93da commit 204a82e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
43 changes: 23 additions & 20 deletions docs/tutorials/QEC_Framework_IEEE_2022.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
" \n",
"### Layer Design\n",
"\n",
"```{verbatim}\n",
"```\n",
"\n",
" ┌ Layer 3: Maximum flexibility, convenience, options, many checks, ... \n",
"Python ┤ \n",
Expand Down Expand Up @@ -91,7 +91,7 @@
"### Structure\n",
"\n",
"\n",
"```{verbatim}\n",
"```\n",
"├── qiskit_qec\n",
" ├── analysis\n",
" ├── circuits\n",
Expand Down Expand Up @@ -360,10 +360,9 @@
"\n",
"\\begin{align}\n",
"\\rho_{U|\\phi\\rangle} &= U|\\phi\\rangle (U|\\phi\\rangle)^\\dagger \\\\\n",
" &=U|\\phi\\rangle\\langle\\phi|U^\\dagger \\\\\n",
" &=U\\rho_{|\\phi\\rangle}U^\\dagger\n",
"&=U|\\phi\\rangle\\langle\\phi|U^\\dagger \\\\\n",
"&=U\\rho_{|\\phi\\rangle}U^\\dagger\n",
"\\end{align}\n",
"\n",
" \n",
"Multiple qubits are modeled via tensor products and so $n$-qubit system has a Hilbert space\n",
"\n",
Expand Down Expand Up @@ -932,8 +931,8 @@
"- find a $g'\\in\\mathcal{U}$ such that $[g,g']=-I$ and set $\\mathcal{U}\\leftarrow\\mathcal{U}\\backslash\\{g'\\}$\n",
"- for each $v\\in\\mathcal{U}$ make $v$ commute with the processes hyperbolic pairs:\n",
"\\begin{align}\n",
" v&\\leftarrow vg \\quad\\textrm{if}\\quad [v,q]=-I \\\\\n",
" v&\\leftarrow vg' \\quad\\textrm{if}\\quad [v,q']=-I \\\\\n",
"v&\\leftarrow vg \\quad\\textrm{if}\\quad [v,q]=-I \\\\\n",
"v&\\leftarrow vg' \\quad\\textrm{if}\\quad [v,q']=-I \\\\\n",
"\\end{align}\n",
"\n",
"The result will yield \n",
Expand Down Expand Up @@ -1104,8 +1103,6 @@
"\n",
"![image7.png](attachment:a6a7e099-4400-402e-abbf-1494e7756fb8.png)\n",
"\n",
"\n",
"\n",
"### Gauge Groups\n",
"\n",
"**Definition** Let $\\mathcal{G}\\leq\\mathcal{P}_n$ be any subgroup (not necessarily abelian) such that $Z(\\mathcal{G})$ is either $\\langle iI,S\\rangle$ or $\\langle -I,S\\rangle$ or $\\langle S\\rangle$ such that $-I\\not\\in S$. The subgroup $\\mathcal{G}$ is referred to as a **gauge group** and $S$ is considered the associated stabilizer group. \n",
Expand Down Expand Up @@ -1151,7 +1148,7 @@
"source": [
"<div class=\"alert alert-block alert-info\">\n",
" <b>Note:</b> Within the QEC Framework there is only a <tt>GaugeGroup</tt> class and no Stabilzer class. This is because internally it views a stabilzier group as simply an abelian gauge group and finds the code by a group character defintion.\n",
"</div>\n"
"</div>"
]
},
{
Expand All @@ -1163,7 +1160,7 @@
"\n",
"One simple but important computational problem is to find a set of representatives for logical operators and gauge operators of a subsystem stabilizer code. This problem can be solved efficiently. We will use the method based on the Gram-Schmidt process described previously which uses symplectic geometry as propose by Wilde [Arxiv 0903.5256]. For Stabilizer codes there is also the approach by Gottesman [PhD Dissertation, Sect 4]. \n",
"\n",
"From the defintion above we see that to find the logical operators we need only find generating sets for $C(\\mathcal{G})\\setminus \\mathcal{G}$ to get the logical operators and $C(S)\\setminus \\mathcal{G}$ for t he dressed logical operators.\n"
"From the defintion above we see that to find the logical operators we need only find generating sets for $C(\\mathcal{G})\\setminus \\mathcal{G}$ to get the logical operators and $C(S)\\setminus \\mathcal{G}$ for t he dressed logical operators."
]
},
{
Expand Down Expand Up @@ -1254,9 +1251,9 @@
"\\mathcal{G} &= \\langle \\alpha, Z'_1,Z'_2,...,Z'_{n-k-r}, \\underbrace{X'_{n-k-r+1},Z'_{n-k-r+1},...,X'_{n-k},Z'_{n-k}}_{\\text{$r$ hyperbolic pairs}} \\rangle \\\\\n",
"Z(\\mathcal{G}) &= \\langle \\alpha, S\\rangle \\\\\n",
"S &= \\langle Z'_1,...,Z'_{n-k-r} \\rangle \\\\\n",
"C_{\\mathcal{P}_n}(S) &= \\langle iI, Z'_1,Z'_2,...,Z'_{n-k-r}, \\underbrace{X'_{n-k-r+1},Z'_{n-k-r+1},...,X'_{n},Z'_{n}}_{\\text{$k+r$ hyperbolic pairs}} \\rangle\n",
" = N_{\\mathcal{P}_n}(S) \\\\\n",
"C_{\\mathcal{P}_n}(\\mathcal{G}) &= \\langle iI, Z'_1,Z'_2,...,Z'_{n-k-r}, \\underbrace{X'_{n-k+1},Z'_{n-k+1},...,X'_{n},Z'_{n}}_{\\text{$k$ hyperbolic pairs}} \\rangle \\\\\n",
"C_{\\mathcal{P}_n}(S) &= \\langle iI, Z'_1,Z'_2,...,Z'_{n-k-r}, \\underbrace{X'_{n-k-r+1},Z'_{n-k-r+1},...,X'_{n},Z'_{n}}_{\\text{$k+r$ hyperbolic pairs}} \\rangle \n",
"= N_{\\mathcal{P}_n}(S) \\\\\n",
"C_{\\mathcal{P}_n}(\\mathcal{G}) &= \\langle iI, Z'_1,Z'_2,...,Z'_{n-k-r}, \\underbrace{X'_{n-k+1},Z'_{n-k+1},...,X'_{n},Z'_{n}}_{\\text{$k$ hyperbolic pairs}} \\rangle\n",
"\\end{align}\n",
"\n",
"Note that \n",
Expand Down Expand Up @@ -1364,7 +1361,7 @@
"In the special case where $k=0$,\n",
"\n",
"\\begin{equation}\n",
" d = \\min_{P\\in \\mathcal{G}\\setminus \\{I\\}} |P|.\n",
"d = \\min_{P\\in \\mathcal{G}\\setminus \\{I\\}} |P|.\n",
"\\end{equation}\n",
"\n",
"A stabilizer subsystem code encoding $k$ qubits into $n$ qubits with $r$ gauge qubits and distance $d$ is called an $[[n,k,r,d]]$ subsystem stabilizer code."
Expand Down Expand Up @@ -1563,9 +1560,12 @@
"The complex infinite Clifford group over $n$-qubits is defined by\n",
"\n",
"\\begin{align}\n",
" C_n^{\\infty}=\\mathcal{N}_{U(2^n)} (\\mathcal{P}_n) &= \\{ T\\in U(2^n): T\\mathcal{P}_nT^{-1}=\\mathcal{P}_n\\} \\\\\n",
" &= \\{ T\\in U(2^n): T\\mathcal{P}_nT^{\\dagger}=\\mathcal{P}_n\\} \\\\\n",
" &= \\begin{cases} \\langle e^{i\\theta}I, H, S \\rangle & \\textrm{if $n=1$} \\\\ \\langle e^{i\\theta}I, H_j, S_j, \\textrm{CNOT}_{ij} \\rangle & \\textrm{if $n>1$} \\end{cases}\n",
"C_n^{\\infty}=\\mathcal{N}_{U(2^n)} (\\mathcal{P}_n) &= \\{ T\\in U(2^n): T\\mathcal{P}_nT^{-1}=\\mathcal{P}_n\\} \\\\\n",
"&= \\{ T\\in U(2^n): T\\mathcal{P}_nT^{\\dagger}=\\mathcal{P}_n\\} \\\\\n",
"&= \\begin{cases} \n",
"\\langle e^{i\\theta}I, H, S \\rangle & \\textrm{if $n=1$} \\\\\n",
"\\langle e^{i\\theta}I, H_j, S_j, \\textrm{CNOT}_{ij} \\rangle & \\textrm{if $n>1$}\n",
"\\end{cases}\n",
"\\end{align}\n",
"\n",
"where $H$ is the Hadamard operator and $S$ is the phase operator with the following matrix representations relative to the standard basis:\n",
Expand All @@ -1579,7 +1579,10 @@
"Note that $(HS)^3 = \\eta I$ where $\\eta$ an eighth root of unity. The finite complex Clifford group $C_n\\leq C_n^\\infty$ is defined by\n",
"\n",
"\\begin{align}\n",
"C_n = \\begin{cases} \\langle H, S \\rangle & \\textrm{if $n=1$} \\\\ \\langle H_j, S_j, \\textrm{CNOT}_{ij} \\rangle & \\textrm{if $n>1$}\\end{cases}\n",
"C_n = \\begin{cases} \n",
"\\langle H, S \\rangle & \\textrm{if $n=1$} \\\\ \n",
"\\langle H_j, S_j, \\textrm{CNOT}_{ij} \\rangle & \\textrm{if $n>1$}\n",
"\\end{cases}\n",
"\\end{align}\n",
"\n",
"Elements of $C_1$ acting on Pauli operators in $\\mathcal{P}_1$ via $\\dagger$-conjugation are acting as a permutations of the set $\\{I,X,Z,Y\\}$ with a possible change in complex coefficient. In fact it can be show that $C_1/\\langle \\eta I, \\mathcal{P}_1\\rangle \\eqsim S_3$. These 6 elements are\n",
Expand Down Expand Up @@ -1712,7 +1715,7 @@
"Different codebases are packaged as code libraries and managed by a `CodeLibarian` class.\n",
"\n",
"\n",
"```{verbatim}\n",
"```\n",
"├── qiskit_qec\n",
" └── codes\n",
" └── codebase\n",
Expand Down
1 change: 1 addition & 0 deletions src/qiskit_qec/circuits/repetition_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ def string2nodes(self, string, **kwargs) -> List[DecodingGraphNode]:
kwargs:
all_logicals (bool): Whether to include logical nodes irrespective
of value. (False as default).
Returns:
dict: List of nodes corresponding to to the non-trivial
elements in the string.
Expand Down
2 changes: 1 addition & 1 deletion src/qiskit_qec/circuits/surface_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def string2nodes(self, string, **kwargs):
kwargs:
logical (str): Logical value whose results are used ('0' as default).
all_logicals (bool): Whether to include logical nodes
irrespective of value. (False as default).
irrespective of value. (False as default).
Returns:
dict: List of nodes corresponding to to the non-trivial
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ deps =
jax
jaxlib
commands =
sphinx-build -b html docs/ docs/_build/html
sphinx-build -b html -W -T --keep-going {posargs} docs/ docs/_build/html

0 comments on commit 204a82e

Please sign in to comment.