From 45e248515604253115ea9bc73a522b729de32056 Mon Sep 17 00:00:00 2001 From: LeonidPryadko <63686094+LeonidPryadko@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:32:56 -0800 Subject: [PATCH] ReadMTXE bug and metadata issues fixed (#45) * added CloseStream() in ReadMTXE() * updated PackageInfo.g * fixed a bug -- all examples work correctly * empty space fixed --- CITATION.cff | 4 ++-- PackageInfo.g | 4 ++-- README.md | 2 +- lib/qdistrnd.g | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 1da0d41..eac3015 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,8 +9,8 @@ authors: - family-names: Kozin given-names: "V. K." title: "QDistRnd: Calculate the distance of a q-ary quantum stabilizer code" -version: v0.9.3 -date-released: 2024-02-06 +version: v0.9.5 +date-released: 2024-11-20 repository-code: "https://github.com/QEC-pages/QDistRnd" url: "https://QEC-pages.github.io/QDistRnd/" keywords: diff --git a/PackageInfo.g b/PackageInfo.g index 1703f20..74de160 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -16,8 +16,8 @@ SetPackageInfo( rec( PackageName := "QDistRnd", Subtitle := "Calculate the distance of a q-ary quantum stabilizer code", - Version := "0.9.4", - Date := "23/02/2024", + Version := "0.9.5", + Date := "20/11/2024", License := "GPL-2.0-or-later", PackageWWWHome := "https://QEC-pages.github.io/QDistRnd", SourceRepository := diff --git a/README.md b/README.md index 038eae4..e36e7b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # `GAP` package `QDistRnd` The `GAP` package for calculating the distance of a $q$-ary quantum -stabilizer code. +stabilizer code [![DOI](https://joss.theoj.org/papers/10.21105/joss.04120/status.svg)](https://doi.org/10.21105/joss.04120) diff --git a/lib/qdistrnd.g b/lib/qdistrnd.g index f31aa1c..2cbd18c 100644 --- a/lib/qdistrnd.g +++ b/lib/qdistrnd.g @@ -465,7 +465,7 @@ BindGlobal("QDR_ProcEntry", #DeclareGlobalFunction("ReadMTXE"); BindGlobal("ReadMTXE", function(StrPath, opt... ) # supported option: "field" - local input, data, fmt, line, pair, F, rowsG, colsG, G, G1, i, + local input, data, fmt, line, pair, F, rowsG, colsG, G, G1, i, infile, iCommentStart,iComment; # local variables: # input - file converted to a string @@ -483,7 +483,9 @@ BindGlobal("ReadMTXE", # i - dummy for "for" loop # iCommentStart, iComment - range of line numbers for comment section - input := ReadAll(InputTextFile(StrPath));; # read the file in + infile := InputTextFile(StrPath); + input := ReadAll(infile);; # read the file in + CloseStream(infile); data := SplitString(input, "\n");; # separate into lines line := SplitString(data[1], " ");; # separate into records