From e7b1a7eee704b36de6ff55e45b5cf490f35f8561 Mon Sep 17 00:00:00 2001 From: Oliver Knitter Date: Mon, 23 Dec 2024 19:45:25 +0000 Subject: [PATCH] Fixed changes for Tangelo-Examples PR. --- examples/neural_quantum_states/.gitignore | 3 ++ examples/neural_quantum_states/README.md | 8 ++-- .../src/__pycache__/__init__.cpython-312.pyc | Bin 144 -> 0 bytes .../src/__pycache__/__init__.cpython-39.pyc | Bin 138 -> 0 bytes .../src/__pycache__/complex.cpython-312.pyc | Bin 1816 -> 0 bytes .../src/__pycache__/complex.cpython-39.pyc | Bin 1507 -> 0 bytes .../__pycache__/data_loader.cpython-312.pyc | Bin 1192 -> 0 bytes .../__pycache__/data_loader.cpython-39.pyc | Bin 935 -> 0 bytes .../src/__pycache__/evaluate.cpython-39.pyc | Bin 2219 -> 0 bytes .../src/__pycache__/helper.cpython-312.pyc | Bin 2377 -> 0 bytes .../src/__pycache__/helper.cpython-39.pyc | Bin 1293 -> 0 bytes .../src/__pycache__/optimizer.cpython-312.pyc | Bin 1512 -> 0 bytes .../src/__pycache__/optimizer.cpython-39.pyc | Bin 970 -> 0 bytes .../src/__pycache__/scheduler.cpython-312.pyc | Bin 5143 -> 0 bytes .../src/__pycache__/scheduler.cpython-39.pyc | Bin 9584 -> 0 bytes .../src/__pycache__/train.cpython-39.pyc | Bin 7979 -> 0 bytes .../src/__pycache__/util.cpython-312.pyc | Bin 3551 -> 0 bytes .../src/__pycache__/util.cpython-39.pyc | Bin 3373 -> 0 bytes examples/neural_quantum_states/src/complex.py | 1 - .../src/objective/adaptive_shadows.py | 39 ++++++++++++++++-- 20 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 examples/neural_quantum_states/.gitignore delete mode 100644 examples/neural_quantum_states/src/__pycache__/__init__.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/__init__.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/complex.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/complex.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/data_loader.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/data_loader.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/evaluate.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/helper.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/helper.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/optimizer.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/optimizer.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/scheduler.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/scheduler.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/train.cpython-39.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/util.cpython-312.pyc delete mode 100644 examples/neural_quantum_states/src/__pycache__/util.cpython-39.pyc diff --git a/examples/neural_quantum_states/.gitignore b/examples/neural_quantum_states/.gitignore new file mode 100644 index 0000000..da11c2d --- /dev/null +++ b/examples/neural_quantum_states/.gitignore @@ -0,0 +1,3 @@ +logger/ +run.sh +**/__pycache__/ diff --git a/examples/neural_quantum_states/README.md b/examples/neural_quantum_states/README.md index fb4f2c3..fb4119f 100644 --- a/examples/neural_quantum_states/README.md +++ b/examples/neural_quantum_states/README.md @@ -1,18 +1,20 @@ # AUTOREGRESSIVE NEURAL QUANTUM STATES FOR QUANTUM CHEMISTRY -This respository contains code jointly developed between the University of Michigan and SandboxAQ to implement the retentive network (RetNet) neural quantum states ansatz outlined in the paper, "Retentive Nueral Quantum States: Efficient Ansatze for Ab Initio Quantum Chemistry," by Oliver Knitter, Dan Zhao, James Stokes, Martin Ganahl, Stefan Leichenauer, and Shravan Veerapaneni. +This repository contains code jointly developed between the University of Michigan and SandboxAQ to implement the retentive network (RetNet) neural quantum states ansatz outlined in the paper, "Retentive Neural Quantum States: Efficient Ansatze for Ab Initio Quantum Chemistry," by Oliver Knitter, Dan Zhao, James Stokes, Martin Ganahl, Stefan Leichenauer, and Shravan Veerapaneni. Preprint available on the arXiv: https://arxiv.org/abs/2411.03900 Corresponding Author: Oliver Knitter, knitter@umich.edu -This repository is based off of the code Tianchen Zhao released (https://github.com/Ericolony/made-qchem) alongside the paper "Scalable neural quantum states architecture for quantum chemistry" (https://arxiv.org/abs/2208.05637). This new code uses neural quantum states (NQS), implemented in PyTorch to calculate electronic ground state energies for second quantized molecular Hamiltonians, which are calculated using PySCF and Tangelo (https://github.com/sandbox-quantum/Tangelo/). The RetNet ansatz implementation was made using the yet-another-retnet repository (https://github.com/fkodom/yet-another-retnet). Other ansatze available are the MADE and Transformer ansatze, which are implemented natively in PyTorch. The Hamiltonian expectation value estimates are calculated following the procedure outlined in Zhao et al.'s paper, but the modular structure of the code allows for relatively simple plug-and-play implementations of different models and Hamiltonian expectation estimate calculators. +This repository is based off of the code Tianchen Zhao released (https://github.com/Ericolony/made-qchem) alongside the paper "Scalable neural quantum states architecture for quantum chemistry" (https://arxiv.org/abs/2208.05637). This new code uses neural quantum states (NQS), implemented in PyTorch to calculate electronic ground state energies for second quantized molecular Hamiltonians. Though not exactly a quantum or hybrid algorithm, this workflow makes use of Tangelo (https://github.com/sandbox-quantum/Tangelo/) and PySCF to calculate Jordan--Wigner encodings of the electronic Hamiltonians, along with some classical chemistry benchmark values. These uses of Tangelo are mainly found in the subdirectory src/data/. + +The RetNet ansatz implementation was made using the yet-another-retnet repository (https://github.com/fkodom/yet-another-retnet). Other ansatze available are the MADE and Transformer ansatze, which are implemented natively in PyTorch. The Hamiltonian expectation value estimates are calculated following the procedure outlined in Zhao et al.'s paper, but the modular structure of the code allows for relatively simple plug-and-play implementations of different models and Hamiltonian expectation estimate calculators. ## Usage ### 1. Environment Setup -- The environment requirements are avaialable in the nqs-qchem.yml file. +- The environment requirements are available in the nqs-qchem.yml file. - Make sure your operating system meets the requirements for PyTorch 2.5.1 and CUDA 11.8. diff --git a/examples/neural_quantum_states/src/__pycache__/__init__.cpython-312.pyc b/examples/neural_quantum_states/src/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 8fd00822e73fdab02f63a7551e1301e328b47f1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 144 zcmX@j%ge<81p6Jgq=M+jAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdrLUinpPQg`kf}Lr9QbF`%5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!H%enx(7s(yY> zW?5=ce0E-DNl9vveqLT-v2I~TZlX-=vg$e_;-?y@Xup;5u7N~^3TESnu?X6>YznRsXF zrX_(q>_dt|D-{w^u%Hi?3MvZvqzJ+aA|zN?x%SPczAg66m)&!3ekKW`D|leeJ#+54 z=brPObMEuLzFq|McR&Y&dbtB@2l;ZKwlH4(U^Nx*%Y z4|vZUmU}kY(Qy?wJg|j%gB#FR7+4wQ!P_86Cy*?R%R-E>{Z+JzDb6|UT=ZQmK5d(N z+|C&1bds8}4A<33+_KI(-<(yabu;b|HLlubHlyca**Pi^UCEFDob|)U?XNv zg`cX@&Mi=)PYG$0g+V07e8B2a5$2mphN+w(eISO|c91a!WQY46Q1FZ&flx+n3ynNl zYshJ~-$iSUf0td#$+IsA1?;j2IHg&xU6jXpA|F4Q7>c|KqoD1qg4?o7vnqE{GkX&G z2;!}37TRl!Ka+Rd?3Dt}dw(aknX+b0 zc%%f^rahW|&QNteO7$rU8cxd9EypH=A_%6z@uS0tU+OT>eE9*j;dr7k}_vA zF4+fL5%`=Jz+j5}{Y%4_CdM=_~q4;E5lb#-EeP?UH_xDCsqr_ii!VaGxF{2=EV<%)7ur)7EA)`Y72CI`-Z=!@&L#F~+aaj@Kyswin~b+W=<* OK8&}*0sI^0cm4;m5lM;w diff --git a/examples/neural_quantum_states/src/__pycache__/complex.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/complex.cpython-39.pyc deleted file mode 100644 index 01ff6130a7273a33a8c4a5fb5210c300814e7fe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1507 zcmb7D&2H2%5cb$f_P4aq^3MToM1t;>142mLdnsIcsiN3yvuu*>#9OsedZC<Ixd)KkMOnD8xA{*GE9gTbk7x2%&|B zvDgCtms^tla;)-TD*#~vBS)cuQS?zhyrF4zEOns6FTqx8AuiG_!nGIT+PXuy&O%&Q z_XyWri0kVm!u9@z;~VN*$4W2j6~gv4Y>N2y1@pBLg9|?tSy{x=!M=;o*eMn%v35CF zmNehdtlG5H#OFgnKIBF$*OB+n#2KI>0jV0z@?(9lQ|4w+j&5D{FBCR`J>sL#aW_Z*o(dsf~-DG>Ac^vpf!5XiH3YTv*v8{p7Pp z4uOA5rjwS%XgW-+StiIlqZN|>$cSn689gAu68lG>VO3a|OZS^vTrh31ToAZdl$dW< zyVC^C9Xc=%&GK)dIV_XsL%$-S34H>mqM<~JLpYRHje;6#c@mzAHQ}X*r7NPaM~CB< z&&w&ZKWSLGMONg?JC&A|Q&m>P%J+~{Nj`DmWGAW2RX-sY5m#xsOS9rS3AhK|GCv3h z$oAAX5Cdqi;j*Y-N#T1~7|A1v_pCYzYH{Ob(Daa@~(u z=G(v-jA8J!nc8J_czAWC=wIr_IV*7Po V>gm|L;V0|UXhR$N(Q`HX!e3C#8HE4< diff --git a/examples/neural_quantum_states/src/__pycache__/data_loader.cpython-312.pyc b/examples/neural_quantum_states/src/__pycache__/data_loader.cpython-312.pyc deleted file mode 100644 index 273022eaf6f0d2bcee4c075e1a56053e07dfc907..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1192 zcmZ`(%}*0S6rcSnTS}o|BN$9rN=RtbmU#9f6)+|8m4F(F$+~p6?P7NqX169KyU89r z$O$?1pnrhG3kMI}Q(%hD{ZzNM%ZBvGHUUS+Lm>XYh+WgH-MN`>?WeQF6TH{#+b#BGCR-vZ^M(+)H=x*gpq@9O)B zxf(y>aoGSu7v-%9=Z1Z*_6jWR&p+aEPPlpGvM^cZ(#(07HoqLuvx#avy^t%oA(vN~kDS-$wgDU1 zwXw@=pzW2ET+YHOWrAb1@E~WIdA(4^ilbYmG?L2~k_|>AInwk02uRp08?voCnvH3_ zKpB2KvydU-soBi9JeOI>5^;KVYGUl^)C3V8W#%X6gRv3Olmo)pNs(}n28-a1X(uop zX%G!Z=&lyOUXa=jWR-8w~mcI<95bi|E3!t^Wxj;vU;R&R=XZe)zLTz}echY6;MiHc>c=2c@EWT{86U8ws+Hgs<8iBG z#pm%%ipD;hSD#BB7fiA2oTC4 z{ud$ZB5SKvX~LVE>D`OvNu{#I-yBS^PU4ElEr|2``Dh`UawKX-PINN~>y965l0xrg?(U`KC(?t-DoDLHjI z&uX`$R(qYVsHT9_L)aE{0EmNAzYBFwhZ=hL!|Ng)0dRLU`4>1Q8?!tYvOw5MY@p5s zpH=gvWU3N8ev;4T$r^g%r91x@WFo$7fT=2589};9VCdfXcx z{^a9y-}t-Zqqj%4Y7_FzqHmMF@gR&uHWCL)A^-^!O(f2m^(zsKyaSt|n7(bzdfUds z$O6YFJ7Bi>BB7xJKMz4~JMuo9Bt7Gb*7%S!G|A=X>0@Z#5U&lfl@)a9awtm}_l;5| hHpnJzoos~0`H(h#_@WU7d>tGPe diff --git a/examples/neural_quantum_states/src/__pycache__/evaluate.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/evaluate.cpython-39.pyc deleted file mode 100644 index 4cde55a6eed8eb35a591d692c5f28de43240adee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2219 zcmaJ?&2Jk;6rY*>@Y-u9w&NsD6QHG~Y7R6-LI|V^@zF~`4N@xvSRk|UOxJ7gS7yg; zgJ!t|jup8ear7SHg!psj$|?K_9Dp}tr%Kw2SVtaH7&H=p;DgMf_77;# zr1$~abxy$(+TV4Q%~=pDJ4%93S?o!!{9+Wu0Usu_Sg86aODD515NuS_7Rzx7RuAUK zFpJwZLIO!N#}zup6mOvkDQmE|Du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examples/neural_quantum_states/src/__pycache__/helper.cpython-312.pyc b/examples/neural_quantum_states/src/__pycache__/helper.cpython-312.pyc deleted file mode 100644 index 4ad21bbf70449324d33bd441b663660d46099475..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2377 zcmah~O>7fK6rR~1d;OC*CZYVe1Vd>(!8qp*7_TEb@i;@m-YA(G+@da_}o3+=N2$hlMz4>|X&Aj)% zdGlvSM;Jl-efXiiM?&ZyKJlB-9MsRjUtetOK3l$82gXV?qcCs4Tk3 zKra3T|A5={xXn$?75r;qG=cisPkDp%9J(TYh34=w9!rT#H0>;lXLaY~)Re9|#;iW7 z&*~;qsP1^9l*FVA$x;@$H0SZIJke(jyFfwH^kk)}f~8VOCrT!h#TSPLr|q0RXq#Y+ zq%T>9P=^uSH`wN6Vut zJ5rCL2cF*;c{zDOLttYmcmzG%HXIQNPe@82oxn&J5Xv$5U6RCrvCda-MB=a*=m97>k@4o;ZJUJUx8k#CU6R z?(Fz^CRwU#rUWLDjCF~H=WJqXX=*I!DVYg2WkKDVHHd97kvfD)nn4}5#emeO^Tbwl zO4C_l7xDn6NY=D3X3R7o1oHSx#Jzob#J1vFLYt;XZ; z<>oyYw7>qD*JQ?jvOH>p#~BdxHZZnT)4_Xt{#Bosk#}ALQ$f|#GZuL94k&DcPC51f zOZ<|(RjK!plx$qDRe)eW0NuMDgTWHY^3sD&pl{*SMZv{0?Xn=jo6}4!0-*W8@i|5} zdZjjK&2amh+DqWQ4nQvUZTWmrbRxcqH|Vwssw?gQ72m={GnfGu$mDq?V4`6;OtA7S z$O{hug2@>|GV@F_0bhV6(FB+&K+>uWl>{50qFvbpn+VrTLt;RVyblNNgigN%0^o_o zi>FpQx;7A&lO?>Wblr@VWB0_$@Xvuq%I8~ff?Zsn|#CxcaHKB2p>zbSq7q>B=-eeBA>$M zyIiUd2v2Cw)lR diff --git a/examples/neural_quantum_states/src/__pycache__/helper.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/helper.cpython-39.pyc deleted file mode 100644 index ce19ce89497040df55fad147f73552e7bd12d510..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1293 zcmZ8gOK;pZ5avs}@;=lvAA=z7i0zuFq?y+v+ zPcC}PZ-{;LU*ff={)L`8!(ABbP~dRB(UAP+!D2ifFdQHM{%-b*Wb7XTn?oS@9;f>q zg=U)9Y`R+cR3H|$oU5tgD_b(}O?zv-KToGys7tN>V$*?6bPv~|?&}oSk>1h+T*rE- zN4Rcl{)%PefAJQ!m+_DsL(#fY5nd0{6Pzz`x~C{Q;n_Q``7`E4Cr^1q0+BpZ9Xsco z`Q%+s%Z_zis}GWh;U&pl82>KKIcp6lZddgoxICVv0>mA9+CAzuV`D-=pd`c2hp^lU%<>^9z#+9 z6emH|SQadSteu~xDDu)`zIcUO^dFywGNi3J29A!`@dg*)2vnj7jC8*vkywPE}0b*~)rj8vJ>k-3`H*QdjWFyb?+1%G9;CD=w#B|cic||VY_sDwZC;&SACXi< z1U-nDQ+w=HQltkD-n^j41ye4FXRWWB%i(*EcV0Ou}cUIXQ zJ3V{Z!R*MfT|-pNPRo3x%Iw-As>|KYIs2I_PM768TIICvpxTJg?#>LqD(CDIta#l! zyfuG1S@sv+eLK9h|HWIg!@K|Ay_)A9r__#9QPtGA!s~C}u=v)mAAfM*!@Hl~`}H%A zLZ2U}2l^C|@-afC8EmQs6>!R+H8*iopEbi8j;LuW7`mqLguQHp-8yxFQ^PS+r4D9S zZz-HLN}Z7EMAfJio4KYNRAR$7Zy!vi%y2@DV}BxP`U#FC^+fbG)&h!5B^ZmwsdyGh z>Q1QyFcTBl$i&cj>Vj^2B?hRss1xd~B}UH;4oy&r^-n4ib!{&~rFatNP)`i2BoR&M zVWNW3+PQ4425S?8J&vEnuTXF{8OOn7EP4Zz@O&a_0v=2x7K{@Mky#uM8YB{|Obn#b z)T3iFTiUG&~r_vCcZ+4Rxdv^1O@UcO##4HjC1rPi*s_^aOh^h|zX zaov08p}gTkHH~@EyU~K&4Noo=x|Kq4?$M gg)6@v!+oR;QuaS%c%ax2IF9>-4*zh}bBz}M8zVDO2mk;8 diff --git a/examples/neural_quantum_states/src/__pycache__/optimizer.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/optimizer.cpython-39.pyc deleted file mode 100644 index 3a078c0bc6125ba1cfd1ad1bb06a940d9b7a7190..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 970 zcmZ9LJ#Q015QcZ}ZtaU>LkN}?r3!(96T(i7Py!*42D!jUNN%jPcR8EfhqHJ2l%YUK zG#DXDs)UY)l3x+hvn3P}QUoOu74Kef;YO1*>flQ1qFj*847!(0L_W~&;dULcfp$}*>g_#K1Kcu@)O8! zqK=K~L}6%weE^#Tdk>a7$6kOH!9IiK&#^XG3G4vO9Wl&uVQ8c43g|`9W6+5)IwdY; zlU@U#UbEg&RfM82rZ}m0#O0TC;9!O2x^}qWp=TX^Juv5Z$-nWs^6l`??`ihGt3))ZpL^Ff8JZr2Ai%jnEna&kF8*lUjDOzXdU}(j|-I=(b zwjv(NxhPKO6tsTS+m)i~O=LS5){1z9Q;KC7|1qFto_4{8K_TjvqYgql5E zez4lm%;cYFRyR?zM<#eoyQ3#H3uAQ9r9g5O^&-EeIQnM`naJM8B(iSC0-W?JOpf0UKx~Oae9#Z<-9t%-CMoiXAL=G~0HsoP)`ne89SNy<@f!uV4S8t$|7Uh) z7k5$99NA~i^*`tQm+w1gKlS^)1kxY(eJK6JPsm@fVkSqaaQ`$EE)kK4OoBx5YfCUm zThzv2*`BZ`*(giPY{HRrMx6|?kwZjuTqL4XVz1f_IZ+pFbwR7UqSY;WE|REcg5kU? zIPeI^=&s)McuJLIDEj!r#|DH^NgPiY^@PkTW?e8O8+mCNa(^q-e*_zrNR$yt)F!f1 zWS9||i=L=mw83JmXouV}MP6f~&H=(X^qN6AHYR1#aq;jmfvu2=WfXk>2xLEFE)kV6 zd$YEyrE-?=R;y~wR-M*J@>YnDER(fgwH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?i7eDL2*?)USbfNxt zC-Xa^(|v_-yB2O=3U?LT+Nb+|+7BZO^-pQ_PZjE))9RmFtnbbRyNgeC{-$TH=XR)j z*7eSze5gC;>n@oToLhKs z&qJPhnR#%}Ny57x=m9}NsQeT0^oH1vyq@0m>_=@|dz)FIQv2vZ6iPNhR8T0XYCBo3 zZZ&y0%Uo!x-ggE=eN7UH=>-f)wSWD2K&Mrs3@NiL@e%UyuDT|f5dqL>?Q(*s)&)>S z=%NY05j?XDjsrwSd7N9Oo`%2%_i?zA89w+l*4^esu8fPE-JoX&y`LLUh|5B;2pKTys*QC#&)oC5 z9U}A3u-nng{Ec94EQX^WB0aFQ;i*r6{~~^i%vsogJWzgyRl}7mqgocm%N^p3Xh) zKWz`~%!_*x*~&E@>ZfOVxL>S!-*>gdP1Y{_bQjxH*lX2O)c%hZ9_r89N9^wh%qNny zMv$(ttKy`Um{Wb-Z)TatDlLP07T5id;X+4rhbRfLi50Zf3I^H=dcnxg-^Fx&FK08Z z&yJB;G8tPz-_o7Jgph~}D+;}cYOQq+Ox zp!N2&eikS_{`|;wRAm5+aqgx& zcl6jz@5e7J9e*h|#OF@Mw4qq;w4ej9 z9m+*t){egXDZkvk``U?xeb--Fh+U8Vp(Qu;>Z-$5cZva->q;{HD04XPX<81q%z8dl zu06ZZdVS{ylb;ATHsP+@a|44nw|tz=oqQ$t?5j&*9_D&Wb3HhBB=2ed<|n@EEXlHy zz?Phwqp-$#8Si+OGXdEi@4QIU4vTQxN@Vh z=7<5C_>%w1z1w&R?U4teiZ2@l$?C41VVJ*=z~`jpbJF!WX diff --git a/examples/neural_quantum_states/src/__pycache__/scheduler.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/scheduler.cpython-39.pyc deleted file mode 100644 index febb6fa506b0d13c671dfcf1e3e687f1926e3231..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9584 zcmb_i>yI4SRj*f9S3hRlGalRH=XQ+aOo!d^Y!WufVmzDJv6GE=*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p6P{Z5yy!JH_5$(@J!<>9GJ^j#MzLep|7(qI4_{0<8!FO$YzGii3e7m8U%|gjC~}& zSl_4|FpwZEGC}^Ev)i8Ju;RZX4Lz}^oq6bjV@Riw7Q`1T*oB`4ZdPhXoP&;M%O?}y z`fCJeT7Ma@Bv{{l$@UvK~b diff --git a/examples/neural_quantum_states/src/__pycache__/train.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/train.cpython-39.pyc deleted file mode 100644 index fdc0b6d6451e277367147eea42e768db9930fae8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7979 zcmZu$OK=m}dhTwuWWD@AmW_>#5ylt{#^y0F1H%Bq5?B*k_E-jHdLT+$-IiPKZi&{YLGxtiR^M3s2 zKj-}acRuO;{b>oGU;WM9=7U8^`gh8l{3ysg!q3afl4MARY)cx&iY+^erpT0z*)d1e zRFRf#S(8P(xE2?2LQ5c4?LH@|C3|gBT3Xa)w2X+ePQNxF>f-jGGo%fPbizL6s-<_^Kh- zq`8rwNKe%{IaI4_)iUDrW6vmU)pksK8@Ytfbhl|Db-HAEKC`y=eA6iDzP_$A-L_2| zRsFR+$I;ol7tHcaM!n3pzUdlsN|;_+s+DSO`#Y0`sV7U7D2XO1yR92_0|TK|f7A5q zUSr2J_G~oFKCc#QM>!gws@omka;$wZeu@g5wt?BzP-UiWhpOf1%`nwyyRE&Z?weu8 zYv{Jl>dv0+|AcLqFp%n-o{xBt`tRtDW&3T{(%r@oX`%PIia3Se5`NxIRg$>Wl@29Y zvZP?hmyuHrr32ZJ$E8**IK@+jva7OtTxzM^I9GWpFY)-H66D+=wEd`r=R~grg*>$@ zvA_5Gx=EfoSw0~h%H5RT*GeDC!EjX5&G2DEIaDZjUqYyiOH_6!Q(BaeG|{+10*w8$ z82h6cKN?#lSq)`Og1jeM?Z(;9Ts4%>q(JqvJm<>?%6pkj^4v?TDadntyZwjKgcOXp zcX%$EH5l~=x`R9i*@q6L?kRo>(&tc?1Gyx298D2P$gY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__pycache__/util.cpython-312.pyc deleted file mode 100644 index 90a9bb6c2747d1db4920f5c7091790dea8bbc7e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3551 zcmbVPPizy}8Gqw>o*CQYWCLVLyGs(nnvIuWmx}G8Elrz}rB1^-ZNmYjtgMM=;@BCF z&6^3^xQ?1sNQt#s*{Fwv6GW=SA}Z~rhu(T`FSzk4*29%5Ef;Q4sCwYk?~OeZ0~Rbi z$?wni=Y4O!_kG{*`Jcg{A3^*3*k8460ikc%!fBq?Oc3Nr$SRQ?8<5mgMmqW_}1^qKY+T4ESHyY&etYfME6^K4q4b?WSmLcm|^=q*PhW99cD&yW(VUl zlHj*y%hSU`i@L92x%=hXD%WQHtrul8hhC&5+%Hr;Z=fA; zc3eVXK7R3XSf&C|3^kXf*wi$YdW<~vS~-%Or-7_uEGl}!rsL$Is!%y?CY0++T32Ru zjdr&QBotkz(yWqP&YLS!5x-3oey z{cDq}lNDUUy$vj^O{`9=#aH8%vo+k;z`kAFTgAN~U{w=E}z2{Pfs?yM%vo&eB9{S+MCv3l6+*ieYH9S-gpKhmogHJwzbD$*a zoaW|E3@ES49VaR?UPt|4R5>TFrcu}vF9br_keUd^LZ61F!#rVjC~xFG2lrTHj^*$@ zL=FR$^e~o`0;e%5>4Rl2{LJq`w}Kjh!{zg(^Iwea28ODEp*ug>37mO=&)BNT_WWko z#jHFTw5vc0EqjWdj9UwU(`qW$IkPivHE<*m%DCBgKy$v+8KI82Sy*(vFpfU^7@@0h z!exFL7kSlFfW1_HVVFhLMt6||8ef3$VBe`?Mkn0HJFj(S?3}?FIka&eBh{O6^XTB* zMUNu|HzdRhp5HG&W)6JJd{pQfAGR1;ir2T!C%{)w_FEVs$L9O|4E<#y2N#PTt|~O54)i;C685 zNTi0Njh^pso&D3mKEmEe$-B<2pQs1q^=qXMD`Q`LT<<0BkY6FBw&A8Q6#dkC>?wu5XR zJO}9l%Vz5YH7`#Sv$qYXI)vFlLP3BzX3%%G<6ibF?YNR}WQTWx>Xmj}$v3f6M4dpk z6P&u|3BTOGufHRl+lA^(mwP4d#FCw9rUO{2xJ|nQaK7S>SxJ1ZefKX=z4u$C((z8) zS>AqbTUa`UKIQp~aG%9HG!6kIi}8X#5`|Zo0w8A=e32;8%talhQY5P9QYnoT-VY5c zW|GzNusQhK(6Fvu*L0TVVe_-W&~R2WO(g}3f=|_E7gG^X3-i=#i;;e?M5TE^d|e|Z zpuZ<)Qk++;c`9hX189cQl2sNoHBC%1z=ZkniQiC>*-jfN8kkkgbn-&Zm`g(`nuuSV zqJfKPU5hn$BtuLkIBgM4$+l@UA>il?VRpxhrmqcjayQtLd+= z+`IDi)q7X}_T!zwU+l=S1`|47m5=YpC-%JjA^-nG(JM4-TiwLg0foFtJ!fiROnq~3;Wn^PF_|+g&9JCn&n4lh2v5lc%FUVV8xOF^Z*P!b zYUF3Y`4E04pf_Chf5e{3umAXmhQDilY3scm|G+v|mwaWhBv!2d&mC+EhKL@ diff --git a/examples/neural_quantum_states/src/__pycache__/util.cpython-39.pyc b/examples/neural_quantum_states/src/__pycache__/util.cpython-39.pyc deleted file mode 100644 index 80166435915f2fd64a24dda810bf3b642b4b1868..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3373 zcmZWr&2Jn@74PbgnVv7(NgT(?F3^GmGKAP5AtbCQS!cc84Q!mO9f33uje5Gu?H>2X zq^ie>&4dGq#DyTl5#?YXbK%HevFx2XE{9d56&#UP0`Yq_9%th1R#m-v@71e%pH*S2 zRk!fXz7+8HXR_JOEVINM{xf2ZJ1<@Ca__m@Im;`&`rPWA1J-}Zc#YSA zofobCdEUUh$y=B&oXltVEan&ZBIL|M+9E##S!emV=U(R`zX+_?ztn$6yoyR`a@vl~`vkDO=B%xuh@Lw95yF=mxszrvl7HDcU- z;gF?pE^k9O?yhb<_+YcUy0*4?GP!?m^MQ8rC`#M5cIl9kwrf|lT_{}@`CcN6Tsx|i z+Kq-h)O97wE*E=AB(%#DR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0?OH-*q)LS z?G(6%PgsplSAvaCwy>EB%YzfjTW($n=)z9IG?<_R^8N|)bP%ir<5^%rB0vJ-5V#)# z6x25dF-xH-qUG(AC)v`yiOws*{rv}YUj-+qpy>6XxLK~xJP7-Rhmua3MN zX4;2jM0*+HKENK~lQuJax{7HmL*DVy-gb=JkjRhma(E-f%L(`3Ey)Wo1|B)7;N59k zX%C{p>|k-?vLG+YK!P{U;dH*#ZfFm*B-8FH7MA;`;j>H3 zXNzcaX!BET!Qks`0d-a;;DwQ>oUOx@cWC-8b2G?GfF+e9?cow0?8|ou@h-Yf!#q}& z%)as=vDC*HdRC5~Eoa6EdR5A#H!KC$jj74_LFeO+hT#-$_i}%L+9l}?pq(TyCDlOl zR5b54^9s?m4TP*3gpn{8w7DC!+bfFH)JHs|a$UJw@F8AG-ga8xnNYho30kA;l>N-J o(L5IY8%Q^-xk+YF0XiQx8vpbNY65QB^SwvkQ&?1NW|bSO5S3 diff --git a/examples/neural_quantum_states/src/complex.py b/examples/neural_quantum_states/src/complex.py index 1d924a6..6bac7f0 100644 --- a/examples/neural_quantum_states/src/complex.py +++ b/examples/neural_quantum_states/src/complex.py @@ -32,4 +32,3 @@ def scalar_mult(x: Union[torch.Tensor, np.ndarray], y: Union[torch.Tensor, np.nd re = real(x) * real(y) - imag(x) * imag(y) im = real(x) * imag(y) + imag(x) * real(y) return torch.stack([re, im], dim=-1) - #return torch.stack([re, im], dim=-1) if torch.is_tensor(x) else np.stack([re, im], axis=-1) diff --git a/examples/neural_quantum_states/src/objective/adaptive_shadows.py b/examples/neural_quantum_states/src/objective/adaptive_shadows.py index 1878d92..d13d65b 100644 --- a/examples/neural_quantum_states/src/objective/adaptive_shadows.py +++ b/examples/neural_quantum_states/src/objective/adaptive_shadows.py @@ -13,8 +13,12 @@ class AdaptiveShadows(Hamiltonian): Args: hamiltonian_string: Pauli string representation of Hamiltonian num_sites: qubit number of system + sample_count: Maximum number of Pauli string samples desired + total_unique_samples: Total number of unique Pauli string samples desired + reset_prob: Probability to resample Pauli strings + flip_bs: Number of unique bit flip patterns processed at a time on each GPU ''' - def __init__(self, hamiltonian_string, num_sites, sample_count, total_unique_samples, reset_prob, flip_bs, **kwargs): + def __init__(self, hamiltonian_string: str, num_sites: int, sample_count: int, total_unique_samples: int, reset_prob: float, flip_bs: int, **kwargs): super(AdaptiveShadows, self).__init__(hamiltonian_string, num_sites) # product of identity operators by default, encoded as 0 self.coefficients = torch.stack((self.coefficients.real, self.coefficients.imag), dim=-1) @@ -37,6 +41,9 @@ def __init__(self, hamiltonian_string, num_sites, sample_count, total_unique_sam self.counter = 0 # Counter to keep track of which term to replace when updating sample list def generate_coefficients(self): + ''' + Generates coefficients in Hamiltonian + ''' for i in range(len(self.sample_Z_idx)): cover = self.covers[i] keys = list(cover.keys()) @@ -46,6 +53,9 @@ def generate_coefficients(self): self.sample_coeffs = scalar_mult(self.sample_coeffs, part1) def generate_loss_idxs(self): + ''' + Generate unique bit flip patterns and indices mapping them to each term in the Hamiltonian + ''' flip_idx = self.sample_X_idx + self.sample_Y_idx self.select_idx = self.sample_Y_idx + self.sample_Z_idx self.unique_flips, self.unique_indices = torch.unique(flip_idx, return_inverse=True, dim=0) @@ -53,6 +63,9 @@ def generate_loss_idxs(self): self.unique_num_terms = self.unique_flips.shape[1] def update_sample_batch(self): + ''' + Updates existing sample batch with a new Pauli string sample + ''' new_sample_x, new_sample_y, new_sample_z, new_cover = self.generate_sample_paulis(1) if self.sample_X_idx.shape[0] < self.total_unique_samples: self.sample_X_idx = torch.cat((self.sample_X_idx, new_sample_x.unsqueeze(0)), dim=0) @@ -74,7 +87,15 @@ def update_sample_batch(self): self.generate_loss_idxs() - def generate_sample_paulis(self, num_samples): + def generate_sample_paulis(self, num_samples: int) -> [torch.Tensor, torch.Tensor, torch.Tensor, Counter]: + ''' + Generates one (or several) Pauli string samples according to Adaptive Pauli Shadows sampling scheme + Args: + num_samples: Number of new samples desired + Returns: + samples: indexes specifying locations of X, Y, and Z matrices in sample strings; separate index arrays for each letter + covers: a Counter object showing which Hamiltonian terms are covered by each string according to Adaptive Pauli Shadows + ''' samples = torch.zeros(num_samples, self.input_dim) # 'X' is 1, 'Y' is 2, 'Z' is 3, 'I' is 0 covers = [Counter(dict(zip(np.arange(self.num_terms), np.ones(self.num_terms)))) for _ in range(num_samples)] # Dictionaries of potential covers for each Pauli sample for i in range(num_samples): @@ -106,6 +127,15 @@ def generate_sample_paulis(self, num_samples): return (samples==1).int(), (samples==2).int(), (samples==3).int(), covers def compute_local_energy(self, x, model): + ''' + Compute estimated local energy values of Hamiltonian, using Pauli string samples, w.r.t. batch of qubit spin configurations and an ansatz model + Args: + x: qubit spin configurations + model: NQS ansatz + Returns: + local_energy: local energy values (detached from computational graph) + log_psi: logarithms of ansatz statevector entries (attached to computational graph) + ''' # see appendix B of https://arxiv.org/pdf/1909.12852.pdf # x [bs, input_dim] bs = x.shape[0] @@ -136,7 +166,10 @@ def compute_local_energy(self, x, model): local_energy = scalar_mult(self.sample_coeffs.unsqueeze(0), scalar_mult(mtx_k, ratio)).sum(1) # [bs, 2] return local_energy.detach(), log_psi - def set_device(self, device): + def set_device(self, device: str): + ''' + Sets device of Hamiltonian instance. + ''' self.coefficients = self.coefficients.to(device) self.select_idx = self.select_idx.to(device) self.unique_flips = self.unique_flips.to(device)