From 2bcc6f0ade1d894dcb6fd0122911fdd41fe459a6 Mon Sep 17 00:00:00 2001 From: Lucas K Date: Tue, 22 Dec 2020 15:38:49 -0800 Subject: [PATCH] fixed typos in test scripts with bimsign --- test.bash | 3 ++- test2.bash | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test.bash b/test.bash index cc380ed..243d099 100644 --- a/test.bash +++ b/test.bash @@ -16,7 +16,8 @@ do sleep 1;a=$(stdbuf -oL ./randominputPauli $numqubits $numTgates > inputfullPauli.txt && ./strongsim < inputfullPauli.txt | tail -1) b=$(stdbuf -oL ./multipauli < inputfullPauli.txt | tail -n1) are=$(echo "$a" | cut -f 1 -d " " | cut -c 1-5); -aim=$(echo "$a" | cut -f 3 -d " " | cut -c 1-5); aimsign=$(echo $a | cut -f 2 -d " "); bimsign=$(echo $a | cut -f 2 -d " "); +aim=$(echo "$a" | cut -f 3 -d " " | cut -c 1-5); aimsign=$(echo $a | cut -f 2 -d " "); bimsign=$(echo $b | cut -f 2 -d " "); +echo $aimsign; bre=$(echo "$b" | cut -f 1 -d " " | cut -c 1-5); bim=$(echo "$b" | cut -f 3 -d " " | cut -c 1-5); echo "$i: $are $aimsign $aim and $bre $bimsign $bim" if [ "$are" == "$bre" ] && [ "$aim" == "$bim" ] && [ "$aimsign" == "$bimsign" ] diff --git a/test2.bash b/test2.bash index d5ed868..281422b 100644 --- a/test2.bash +++ b/test2.bash @@ -26,7 +26,7 @@ do sleep 1; a=$(stdbuf -oL ./randominputcommutingHermitianPauli2 $numqubits $numTgates $numPaulis > inputPauli.txt && ./strongsim_relerr $numsamples < inputPauli.txt | tail -1) b=$(stdbuf -oL ./multipauli < inputPauli.txt | tail -n1) are=$(echo "$a" | cut -f 1 -d " " | cut -c 1-5); -aim=$(echo "$a" | cut -f 3 -d " " | cut -c 1-5); aimsign=$(echo $a | cut -f 2 -d " "); bimsign=$(echo $a | cut -f 2 -d " "); +aim=$(echo "$a" | cut -f 3 -d " " | cut -c 1-5); aimsign=$(echo $a | cut -f 2 -d " "); bimsign=$(echo $b | cut -f 2 -d " "); bre=$(echo "$b" | cut -f 1 -d " " | cut -c 1-5); bim=$(echo "$b" | cut -f 3 -d " " | cut -c 1-5); echo "$i: $are $aimsign $aim and $bre $bimsign $bim" rediff=$( printf 'sqrt((%f - %f)^2)\n' "$are" "$bre" | bc -l ) -- 2.30.2