From: Lucas K Date: Tue, 22 Dec 2020 20:01:55 +0000 (-0800) Subject: added sample test bash script X-Git-Url: https://s3miclassical.com/gitweb/?a=commitdiff_plain;h=37f88bdd506181d31b29f7b5d0f5eb7cc589e651;p=strong_simulation_gauss_sum_rank.git added sample test bash script --- diff --git a/test.bash b/test.bash new file mode 100644 index 0000000..91cb69e --- /dev/null +++ b/test.bash @@ -0,0 +1,27 @@ +#!/bin/bash +# simple Bash script to check if Gauss sum code works + +# choose the gauss sum multiple decomposition you want to test +gausssumcode=./gausssums_multipleof6 + +# choose the number of qubits and T gates on those qubits +# NOTE: numqubits must be a multiple of your gauss sum tensor multiple! +# e.g. if you test gausssums_multipleof6 then numqubits=6*n for some integer n +numqubits=6 +numTgates=4 + +numPaulis=1 # we want numPaulis to be 1 for the loop below + +for i in $(seq 1 $numruns) +do + sleep 1;a=$(stdbuf -oL ./randommultipleinputPaulis $numqubits $numTgates $numPaulis > inputPaulis.txt && $gausssumcode < inputPaulis.txt | tail -1) + b=$(stdbuf -oL ./hilbertspace_vector < inputPaulis.txt | tail -n1) + echo $i $a $b + if [ "$a" == "$b" ] + then + continue + else + echo "NOT EQUAL!" + break + fi +done