<p>A few simple examples illustrating the use of the package. For more information see Chapter <a href="chap4.html#X7C6522597D7E72FE"><span class="RefLink">4</span></a></p>
<p>In this example, we generate the matrix of the 5-qubit code over GF(3) with the stabilizer group generated by cyclic shifts of the operator <span class="Math">X_0Z_1 \bar Z_2 \bar X_3</span> which corresponds to the polynomial <span class="Math">h(x)=1+x^3-x^5-x^6</span> (a factor <span class="Math">X_i^a</span> corresponds to a monomial <span class="Math">a x^{2i}</span>, and a factor <span class="Math">Z_i^b</span> to a monomial <span class="Math">b x^{2i+1}</span>), calculate the distance, save into a file using the function <code class="code">WriteMTXE()</code>, and read the file back in using the function <code class="code">ReadMTXE()</code>.</p>
<p>The function <code class="code">WriteMTXE()</code> takes several arguments which specify the details of the output file format and the optional comments, see Section <a href="chap4.html#X7E4EA2B38128F66B"><span class="RefLink">4.2</span></a> for the details. These ensure that all information about the code is written into the file, so that for reading with the function <code class="code">ReadMTXE()</code> only the file name is needed. Output is a list: <code class="code">[field,pair,matrix,(list of comments)]</code>, where the <code class="code">pair</code> parameter describes the ordering of columns in the matrix, see <a href="chap5.html#X7D0187B5831B764D"><spanclass="RefLink">5</span></a>. Notice that a <code class="code">pair=2</code> or <code class="code">pair=3</code> matrix is always converted to <code class="code">pair=1</code>, i.e., with <span class="Math">2n</span> intercalated columns <span class="Math">(a_1,b_1,a_2,b_2,\ldots)</span>. The remaining portion is the list of comments. Notice that the 1st and the last comment lines have been added automatically.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">lis[4];</span>
[ "% Field: GF(3)", "% The 5-qubit code [[5,1,3]]_3", "% Generated from h(x)=1+x^3-x^5-x^6", "% Example from the QDistRnd GAP package", "% Values Z(3) are given" ]
</pre></div>
<p>Here is the contents of the created file which illustrates the <code class="code">coordinate complex</code> data format. Here a pair <span class="Math">(a_{i,j},b_{i,j})</span> in row <span class="Math">i</span> and column <span class="Math">j</span> is written as a row of 4 integers, "ija_{i,j}b_{i,j}", e.g., "1 2 0 1" for the second entry in the 1st row, so that the matrix in the file has <span class="Math">n</span> columns, each containing a pair of integers.</p>
<h4>2.2 <span class="Heading">Hyperbolic codes from a file</span></h4>
<p>Here we read two CSS matrices from two different files which correspond to a hyperbolic code <span class="Math">[[80,18,5]]</span> with row weight <span class="Math">w=5</span> and the asymptotic rate <span class="Math">1/5</span>. Notice that <code class="code">pair=0</code> is used for both files (regular matrices).</p>
<p>Here are the matrices for a much bigger hyperbolic code <span class="Math">[[900,182,8]]</span> from the same family. Note that the distance here scales only logarithmically with the code length (this code takes about 15 seconds on a typical notebook and will not actually be executed).</p>
<p>As a final and hopefully somewhat useful example, the file "examples/cyclic.g" contains a piece of code searching for random one-generator cyclic codes of length <span class="Math">n:=15</span> over the field <span class="Math">\mathop{\rm GF}(8)</span>, and generator weight <code class="code">wei:=6</code>. Note how the <code class="code">mindist</code> parameter and the option <code class="code">maxav</code> are used to speed up the calculation.</p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.