text: #include "QuEST.h"
  #include "mytimer.hpp"
  #include "stdio.h"
  
  int main(int narg, char *argv[]) {
      QuESTEnv Env = createQuESTEnv();
      Qureg q = createQureg(33, Env);
  
      float q_measure[33];
      controlledPauliY(q, 31, 32);
      pauliX(q, 23);
      tGate(q, 30);
      rotateZ(q, 14, 4.741863154061436);
      pauliY(q, 12);
      controlledPauliY(q, 30, 32);
      controlledRotateY(q, 13, 3, 5.080496832665722);
      controlledRotateZ(q, 11, 7, 4.025781094994451);
      controlledPauliY(q, 2, 15);
      tGate(q, 29);
      rotateZ(q, 3, 5.463947706727803);
      phaseShift(q, 31, 2.242266386274553);
      phaseShift(q, 31, 3.816964617277979);
      rotateY(q, 23, 1.6973863131098113);
      controlledRotateX(q, 27, 6, 1.47226737805801);
      controlledPauliY(q, 4, 30);
      pauliY(q, 27);
      controlledRotateX(q, 24, 27, 2.3305072364531463);
      sGate(q, 28);
      sGate(q, 7);
      pauliX(q, 15);
      controlledRotateZ(q, 4, 0, 0.26760871320851604);
      rotateX(q, 27, 1.5041099363701464);
      pauliY(q, 17);
      rotateY(q, 4, 1.9361289703664828);
      rotateY(q, 13, 3.6768279784811813);
      hadamard(q, 13);
      pauliZ(q, 25);
      controlledNot(q, 1, 19);
      tGate(q, 3);
      pauliZ(q, 10);
      rotateY(q, 23, 1.0452953968837855);
      pauliX(q, 15);
      controlledPauliY(q, 0, 26);
      controlledRotateY(q, 8, 15, 0.9527815000291433);
      tGate(q, 6);
      sGate(q, 9);
      tGate(q, 4);
      hadamard(q, 23);
      controlledRotateY(q, 32, 14, 3.667232305611699);
      pauliY(q, 3);
      controlledRotateZ(q, 9, 2, 3.3667024793318294);
      pauliX(q, 23);
      rotateZ(q, 22, 2.2807573922881064);
      pauliY(q, 6);
      hadamard(q, 29);
      rotateX(q, 3, 3.1019508942032346);
      pauliY(q, 28);
      controlledRotateX(q, 29, 25, 4.6938891498585065);
      pauliX(q, 32);
      hadamard(q, 1);
      controlledRotateX(q, 14, 15, 3.345848759713809);
      pauliZ(q, 6);
      controlledPauliY(q, 27, 30);
      rotateX(q, 26, 3.2711510387190508);
      hadamard(q, 6);
      rotateY(q, 24, 0.8743581387102841);
      controlledRotateZ(q, 10, 15, 2.8279912651818297);
      tGate(q, 29);
      phaseShift(q, 15, 4.628808973353935);
      hadamard(q, 25);
      pauliX(q, 12);
      rotateY(q, 1, 3.842683264040723);
      rotateY(q, 5, 2.4643238560454868);
      sGate(q, 10);
      pauliZ(q, 25);
      pauliY(q, 4);
      pauliZ(q, 7);
      controlledRotateX(q, 3, 19, 2.0816547739062403);
      controlledNot(q, 11, 17);
      hadamard(q, 1);
      controlledRotateX(q, 3, 30, 4.928439668937386);
      phaseShift(q, 11, 4.825877354608869);
      controlledPauliY(q, 3, 2);
      sGate(q, 24);
      pauliX(q, 7);
      pauliY(q, 10);
      controlledRotateX(q, 6, 30, 2.9475664848837724);
      hadamard(q, 18);
      pauliX(q, 9);
      pauliY(q, 30);
      controlledRotateZ(q, 2, 19, 4.777106137385421);
      pauliX(q, 6);
      rotateY(q, 1, 1.774098913025421);
      pauliZ(q, 8);
      pauliZ(q, 4);
      controlledNot(q, 21, 30);
      hadamard(q, 16);
      hadamard(q, 5);
      pauliZ(q, 27);
      phaseShift(q, 20, 3.8958932106576767);
      rotateZ(q, 13, 2.027299038851915);
      pauliZ(q, 31);
      controlledRotateX(q, 20, 23, 4.687279413835048);
      controlledRotateX(q, 32, 12, 0.7616664328762393);
      rotateX(q, 24, 3.936109579478634);
      pauliX(q, 26);
      tGate(q, 2);
      phaseShift(q, 26, 1.6905065316340107);
      controlledNot(q, 25, 24);
      tGate(q, 5);
      controlledNot(q, 28, 15);
      controlledRotateX(q, 14, 17, 3.399909718199469);
      controlledPauliY(q, 5, 29);
      pauliX(q, 24);
      controlledPauliY(q, 26, 3);
      controlledRotateZ(q, 15, 31, 5.682739003907175);
      controlledRotateZ(q, 22, 29, 5.46575949506897);
      controlledNot(q, 22, 4);
      tGate(q, 25);
      pauliX(q, 12);
      controlledNot(q, 7, 11);
      controlledPauliY(q, 17, 23);
      rotateZ(q, 27, 1.1911275617572394);
      pauliX(q, 19);
      rotateY(q, 10, 0.17574198560288334);
      controlledRotateZ(q, 11, 1, 5.526077671846222);
      tGate(q, 25);
      pauliX(q, 10);
      controlledRotateZ(q, 25, 16, 0.12158755597103743);
      tGate(q, 27);
      phaseShift(q, 14, 1.4399904077745678);
      controlledNot(q, 29, 30);
      rotateX(q, 32, 4.631141667795198);
      controlledPauliY(q, 13, 28);
      controlledRotateX(q, 19, 31, 1.5813792137579403);
      pauliX(q, 4);
      phaseShift(q, 20, 3.5333869453051787);
      pauliZ(q, 7);
      rotateY(q, 5, 0.3813076376470126);
      phaseShift(q, 18, 4.887055092982964);
      hadamard(q, 0);
      hadamard(q, 12);
      hadamard(q, 13);
      rotateZ(q, 16, 1.484771156669343);
      controlledRotateY(q, 15, 12, 5.326342207746474);
      pauliZ(q, 3);
      pauliX(q, 2);
      sGate(q, 16);
      rotateY(q, 31, 5.780748528240094);
      hadamard(q, 1);
      rotateZ(q, 0, 1.4280977294665294);
      controlledNot(q, 16, 30);
      rotateX(q, 31, 3.4635233574985658);
      rotateY(q, 4, 4.959254032812934);
      controlledRotateY(q, 5, 16, 2.484427773302659);
      controlledPauliY(q, 3, 19);
      pauliZ(q, 11);
      tGate(q, 4);
      controlledRotateY(q, 25, 13, 2.2571120346699556);
      controlledRotateX(q, 32, 25, 1.5083358246649858);
      controlledRotateY(q, 26, 28, 4.806465925120054);
      controlledPauliY(q, 20, 15);
      pauliY(q, 5);
      rotateY(q, 7, 4.766500207603543);
      rotateY(q, 30, 4.835754277463226);
      pauliY(q, 17);
      pauliY(q, 14);
      pauliY(q, 8);
      controlledRotateY(q, 29, 10, 0.48478305363773533);
      controlledPauliY(q, 10, 25);
      rotateZ(q, 13, 1.3151103327788776);
      rotateZ(q, 3, 5.838494908524898);
      controlledRotateZ(q, 26, 1, 4.636774719049697);
      rotateZ(q, 21, 1.5056428940243067);
      controlledRotateZ(q, 5, 18, 4.782936404757397);
      pauliY(q, 18);
      controlledRotateZ(q, 20, 15, 5.738556592932173);
      rotateY(q, 19, 4.53901235159522);
      sGate(q, 20);
      controlledNot(q, 31, 25);
      rotateZ(q, 13, 2.872517815344521);
      pauliZ(q, 24);
      pauliZ(q, 28);
      controlledRotateZ(q, 16, 27, 2.4100755360821724);
      pauliX(q, 31);
      pauliX(q, 13);
      hadamard(q, 31);
      sGate(q, 25);
      phaseShift(q, 1, 1.173729751281703);
      pauliY(q, 11);
      controlledNot(q, 2, 1);
      hadamard(q, 31);
      controlledRotateY(q, 8, 29, 4.436733590852604);
      pauliZ(q, 13);
      pauliX(q, 22);
      rotateZ(q, 5, 0.5355457609783343);
      controlledPauliY(q, 17, 29);
      pauliZ(q, 0);
      pauliZ(q, 13);
      pauliX(q, 22);
      controlledRotateX(q, 22, 2, 3.399763076049582);
      controlledRotateY(q, 0, 24, 2.8881259675758115);
      controlledRotateX(q, 14, 1, 4.4364974692435055);
      controlledPauliY(q, 17, 20);
      hadamard(q, 14);
      pauliY(q, 4);
      phaseShift(q, 20, 2.5694761359710028);
      controlledRotateX(q, 10, 3, 3.95833965857872);
      tGate(q, 26);
      pauliZ(q, 23);
      hadamard(q, 31);
      pauliX(q, 0);
      pauliZ(q, 27);
      pauliX(q, 9);
      hadamard(q, 24);
      pauliY(q, 16);
      controlledRotateY(q, 31, 14, 3.2599558483057915);
      hadamard(q, 4);
      pauliX(q, 3);
      controlledPauliY(q, 17, 1);
      hadamard(q, 6);
      sGate(q, 29);
      pauliY(q, 22);
      controlledNot(q, 8, 14);
      controlledRotateY(q, 32, 28, 4.716516275703488);
      controlledRotateX(q, 29, 17, 4.9562295225975195);
      rotateY(q, 25, 4.658843799516009);
      tGate(q, 31);
      controlledRotateX(q, 12, 30, 2.978571543351169);
      rotateX(q, 19, 5.688578903769978);
      pauliZ(q, 21);
      phaseShift(q, 32, 1.844944471296283);
      controlledRotateY(q, 4, 30, 2.382731440476623);
      controlledRotateZ(q, 6, 26, 5.884107957026733);
      rotateX(q, 5, 0.9715108877464226);
      controlledRotateY(q, 29, 5, 1.2160206192930747);
      rotateY(q, 18, 1.2185121753153885);
      controlledRotateZ(q, 19, 6, 2.9049126539764365);
      controlledPauliY(q, 7, 0);
      controlledRotateZ(q, 23, 17, 3.0288285602849623);
      rotateZ(q, 1, 5.6448945948838);
      controlledRotateX(q, 21, 10, 0.17669469841005955);
      pauliY(q, 28);
      pauliX(q, 17);
      controlledPauliY(q, 20, 14);
      tGate(q, 4);
      rotateX(q, 6, 3.472255766169454);
      pauliX(q, 0);
      sGate(q, 17);
      rotateY(q, 28, 0.9696685759865102);
      controlledRotateZ(q, 13, 6, 2.960479385568648);
      hadamard(q, 9);
      rotateZ(q, 19, 3.3522313027283146);
      phaseShift(q, 29, 1.8369975651676056);
      rotateY(q, 27, 2.2951986499779924);
      pauliZ(q, 14);
      pauliX(q, 4);
      rotateZ(q, 4, 4.136261776945703);
      rotateY(q, 17, 4.976946874117223);
      controlledNot(q, 6, 23);
      hadamard(q, 18);
      sGate(q, 9);
      phaseShift(q, 19, 0.9249748602407083);
      controlledPauliY(q, 26, 32);
      hadamard(q, 7);
      pauliZ(q, 1);
      phaseShift(q, 3, 1.2435737437391896);
      pauliY(q, 29);
      rotateY(q, 13, 0.3324581886450707);
      controlledPauliY(q, 10, 4);
      controlledRotateX(q, 23, 30, 0.6356899866497376);
      rotateZ(q, 7, 1.3001306408544164);
      pauliY(q, 28);
      controlledRotateX(q, 9, 17, 2.9777993283108);
      sGate(q, 2);
      pauliX(q, 19);
      pauliX(q, 10);
      rotateX(q, 24, 4.899752138230432);
      controlledRotateZ(q, 21, 30, 2.6033022009850026);
      rotateY(q, 13, 3.0543848532885534);
      controlledNot(q, 20, 26);
      controlledNot(q, 8, 10);
      controlledRotateX(q, 3, 24, 4.500503989535253);
      phaseShift(q, 12, 2.2793132309238717);
      pauliX(q, 20);
      rotateY(q, 9, 3.6754852272231);
      controlledNot(q, 32, 6);
      controlledRotateY(q, 2, 10, 5.072075370712308);
      pauliZ(q, 10);
      rotateY(q, 7, 4.583723025221103);
      rotateX(q, 3, 0.7736232811475885);
      hadamard(q, 15);
      controlledRotateX(q, 21, 16, 4.581146829859615);
      hadamard(q, 32);
      rotateX(q, 4, 0.5368382384577575);
      rotateY(q, 22, 5.359793848887986);
      pauliX(q, 1);
      pauliX(q, 12);
      hadamard(q, 13);
      pauliY(q, 19);
      rotateZ(q, 6, 3.5638510518486224);
      controlledNot(q, 17, 20);
      pauliZ(q, 9);
      rotateY(q, 15, 3.65690703614329);
      pauliX(q, 2);
      phaseShift(q, 30, 0.9416699024455746);
      tGate(q, 22);
      controlledRotateX(q, 29, 3, 0.48025525278208014);
      controlledRotateY(q, 20, 23, 3.210917002308899);
      controlledPauliY(q, 22, 26);
      controlledRotateZ(q, 2, 11, 5.231014624135211);
      controlledNot(q, 27, 18);
      pauliZ(q, 0);
      rotateY(q, 32, 3.995398779899738);
      rotateZ(q, 2, 1.8312161249543941);
      controlledNot(q, 21, 25);
      phaseShift(q, 12, 2.1881819279693895);
      controlledPauliY(q, 28, 19);
      controlledPauliY(q, 4, 1);
      pauliX(q, 27);
      sGate(q, 12);
      rotateZ(q, 17, 0.663881334176326);
      tGate(q, 16);
      controlledRotateX(q, 4, 28, 2.031094983755886);
      phaseShift(q, 21, 3.5896330948492676);
      rotateY(q, 5, 3.4339137879115706);
      sGate(q, 15);
      controlledRotateY(q, 0, 31, 2.768220803909781);
      controlledPauliY(q, 13, 24);
      controlledRotateZ(q, 7, 30, 4.2279672457916355);
      rotateX(q, 29, 0.995441907745563);
      controlledNot(q, 23, 16);
      pauliX(q, 2);
      controlledRotateY(q, 18, 25, 0.7460461032703112);
      sGate(q, 10);
      hadamard(q, 13);
      rotateY(q, 3, 4.65747841442577);
      rotateX(q, 20, 2.0462524168175946);
      rotateX(q, 10, 0.8849846148392773);
      controlledRotateZ(q, 20, 30, 5.313753238731082);
      controlledNot(q, 16, 10);
      pauliY(q, 13);
      hadamard(q, 8);
      pauliZ(q, 31);
      phaseShift(q, 29, 0.9154092965192908);
      sGate(q, 9);
      rotateY(q, 0, 5.119416348252456);
      pauliX(q, 14);
      phaseShift(q, 26, 2.1284081493986657);
      controlledNot(q, 17, 13);
      phaseShift(q, 15, 4.78305698170845);
      sGate(q, 29);
      rotateY(q, 32, 5.219897071802317);
      tGate(q, 24);
      pauliY(q, 24);
      controlledNot(q, 0, 1);
      pauliX(q, 17);
      controlledRotateX(q, 18, 3, 1.0645817046256514);
      sGate(q, 20);
      pauliZ(q, 7);
      controlledNot(q, 7, 22);
      tGate(q, 28);
      controlledNot(q, 27, 5);
      controlledRotateZ(q, 12, 6, 3.8186934522154763);
      hadamard(q, 29);
      controlledPauliY(q, 22, 31);
      controlledRotateY(q, 6, 12, 2.3262332572449664);
      rotateZ(q, 13, 0.29295999528370026);
      rotateY(q, 30, 4.360875766354395);
      rotateX(q, 32, 1.6501933757599143);
      phaseShift(q, 6, 3.5467426324927005);
      rotateX(q, 5, 0.3853392048836789);
      hadamard(q, 19);
      sGate(q, 12);
      controlledRotateY(q, 21, 25, 4.511201251253343);
      rotateX(q, 5, 2.473424003709387);
      controlledPauliY(q, 16, 26);
      controlledRotateX(q, 4, 6, 3.5893088700461058);
      controlledRotateZ(q, 26, 21, 1.6015201969524226);
      controlledNot(q, 25, 20);
      phaseShift(q, 17, 3.7666126058703364);
      controlledRotateY(q, 18, 26, 5.615311550948332);
      rotateY(q, 16, 1.4109136679254717);
      pauliX(q, 16);
      controlledPauliY(q, 6, 25);
      rotateX(q, 24, 5.674906473008747);
      sGate(q, 12);
      controlledNot(q, 5, 0);
      rotateX(q, 10, 5.829721647173525);
      phaseShift(q, 17, 5.548790327518721);
      controlledRotateX(q, 20, 14, 4.40596622459104);
      phaseShift(q, 2, 0.6762574842177062);
      controlledNot(q, 22, 0);
      controlledPauliY(q, 5, 24);
      phaseShift(q, 13, 1.0137231920905438);
      tGate(q, 13);
      controlledRotateZ(q, 11, 17, 4.612058200002244);
      hadamard(q, 3);
      rotateZ(q, 14, 1.1267525089211876);
      hadamard(q, 25);
      pauliZ(q, 15);
      tGate(q, 29);
      tGate(q, 30);
      phaseShift(q, 12, 5.345557665559709);
      controlledPauliY(q, 8, 19);
      controlledPauliY(q, 0, 16);
      controlledNot(q, 10, 32);
      pauliY(q, 18);
      rotateX(q, 16, 0.9633222221662588);
      rotateX(q, 31, 1.1971914709161116);
      pauliZ(q, 17);
      pauliY(q, 0);
      pauliX(q, 24);
      rotateY(q, 0, 0.7280511286513471);
      pauliX(q, 14);
      sGate(q, 10);
      controlledRotateX(q, 32, 23, 0.7118069867592297);
      controlledPauliY(q, 26, 15);
      hadamard(q, 8);
      controlledRotateZ(q, 4, 19, 2.82491756498347);
      pauliX(q, 4);
      controlledPauliY(q, 10, 11);
      controlledRotateY(q, 30, 19, 3.949643879086028);
      rotateX(q, 27, 0.3029359224621259);
      controlledRotateX(q, 3, 11, 4.431087303293256);
      pauliY(q, 0);
      sGate(q, 30);
      controlledRotateZ(q, 28, 23, 2.593640522787645);
      hadamard(q, 12);
      pauliX(q, 30);
      controlledPauliY(q, 26, 30);
      hadamard(q, 21);
      rotateZ(q, 20, 5.816539449909142);
      phaseShift(q, 26, 3.272350652210076);
      controlledRotateX(q, 30, 19, 0.9887693599277761);
      pauliZ(q, 2);
      rotateY(q, 26, 3.933771607148637);
      phaseShift(q, 26, 5.572811743511273);
      sGate(q, 26);
      controlledRotateX(q, 26, 8, 1.9416507779863434);
      controlledPauliY(q, 1, 10);
      controlledRotateX(q, 5, 24, 3.2127793953046813);
      controlledNot(q, 9, 11);
      pauliZ(q, 15);
      controlledRotateX(q, 9, 2, 3.9567742852131578);
      rotateX(q, 17, 2.060012599982144);
      controlledRotateX(q, 13, 7, 3.417938722832165);
      tGate(q, 18);
      pauliX(q, 26);
      tGate(q, 1);
      pauliZ(q, 19);
      phaseShift(q, 7, 5.291655588062317);
      hadamard(q, 13);
      rotateY(q, 28, 4.174495533289407);
      pauliZ(q, 20);
      tGate(q, 4);
      phaseShift(q, 24, 2.2046388233921372);
      sGate(q, 18);
      pauliX(q, 14);
      sGate(q, 29);
      controlledPauliY(q, 6, 15);
      controlledNot(q, 27, 6);
      controlledPauliY(q, 1, 31);
      controlledRotateY(q, 16, 10, 1.7792605436378477);
      tGate(q, 31);
      controlledRotateX(q, 15, 10, 2.0285176036029795);
      controlledNot(q, 21, 8);
      rotateY(q, 8, 0.9768980641466862);
      controlledPauliY(q, 28, 22);
      controlledPauliY(q, 16, 2);
      controlledRotateZ(q, 13, 31, 3.0615553909471);
      controlledRotateZ(q, 25, 11, 0.7658964188818985);
      controlledRotateY(q, 32, 23, 4.296761191150795);
      rotateZ(q, 31, 4.684787842954595);
      pauliY(q, 10);
      rotateY(q, 28, 3.431684832393438);
      tGate(q, 32);
      hadamard(q, 18);
      pauliZ(q, 29);
      controlledRotateZ(q, 22, 10, 4.555612568355712);
      hadamard(q, 22);
      controlledRotateX(q, 28, 30, 0.49559444174494294);
      pauliX(q, 10);
      rotateY(q, 23, 2.7734312729654964);
      pauliZ(q, 22);
      controlledRotateZ(q, 29, 31, 5.231912249367541);
      pauliY(q, 22);
      sGate(q, 17);
      sGate(q, 18);
      pauliX(q, 31);
      sGate(q, 25);
      controlledRotateX(q, 5, 1, 5.600255363237766);
      sGate(q, 29);
      pauliX(q, 18);
      pauliX(q, 24);
      phaseShift(q, 28, 2.056900418336532);
      controlledNot(q, 9, 21);
      hadamard(q, 22);
      controlledRotateZ(q, 20, 28, 5.627433197561884);
      rotateY(q, 25, 2.694140251805922);
      rotateX(q, 25, 4.810189895568846);
      rotateZ(q, 6, 4.563825922806708);
      controlledRotateZ(q, 4, 8, 5.65163077813755);
      hadamard(q, 12);
      sGate(q, 26);
      hadamard(q, 29);
      controlledRotateZ(q, 14, 6, 0.7235943464141686);
      pauliZ(q, 3);
      pauliY(q, 17);
  
      searchQuregTaskPartitions(q, Env);
      double t1 = get_wall_time();
      getAmp(q, 0);
      double t2 = get_wall_time();
  
      printf("\n");
      for (long long int i = 0; i < 33; ++i) {
          q_measure[i] = calcProbOfOutcome(q, i, 1);
          printf("  probability for q[%2lld]==1 : %lf    \n", i, q_measure[i]);
      }
      printf("\n");
  
  
      for (int i = 0; i < 10; ++i) {
          Complex amp = getAmp(q, i);
          printf("Amplitude of %dth state vector: %12.6f,%12.6f\n", i, amp.real, amp.imag);
      }
  
      printf("Complete the simulation takes time %12.6f seconds.", t2 - t1);
      printf("\n");
  
      destroyQureg(q, Env);
      destroyQuESTEnv(Env);
  
      return 0;
  }