Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
phfaist committed Aug 30, 2022
1 parent a8f7f95 commit 9a37d52
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jscomponents/dist/eczeditcodeapp.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion jscomponents/src/eczeditcodeapp/EczEditSchemaField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ class EczEditSchemaFieldObjectType extends React.Component
throw new Error("additionalProperties not supported!");
}
let props_components_list =
Object.keys(schema.properties).map( (prop_key) => {
Object.keys(schema.properties)
.filter( (prop_key) => {
if (schema.properties[prop_key]._auto_populated
|| schema.properties[prop_key]._hide_in_editor) {
return false;
}
return true;
})
.map( (prop_key) => {
let prop_schema = schema.properties[prop_key];
const prop_value = value[prop_key];
if ( ! (schema.required || []).includes(prop_key) ) {
Expand Down
10 changes: 10 additions & 0 deletions schemas/ecc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ properties:
cousins:
$ref: '/schemas/ecc_relation_list'

# automatically populated fields, don't specify manually
parent_of:
_auto_populated: true
type: array
items: {}
cousin_of:
_auto_populated: true
type: array
items: {}


#
# Store meta-information about this entry. Authors, etc.
Expand Down
5 changes: 5 additions & 0 deletions schemas/ecc_relation_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ items:
detail:
_llm: full
type: string

# automatically populated fields, don't specify manually
code:
_auto_populated: true

83 changes: 78 additions & 5 deletions test/test_code_yml_features/codes/CSS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,90 @@ logical: qubits
name: 'Calderbank-Shor-Steane (CSS) stabilizer code'
introduced: '\cite{arXiv:quant-ph/9512032,doi:10.1103/PhysRevLett.77.793,arXiv:quant-ph/9601029}'

description: 'An \([[n,k,d]]\) stabilizer code whose encoding is based on two binary linear codes, an \([n,k_1,d_1]\) code \(C_1\) and \([n,k_2,d_2]\) code \(C_2\) with \(C_1^\perp \subseteq C_2\), such that \(k=k_1+k_2-n\) and \(d\geq\min\{d_1,d_2\}\).'
description: |
An \([[n,k,d]]\) stabilizer code admitting a set of stabilizer generators that are either \(Z\)-type or \(X\)-type Pauli strings. The stabilizer generator matrix is of the form
\begin{align}
H=\begin{pmatrix}0 & H_{Z}\\
H_{X} & 0
\end{pmatrix}
\label{eq:parity}
\end{align}
such that the rows of the two blocks must be orthogonal
\begin{align}
H_X H_Z^T=0~.
\label{eq:comm}
\end{align}
The above condition guarantees that the \(X\)-stabilizer generators, defined in the symplectic representation as rows of \(H_X\), commute with the \(Z\)-stabilizer generators associated with \(H_Z\).
protection: 'Detects errors on \(d-1\) qubits, corrects errors on \(\left\lfloor (d-1)/2 \right\rfloor\) qubits.'
Encoding is based on two related \hyperref[code:binary_linear]{binary linear codes}, an \([n,k_X,d^\prime_X]\) code \(C_X\) and \([n,k_Z,d^\prime_Z]\) code \(C_Z\), satisfying \(C_X^\perp \subseteq C_Z\). The resulting CSS code has \(k=k_X+k_Z-n\) logical qubits and distance \(d\geq\min\{d^\prime_X,d^\prime_Z\}\). The \(H_X\) (\(H_Z\)) block of \(H\) \eqref{eq:parity} is the parity-check matrix of the code \(C_X\) (\(C_Z\)). The requirement \(C_X^\perp \subseteq C_Z\) guarantees \eqref{eq:comm}.
Basis states for the code are, for \(\gamma \in C_X\),
\begin{align}
|\gamma + C_Z^\perp \rangle = \frac{1}{\sqrt{|C_Z^\perp|}} \sum_{\eta \in C_Z^\perp} |\gamma + \eta\rangle.
\end{align}
A CSS code has \textit{stabilizer weight} \(w\) if the highest weight of any stabilizer generator is \(w\), i.e., any row of \(H_X\) and \(H_Z\) has weight at most \(w\). In the context of comparing weight as well as of determining distances for noise models biased toward \(X\)- or \(Z\)-type errors, an extended notation for \textit{asymmetric} CSS codes is \([[n,k,(d_X,d_Z),w]]\) or \([[n,k,d_X/d_Z,w]]\). The quantity \(\min\{d_X,d_Z\}\) is often called the \textit{worst-case minimum distance}.
\subsection{CSS-to-homology correspondence}
\begin{defterm}{CSS-to-homology correspondence}
\label{topic:CSS-to-homology-correspondence}
CSS codes and their properties can be formulated in terms of homology theory, yielding a powerful correspondence between codes and chain complexes, the primary homological structures.
There exists a many-to-one mapping from size three chain complexes to CSS codes \cite{doi:10.1070/RM1997v052n06ABEH002155,arXiv:quant-ph/0605094,arXiv:1311.0885,arXiv:1802.01520} that allows one to extract code properties from topological features of the complexes. Codes constructed in this manner are sometimes called \textit{homological CSS codes}, but they are equivalent to CSS codes. This mapping of codes to manifolds allows the application of structures from topology to error correction, yielding \hyperref[code:generalized_homological_product]{various QLDPC codes} with favorable properties.
\end{defterm}
A \textit{chain complex} of size three is given by binary vector spaces \(A_2\), \(A_1\), \(A_0\) and binary matrices \(\partial_{i=1,2}\) (called \textit{boundary operators}) \(A_i\) to \(A_{i-1}\) that satisfy \(\partial_1 \partial_2 = 0\). Such a complex is typically denoted as
\begin{align}
A_2 \xrightarrow{\partial_2} A_1 \xrightarrow{\partial_1} A_0~.
\label{eq:chain}
\end{align}
One constructs a CSS code by associating a physical qubit to every basis element of \(A_1\), and defining parity-check matrices \(H_X=\partial_1^T\) and \(H_Z=\partial_2\)). That way, the spaces \(A_0\) and \(A_2\) can be associated with \(X\)-type and \(Z\)-type Pauli operators, respectively, and boundary operators determine the Paulis making up the stabilizer generators. The requirement \(\partial_1 \partial_2 = 0\) guarantees that the \(X\)-stabilizer generators associated with \(H_X\) commute with the \(Z\)-stabilizer generators associated with \(H_Z\).
Usually, the chain complex \eqref{eq:chain} used in the construction comes from the chain complex associated with a cellulation of a manifold. When the manifold is a two-dimensional surface, its entire chain is used. Higher-dimensional manifolds allow for longer chain complexes, and one can use the three largest non-trivial vector spaces in its chain.
# The reverse mapping is as follows \cite{arXiv:1311.0885,arXiv:1807.09783}. Given a CSS code with parity check matrices \(H_X\) and \(H_Z\), let both boundary operators be \(\partial = H_Z^TUH_X\) for an arbitrary invertible matrix \(U\). The fact that the stabilizer generators commute ensures that the boundary operator satisfies \(\partial^2=0\), yielding a chain complex.
# Then, the normalizer of the stabilizers \({\mathsf{N}}(C_X)\) and \({\mathsf{N}}(C_Z)\) is \(\text{Ker}(\partial_2^T)\) and \(\text{Ker}(\partial_1)\), respectively.
# Insert table linking manifold properties to QEC
# condition Then, the code derived from a chain with this boundary operator yields classical codes \(C_X\) and \(C_Z\) with codewords in \(\text{Im}(\partial^T)\) and \(\text{Im}(\partial)\), respectively.

protection: |
Detects errors on \(d-1\) qubits, corrects errors on \(\left\lfloor (d-1)/2 \right\rfloor\) qubits.
Using the relation to chain complexes, the number of encoded logical qubits is equal to the dimension of the first \(\mathbb{Z}_2\)-homology of the chain complex, \(H_1(\partial, \mathbb{Z}_2) = \frac{\text{Ker}(\partial_1)}{\text{Im}(\partial_2)}\). The distance of the CSS code is equal to the minimum of the combinatorial (\(d-1\))-systole of the cellulated \(d\)-dimensional manifold and its dual.
features:
rate: 'For a depolarizing channel with probability \(p\), CSS codes allowing for arbitrarily accurate recovery exist with asymptotic rate \(1-2h(p)\), where \(h\) is the binary entropy function \cite{arxiv:quant-ph/0110143}.'
encoders:
- 'Stabilizer measurement \cite{arxiv:1404.2495}.'
transversal_gates: 'CNOT gates. Self-dual CSS codes admit transversal Clifford gates.'
general_gates:
- 'LDPC CSS code symmetries called \(XZ\)-dualities allow for fold-transversal gates, i.e., transversal gates followed by qubit permutations \cite{arxiv:2202.06647}.'
fault_tolerance:
- 'Steane error correction \cite{arXiv:quant-ph/9611027}.'
- 'Parallel syndrome extraction for distance-three codes can be done fault-tolerantly using one flag qubit \cite{arXiv:2208.00581}.'
code_capacity_threshold:
- 'Bounds on code capacity thresholds for various noise models exist in terms of stabilizer generator weights \cite{arxiv:1208.2317,arxiv:1412.6172}.'
decoders:
- 'Coherent decoders allow for measurement-free error correction \cite{arxiv:2109.00086}. One method is table/multi-control decoding \cite{arXiv:1002.1536}, which scales exponentially with the number of ancillas used in syndrome measurement. Another method, the Ising-based decoder, utilizes the mapping of the effect of the noise to a statistical mechanical model \cite{arxiv:quant-ph/0110143,arXiv:2002.11733} such that the decoding problem maps to preparation of the ground state of an Ising model.'

realizations:
- 'Fully homomorphic encryption \cite{arxiv:1708.09156}.'
- 'Entanglement purification protocols related to quantum key distribution (QKD) \cite{arxiv:quant-ph/0003004}.'

notes:
- 'Introduction to \ref{topic:CSS-to-homology-correspondence} by \href{https://www.youtube.com/watch?v=SeLpWg_8qlc}{M. Hastings}.'
- 'Using linear programming to solve a set of equations and inequalities on weight distribution of a classical self-orthogonal code \(C=(n, 2^n-k)\) and its dual, one can find a \(C\) such that the \([[n,k,d]]\) CSS code constructed using \(C\) and its dual would have rate and distance close to the Singleton bound \cite{arXiv:quant-ph/9608006}.'

- 'Original requirement of \(C_1^\perp \subset C_2\) \cite{arXiv:quant-ph/9512032} has been relaxed to absorb hypergraph product codes.'

relations:
parents:
- code_id: stabilizer
detail: 'Stabilizer generators can be expressed as either only \(X\)-type or only \(Z\)-type.'
# cousins:
# - code_id: binary_linear
# detail: 'Construction uses two related binary linear codes.'
cousins:
- code_id: binary_linear
detail: 'Construction uses two related binary linear codes.'


_meta:
contributors: []
47 changes: 47 additions & 0 deletions test/test_code_yml_features/codes/binary_linear.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#######################################################
## This is a code entry in the error correction zoo. ##
## https://github.com/errorcorrectionzoo ##
#######################################################

code_id: binary_linear
physical: bits
logical: bits

name: 'Linear binary code'
#introduced: ''

description: |
An \((n,2^k,d)\) linear code is denoted as \([n,k]\) or \([n,k,d]\), where \(d\) is the code's distance. Its codewords form a linear subspace, i.e., for any codewords \(x,y\), \(x+y\) is also a codeword. A code that is not linear is called \textit{nonlinear}.
Linear codes can be defined in terms of a \textit{generator matrix} \(G\), whose rows form a basis for the \(k\)-dimensional codespace. Given a message \(x\), the corresponding encoded codeword is \(G^T x\). The generator matrix can be reduced via coordinate permutations to its \textit{standard} or \textit{systematic form} \(G = [I_k~A]\), where \(I_k\) is a \(k\times k\) identity matrix and \(A\) is a \(k \times (n-k)\) binary matrix.
protection: |
Distance \(d\) of a linear code is the number of nonzero entries in the (nonzero) codeword with the smallest such number. Corrects any error set for which no two elements of the set add up to a codeword.
Linear codes admit a \textit{parity check matrix} \(H\), whose columns make up a set of \textit{parity checks}, i.e., a maximal linearly independent set of vectors that are in the kernel of \(G\). It follows that
\begin{align}
G H^{\text{T}} = 0 \mod 2~.
\end{align}
features:
rate: 'A family of linear codes \(C_i = [n_i,k_i,d_i]\) is \textit{asymptotically good} if the asymptotic rate \(\lim_{i\to\infty} k_i/n_i\) and asymptotic distance \(\lim_{i\to\infty} d_i/n_i\) are both positive.'

decoders:
- 'Decoding an arbitary linear binary code is NP-hard \cite{doi:10.1109/TIT.1978.1055873}.'
- 'Slepian''s standard-array decoding \cite{doi:10.1002/j.1538-7305.1960.tb03958.x}.'
# Decoding being NP hard is discussed in Bruss Leuchs

notes:
- 'Tables of bounds and examples of linear codes for various \(n\) and \(k\), extending code tables by A. E. Brouwer \cite{manual:{Andries E. Brouwer, Bounds on linear codes, in: Vera S. Pless and W. Cary Huffman (Eds.), Handbook of Coding Theory, pp. 295-461, Elsevier, 1998.}}, are maintained by M. Grassl at this \href{http://codetables.markus-grassl.de/}{website}.'

# relations:
# parents:
# - code_id: bits_into_bits
# - code_id: linear


# Begin Entry Meta Information
_meta:
contributors:
- name: 'Victor V. Albert'
githubusername: valbert4
2 changes: 2 additions & 0 deletions test/test_code_yml_features/codes/qubits_into_qubits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ description: 'Encodes \(K\)-dimensional Hilbert space into a \(2^n\)-dimensional
# - code_id: code_id4
# detail: 'code_id4 are other codes of similar encoding but with different physical space structures (classical or quantum)'

_meta:
contributors: []
4 changes: 4 additions & 0 deletions test/test_code_yml_features/codes/stabilizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ relations:
# cousins:
# - code_id: hamiltonian
# detail: 'Codespace is the ground-state space of the \textit{code Hamiltonian}, consisting of an equal linear combination of stabilizer generators.'


_meta:
contributors: []
4 changes: 4 additions & 0 deletions test/test_code_yml_features/codes/surface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ relations:
# detail: 'Related by single-qubit Hadamard gates.'
# - code_id: 'color'
# detail: 'Related by geometrically-local Clifford unitaries.'


_meta:
contributors: []
4 changes: 3 additions & 1 deletion test/test_code_yml_features/codes/testcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ code_id: testcode
physical: qubits
logical: qubits

name: 'My Test Code'
name: 'My Test \(x:y\)-Code'
introduced: '\cite{arXiv:1911.00099}'

description: |
Expand Down Expand Up @@ -153,3 +153,5 @@ relations:
- code_id: stabilizer
detail: 'Description of how this code relates to stabilizer codes.\cite{arXiv:1111.0011}'

_meta:
contributors: []

0 comments on commit 9a37d52

Please sign in to comment.