#! /bin/sh # # Grover with non-resonant pulse error export GDFONTPATH="/usr/share/fonts/open-sans" export GNUPLOT_DEFAULT_GDFONT="OpenSans-Semibold" n=16 iter=300 m=1234 xlabel="Number of iterations" ylabel="Probability of match" for ra in 0.05 0.1 do gif="Grover-ra+$ra" out="${gif}.out" title="Grover's Search, 2**$n, ra=$ra, m=$m" labels="set yrange [0:1]\nset title \"$title\"\nset xlabel \"$xlabel\"\nset ylabel \"$ylabel\"" ./Grover -e $n $iter $ra $m > "$out" tail -n +2 "$out" | (printf "set term gif\nset output\n $labels\n plot '-' notitle with linespoints\n"; cat) | gnuplot > "${gif}.gif" done