Skip to content

Commit

Permalink
tmp directory is no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonidPryadko committed Jan 12, 2024
1 parent b2145e6 commit ceaa4c7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 36 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ doc/*.css
doc/*.js
auto/*
tmp/*
tmp
/doc/*.aux
/doc/*.bbl
/doc/*.blg
Expand All @@ -36,4 +37,5 @@ tmp/*
/doc/QDistRnd.xml
/doc/title.xml
/doc/manual.lab
/doc/manual.six
/doc/manual.six
/matrices/n5_q3_complex.mtx
3 changes: 2 additions & 1 deletion examples/cyclic.g
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#! codes of length 15 over $GF(8)$, with stabilizer generators of weight 6,
#! by going over 10000 random
#! polynomials of each degree from 4 to 15. It takes just a couple minutes on a
#! typical notebook.
#! typical notebook.
AUTODOC_CreateDirIfMissing("tmp");;
q:=8;; F:=GF(q);; wei:=6;; x:=Indeterminate(F,"x");; n:=15;;
dmax:=0*[1..n]; # record the max degrees for the reference
for deg in [wei-1..n-1] do # polynomial degree
Expand Down
7 changes: 3 additions & 4 deletions examples/examples.g
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ Display(mat);
#! . 2 2 . . . 1 . . 1
d:=DistRandStab(mat,100,1,0 : field:=F,maxav:=20/n);
#! 3
AUTODOC_CreateDirIfMissing("tmp");;
WriteMTXE("tmp/n5_q3_complex.mtx",3,mat,
WriteMTXE("matrices/n5_q3_complex.mtx",3,mat,
"% 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" : field:=F);
#! File tmp/n5_q3_complex.mtx was created
#! File matrices/n5_q3_complex.mtx was created
#! @EndExample

#! Here is the contents of the resulting file which also illustrates
Expand Down Expand Up @@ -66,7 +65,7 @@ WriteMTXE("tmp/n5_q3_complex.mtx",3,mat,
#! Notice that a `pair=2` or `pair=3` matrix is always converted to `pair=1`, i.e., with $2n$
#! intercalated columns $(a_1,b_1,a_2,b_2,\ldots)$.
#! @BeginExample
lis:=ReadMTXE("tmp/n5_q3_complex.mtx");;
lis:=ReadMTXE("matrices/n5_q3_complex.mtx");;
lis[1]; # the field
#! GF(3)
lis[2]; # converted to `pair=1`
Expand Down
23 changes: 0 additions & 23 deletions tmp/n5_q3_complex.mtx

This file was deleted.

13 changes: 6 additions & 7 deletions tst/qdistrnd01.tst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
gap> START_TEST( "qdistrnd01.tst");

# doc/_Chapter_Examples.xml:20-38
# doc/_Chapter_Examples.xml:20-37
gap> q:=3;; F:=GF(q);;
gap> x:=Indeterminate(F,"x");; poly:=One(F)*(1+x^3-x^5-x^6);;
gap> n:=5;;
Expand All @@ -22,15 +22,14 @@ gap> Display(mat);
. 2 2 . . . 1 . . 1
gap> d:=DistRandStab(mat,100,1,0 : field:=F,maxav:=20/n);
3
gap> AUTODOC_CreateDirIfMissing("tmp");;
gap> WriteMTXE("tmp/n5_q3_complex.mtx",3,mat,
gap> WriteMTXE("matrices/n5_q3_complex.mtx",3,mat,
> "% 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" : field:=F);
File tmp/n5_q3_complex.mtx was created
File matrices/n5_q3_complex.mtx was created

# doc/_Chapter_Examples.xml:80-91
gap> lis:=ReadMTXE("tmp/n5_q3_complex.mtx");;
# doc/_Chapter_Examples.xml:79-90
gap> lis:=ReadMTXE("matrices/n5_q3_complex.mtx");;
gap> lis[1]; # the field
GF(3)
gap> lis[2]; # converted to `pair=1`
Expand All @@ -41,7 +40,7 @@ gap> Display(lis[3]);
2 . . . 1 . . 1 . 2
. 2 2 . . . 1 . . 1

# doc/_Chapter_Examples.xml:114-122
# doc/_Chapter_Examples.xml:113-121
gap> filedir:=DirectoriesPackageLibrary("QDistRnd","matrices");;
gap> lisX:=ReadMTXE(Filename(filedir,"QX80.mtx"),0);;
gap> GX:=lisX[3];;
Expand Down

0 comments on commit ceaa4c7

Please sign in to comment.