2 # simple Bash script to check if Gauss sum code works
4 # choose the gauss sum multiple decomposition you want to test
5 gausssumcode=./gausssums_multipleof6
7 # choose the number of qubits and T gates on those qubits
8 # NOTE: numqubits must be a multiple of your gauss sum tensor multiple!
9 # e.g. if you test gausssums_multipleof6 then numqubits=6*n for some integer n
13 numPaulis=1 # we want numPaulis to be 1 for the loop below
17 echo "Starting test of $numruns random Pauli expectation values..."
18 for i in $(seq 1 $numruns)
20 sleep 1;a=$(stdbuf -oL ./randommultipleinputPaulis $numqubits $numTgates $numPaulis > inputPaulis.txt && $gausssumcode < inputPaulis.txt | tail -1)
21 b=$(stdbuf -oL ./hilbertspace_vector < inputPaulis.txt | tail -n1)