changed the test bash script to loop over more cases by default
[strong_simulation_gauss_sum_rank.git] / randommultipleinputPaulis.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <time.h>
4
5 // order of matrix elements is [row][column]!!!
6
7 int main( int argc, char *argv[])
8 {
9
10   if(argc != 4) {
11     printf("randommultipleinputPaulis arguments: \"number of qubits\" \"number of T gates\" \"number of Paulis\"\n");
12     exit(0);
13   }
14   
15   int N = atoi(argv[1]);              // number of qubits
16   int T = atoi(argv[2]);              // number of T gate magic states (set to the first 'K' of the 'N' qubits -- the rest are set to the '0' computational basis state)
17   int numPaulis = atoi(argv[3]);
18
19   printf("%d\n", N);
20   //printf("%d\n", T);
21
22   int r;
23   srand((unsigned)time(NULL));
24
25
26   int i, j;
27   
28   for(i=0; i<numPaulis; i++) {
29     
30     //r = rand()%4; printf("%d\n",r); // omega
31     
32     for(j=0; j<N; j++) {
33       r = rand()%4;
34       printf("%d %d %d %d\n", r==0, r==1, r==2, r==3);
35     }
36   }
37
38 }