<p>Computes an upper bound on the distance <span class="Math">d_Z</span> of the <span class="Math">q</span>-ary code with stabilizer generator matrices <span class="Math">H_X</span>, <span class="Math">H_Z</span> whose rows are assumed to be orthogonal (<em>orthogonality is not verified</em>). Details of the input parameters</p>
<ul>
<li><p><code class="code">HX</code>, <code class="code">HZ</code>: the input matrices with elements in the Galois <code class="code">field</code> <span class="Math">F</span></p>
</li>
<li><p><code class="code">num</code>: number of information sets to construct (should be large)</p>
</li>
<li><p><code class="code">mindist</code> - the algorithm stops when distance equal or below <code class="code">mindist</code> is found and returns the result with negative sign. Set <code class="code">mindist</code> to 0 if you want the actual distance.</p>
</li>
<li><p><code class="code">maxav</code> (Options stack): if set, terminate when <span class="Math">\langle n\rangle</span>><code class="code">maxav</code>, see Section <a href="chap3.html#X7CCA4B9B834960EE"><span class="RefLink">3.3</span></a>. Not set by default. See Section <a href="chap3.html#X7DDF42DF7D7F87EF"><span class="RefLink">3.1</span></a> for the description of the algorithm.</p>
<p>Computes an upper bound on the distance <span class="Math">d</span> of the <span class="Math">F</span>-linear stabilizer code with generator matrix <span class="Math">G</span> whose rows are assumed to be symplectic-orthogonal, see Section <a href="chap3.html#X7D97C75283D26EE5"><span class="RefLink">3.1-5</span></a> (<em>orthogonality is not verified</em>).</p>
<p>Details of the input parameters:</p>
<ul>
<li><p><code class="code">G</code>: the input matrix with elements in the Galois <code class="code">field</code> <span class="Math">F</span> with <span class="Math">2n</span> columns <span class="Math">(a_1,b_1,a_2,b_2,\ldots,a_n,b_n)</span>. The remaining options are identical to those in the function <code class="code">DistRandCSS</code> <a href="chap4.html#X826856C47F9890F3"><span class="RefLink">4.1</span></a>.</p>
</li>
<li><p><code class="code">num</code>: number of information sets to construct (should be large)</p>
</li>
<li><p><code class="code">mindist</code> - the algorithm stops when distance equal or smaller than <code class="code">mindist</code> is found - set it to 0 if you want the actual distance</p>
</li>
<li><p><code class="code">maxav</code> (Options stack): if set, terminate when <span class="Math">\langle n\rangle</span>><code class="code">maxav</code>, see Section <a href="chap3.html#X7CCA4B9B834960EE"><span class="RefLink">3.3</span></a>. Not set by default.</p>
<p>Here are a few simple examples illustrating the use of distance functions. In all examples, we use functions <code class="code">DistRandCSS</code> and <code class="code">DistRandStab</code> with <code class="code">debug=2</code> to ensure that row orthogonality in the input matrices is verified.</p>
<p>Now, if we set the minimum distance <code class="code">mindist</code> parameter too large, the function terminates immediately after a codeword with such a weight is found; in such a case the result is returned with the negative sign.</p>
<p>The function <code class="code">DistRandStab</code> takes only one matrix. This example uses the same CSS code but written into a single matrix. Notice how the values from the previous example are intercalated with zeros.</p>
<p>Read matrix from an MTX file, an extended version of Matrix Market eXchange coordinate format supporting finite Galois fields and two-block matrices <span class="Math"> (A|B) </span> with columns <span class="Math">A=(a_1, a_2, \ldots , a_n)</span> and <span class="Math">B=(b_1, b_2, \ldots , b_n)</span>, see Chapter <a href="chap5.html#X7D0187B5831B764D"><span class="RefLink">5</span></a>.</p>
<ul>
<li><p><code class="code">FilePath</code> name of existing file storing the matrix</p>
</li>
<li><p><code class="code">pair</code> (optional argument): specifies column ordering; must correlate with the variable <code class="code">type</code> in the file</p>
<ul>
<li><p><code class="code">pair=0</code> for regular single-block matrices (e.g., CSS) <code class="code">type=integer</code> (if <code class="code">pair</code> not specified, <code class="code">pair</code>=0 is set by default for <code class="code">integer</code>)</p>
</li>
<li><p><code class="code">pair=3</code> this is the only option for <code class="code">type=complex</code> with elements specified as "complex" pairs</p>
</li>
</ul>
<p><em>Must</em> match that given in the file (if any). <em>Notice</em>: with <code class="code">pair</code>=1 and <code class="code">pair</code>=2, the number of matrix columns specified in the file must be even, twice the block length of the code. <em>This version of the format is deprecated and should be avoided.</em></p>
<p>1st line of file must read:</p>
<div class="example"><pre>
%%MatrixMarket matrix coordinate `type` general
</pre></div>
<p>with <code class="code">type</code> being either <code class="code">integer</code> or <code class="code">complex</code></p>
<p>Any additional entries in the second line are silently ignored. By default, <span class="Math">\mathop{\rm GF}(2)</span> is assumed; the default can be overriden by the optional <code class="code">field</code> argument. If the field is specified both in the file and by the optional argument, the corresponding values must match. Primitive polynomial (if any) is only checked in the case of an extension field; it is silently ignored for a prime field.</p>
<p>See Chapter <a href="chap5.html#X7D0187B5831B764D"><span class="RefLink">5</span></a> for the details of how the elements of the group are represented depending on whether the field is a prime field (<span class="Math"> q </span> a prime) or an extension field with <span class="Math"> q=p^m </span>, <span class="Math">p</span> prime, and <span class="Math">m>1</span>.</p>
<p>Export a <code class="code">matrix</code> in Extended MatrixMarket format, with options specified by the <code class="code">pair</code> argument.</p>
<ul>
<li><p><code class="code">StrPath</code> - name of the file to be created;</p>
</li>
<li><p><code class="code">pair</code>: parameter to control the file format details, must match the storage <code class="code">type</code> of the matrix.</p>
<ul>
<li><p><code class="code">pair=0</code> for regular matrices (e.g., CSS) with <code class="code">type=integer</code></p>
</li>
<li><p><code class="code">pair=1</code> for intercalated columns <span class="Math"> (a_1, b_1, a_2, b_2, \ldots) </span> with <code class="code">type=integer</code> (<em>deprecated</em>)</p>
</li>
<li><p><code class="code">pair=2</code> for grouped columns with <code class="code">type=integer</code> <em>(this is not supported!)</em></p>
</li>
<li><p><code class="code">pair=3</code> for columns specified in pairs with <code class="code">type=complex</code>.</p>
</li>
</ul>
</li>
<li><p>Columns of the input <code class="code">matrix</code> must be intercalated unless <code class="code">pair=0</code></p>
</li>
<li><p>optional <code class="code">comment</code>: one or more strings (or a single list of strings) to be output after the MTX header line.</p>
</li>
</ul>
<p>The second line specifying the field will be generated automatically <em>only</em> if the GAP Option <code class="code">field</code> is present. As an option, the line can also be entered explicitly as the first line of the comments, e.g., <code class="code">"% Field: GF(256)"</code></p>
<p>See Chapter <a href="chap5.html#X7D0187B5831B764D"><span class="RefLink">5</span></a> for the details of how the elements of the group are represented depending on whether the field is a prime field (<span class="Math"> q </span> a prime) or an extension field with <span class="Math"> q=p^m </span>, <span class="Math"> m>1 </span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_AverageCalc</code>( <var class="Arg">vector</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Calculate the average of the components of a numerical <code class="code">vector</code></p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_SymplVecWeight</code>( <var class="Arg">vector</var>, <var class="Arg">field</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: symplectic weight of a vector</p>
<p>Calculate the symplectic weight of a <code class="code">vector</code> with an even number of entries from the field <code class="code">field</code>. The elements of the pairs are intercalated: <span class="Math">(a_1, b_1, a_2, b_2,\ldots)</span>.</p>
<p><em>Note: the parity of vector <code class="code">length</code> and the format are not verified!!!</em></p>
<p>Aux function to print out the relevant probabilities given the list <code class="code">vector</code> of multiplicities of the codewords found. Additional parameters are <code class="code">n</code>, the code length, and <code class="code">num</code>, the number of repetitions; these are ignored in the present version of the program. See <a href="chap3.html#X7CCA4B9B834960EE"><span class="RefLink">3.3</span></a> for related discussion.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_ParseFieldStr</code>( <var class="Arg">str</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the corresponding Galois field</p>
<p>Parse a string describing a Galois field Supported formats: <code class="code">Z(p)</code>, <code class="code">GF(q)</code>, and <code class="code">GF(q^m)</code>, where <code class="code">p</code> must be a prime, <code class="code">q</code> a prime or a power of a prime, and <code class="code">m</code> a natural integer. No spaces are allowed.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_ParsePolyStr</code>( <var class="Arg">F</var>, <var class="Arg">str</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the corresponding polynomial</p>
<p>Parse string <code class="code">str</code> as a polynomial over the field <code class="code">F</code>. Only characters in "0123456789*+-^x" are allowed in the string. In particular, no spaces are allowed.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_FieldHeaderStr</code>( <var class="Arg">F</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the created header string</p>
<p>Create a header string describing the field <code class="code">F</code> for use in the function <code class="code">WriteMTXE</code>. If <code class="code">F</code> is a prime Galois field, just specify it: For an extension field <span class="Math">\mathop{\rm GF}(p^m)</span> with <span class="Math">p</span> prime and <span class="Math">m>1</span>, also give the primitive polynomial <em>which should not contain any spaces</em>. For example, See Chapter <a href="chap5.html#X7D0187B5831B764D"><span class="RefLink">5</span></a> for details.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_ProcessFieldHeader</code>( <var class="Arg">recs</var>, <var class="Arg">optF</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the list [Field, ConversionDegree, FormatIndex] (plus anything else we may need in the future); the list is to be used as the second parameter in <code class="code">QDR_ProcEntry()</code></p>
<p>Process the field header (second line in the MTXE file format), including the field, PrimitiveP record, and anything else. Supported format options:</p>
<p>Here the records should be separated by one or more spaces; while <code class="code">field</code>, <code class="code">polynomial</code>, and <code class="code">format</code> <em>should not contain any spaces.</em> Any additional records in this line will be silently ignored.</p>
<p>The <code class="code">field</code> option should specify a valid field, <span class="Math">\mathop{\rm GF}(q)</span> or <span class="Math">\mathop{\rm GF}(p^m)</span>, where <span class="Math">q>1</span> should be a power of the prime <span class="Math">p</span>.</p>
<p>The <code class="code">polynomial</code> should be a valid expanded monic polynomial with integer coefficients, with a single independent variable <code class="code">x</code>; it should contain no spaces. An error will be signaled if <code class="code">polynomial</code> is not a valid primitive polynomial of the <code class="code">field</code>. This argument is optional; by default, Conway polynomial will be used.</p>
<p>The optional <code class="code">format</code> string (<em>not implemented</em>) should be "AdditiveInt" (the default for prime fields), "PowerInt" (the default for extension fields with <spanclass="Math">m>1</span>) or "VectorInt".</p>
<p><code class="code">AdditiveInt</code> indicates that values listed are expected to be in the corresponding prime field and should be interpreted as integers mod <span class="Math">p</span>. <code class="code">PowerInt</code> indicates that field elements are represented as integers powers of the primitive element, root of the primitive polynomial, or <span class="Math">-1</span> for the zero field element. <code class="code">VectorInt</code> corresponds to encoding coefficients of a degree-<span class="Math">(m-1)</span> <span class="Math">p</span>-ary polynomial representing field elements into a <span class="Math">p</span>-ary integer. In this notation, any negative value will be taken mod <span class="Math">p</span>, thus <span class="Math">-1</span> will be interpreted as <span class="Math">p-1</span>, the additive inverse of the field <span class="Math">1</span>.</p>
<p>On input, <code class="code">recs</code> should contain a list of tokens obtained by splitting the field record line; <code class="code">optF</code> should be assigned to <code class="code">ValueOption("field")</code> or <code class="code">fail</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_ProcEntry</code>( <var class="Arg">str</var>, <var class="Arg">fmt</var>, <var class="Arg">FileName</var>, <var class="Arg">LineNo</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the converted field element</p>
<p>Convert a string entry which should represent an integer to the Galois Field element as specified in the <code class="code">fmt</code>.</p>
<ul>
<li><p><code class="code">str</code> is the string representing an integer.</p>
</li>
<li><p><code class="code">fmt</code> is a list [Field, ConversionDegree, FormatIndex]</p>
<ul>
<li><p><code class="code">Field</code> is the Galois field <span class="Math">\mathop{\rm GF}(p^m)</span> of the code</p>
</li>
<li><p><code class="code">ConversionDegree</code> <span class="Math">c</span> : every element <span class="Math">x</span> read is replaces with <span class="Math">x^c</span>. This may be needed if a non-standard primitive polynomial is used to define the field.</p>
</li>
<li><p><code class="code">FormatIndex</code> in {0,1,2}. <code class="code">0</code> indicates no conversion (just a modular integer). <code class="code">1</code> indicates that the integer represents a power of the primitive element, or <span class="Math">-1</span> for 0. <code class="code">2</code> indicates that the integer encodes coordinates of a length <span class="Math">m</span> vector as the digits of a <span class="Math">p</span>-ary integer (<em>not yet implemented</em>).</p>
</li>
</ul>
</li>
<li><p><code class="code">FileName</code>, <code class="code">LineNo</code> are the line number and the name of the input file; these are used to signal an error.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ QDR_DoCirc</code>( <var class="Arg">poly</var>, <var class="Arg">m</var>, <var class="Arg">n</var>, <var class="Arg">field</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="code">m</code> by <code class="code">2*n</code> circulant matrix constructed from the polynomial coefficients</p>
<p>Given the polynomial <code class="code">poly</code> <span class="Math">a_0+b_0 x+a_1x^2+b_1x^3 +\ldots</span> with coefficients from the field <code class="code">F</code>, constructs the corresponding <code class="code">m</code> by 2<code class="code">n</code> double circulant matrix obtained by <code class="code">m</code> repeated cyclic shifts of the coefficients' vector by s=2 positions at a time.
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.