Commit e4a8912b authored by YesunHuang's avatar YesunHuang
Browse files

update SP

parent 9b0a8f43
8.004002001000500022e-02 8.499455856747557547e-01 2.130000421022929576e-03 8.048853968148163979e-03 7.342167343532854940e-01 1.158617955768291949e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.317492084097994898e+00
8.004002001000500022e-02 8.498363066722027792e-01 2.239279425838655406e-03 8.158167501738578659e-03 7.243098324031264079e-01 1.145417586727265586e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.321207010125559966e+00
8.004002001000500022e-02 8.497256348081783095e-01 2.349951293679399238e-03 8.268873639568534786e-03 7.145433824596471029e-01 1.132217394394776164e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.324294303598700262e+00
8.004002001000500022e-02 8.496137792381772691e-01 2.461806867469000255e-03 8.380763184413279193e-03 7.049343943093577813e-01 1.119064870313245308e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.326780081485960716e+00
9.004502251125562351e-02 8.326110790827032648e-01 2.583923792585039823e-03 1.000208155393527386e-02 7.402415800180462968e-01 9.247912162950687787e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314251559911986833e+00
9.004502251125562351e-02 8.324601490777584489e-01 2.734853800807591877e-03 1.015307264198938957e-02 7.291355900849746385e-01 9.134354298586039533e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.318782288237488221e+00
9.004502251125562351e-02 8.323069572663980287e-01 2.888045613168114048e-03 1.030632504017702129e-02 7.181954571564019840e-01 9.020321397817448883e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.322537389946349728e+00
9.004502251125562351e-02 8.321518658729569751e-01 3.043137009195917911e-03 1.046147644550263212e-02 7.074457805949277978e-01 8.906385254301825682e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.325535647507162684e+00
1.000500250125062468e-01 8.154313020192711647e-01 3.217541115114595784e-03 1.228694546212690496e-02 7.363329324285342592e-01 7.487766883497660331e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315179934163488218e+00
1.000500250125062468e-01 8.152276839548540099e-01 3.421159183877866064e-03 1.249066436644327704e-02 7.241899233277033776e-01 7.388356071661415569e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.319827933023133948e+00
1.000500250125062468e-01 8.150210467700534922e-01 3.627796371820455040e-03 1.269740138511407483e-02 7.122645413512262991e-01 7.288527559148302259e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.323549907366923462e+00
1.100550275137568701e-01 7.985789859971758053e-01 3.851495569903370508e-03 1.471929978197230107e-02 7.361425721269001521e-01 6.213917930359817632e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314441280877187035e+00
1.100550275137568701e-01 7.983138889462880750e-01 4.116592616556248412e-03 1.498455549902396114e-02 7.229340102547646696e-01 6.126145756763820316e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.319461725791894580e+00
1.100550275137568701e-01 7.980447191201720525e-01 4.385762447164300026e-03 1.525388218997747285e-02 7.099916149028387968e-01 6.037829885778512562e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.323384309747392296e+00
1.200600300150075073e-01 7.818322359946123790e-01 4.701188114766672102e-03 1.751008402484719242e-02 7.287884153250889785e-01 5.206468411447617939e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.316490720264577474e+00
1.200600300150075073e-01 7.814927838776088986e-01 5.040640218128319104e-03 1.784977407317457285e-02 7.146891702055483409e-01 5.127854010513473071e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.321206701350820190e+00
1.300650325162581167e-01 7.655293894926328280e-01 5.421915853009928558e-03 2.030988168625488810e-02 7.298384442065655175e-01 4.465127557343807041e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315113884915589892e+00
1.300650325162581167e-01 7.651081011471354554e-01 5.843204190007657457e-03 2.073151715560469024e-02 7.147037372910277631e-01 4.394577217324889773e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.320243018577421878e+00
1.400700350175087538e-01 7.493532110338725349e-01 6.324674961499993087e-03 2.342555131173118185e-02 7.262068036093871637e-01 3.858291338038505103e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315486381968678176e+00
1.500750375187593633e-01 7.338595560603174972e-01 6.847494339727853464e-03 2.629028784251323178e-02 7.353512460983560040e-01 3.412340679811629940e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.310850955550829644e+00
1.500750375187593633e-01 7.332452129682015540e-01 7.461837370730563246e-03 2.690531130305057889e-02 7.180982420496425656e-01 3.354808086710373516e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.317181205556615664e+00
1.600800400200100004e-01 7.178784895119380005e-01 8.154314430246880838e-03 3.006515729015089844e-02 7.236963041200681346e-01 2.985344477080814940e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314224172127244739e+00
1.700850425212606376e-01 7.027088373472356597e-01 8.940433588331729922e-03 3.343988948855924903e-02 7.269673031822148079e-01 2.671619257130712910e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.311899375648303501e+00
1.800900450225112470e-01 6.877065230852079658e-01 9.844169178704228335e-03 3.704958752432275376e-02 7.279362273346081658e-01 2.402909218095085819e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.310332944390484977e+00
1.900950475237618842e-01 6.728403121932392539e-01 1.089110992207347785e-02 4.091606651553011259e-02 7.266523073914100683e-01 2.170985120283857484e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.309560753883257656e+00
2.001000500250124936e-01 6.580774321485494127e-01 1.210849484169300612e-02 4.506291316422722515e-02 7.231843522153366122e-01 1.969400177838236132e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.309542286121351262e+00
2.201100550275137402e-01 6.303690210820304118e-01 1.352565467054347818e-02 5.265086578431907999e-02 7.337225755052586562e-01 1.670461950331662493e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.302702610224081070e+00
2.301150575287643774e-01 6.159096404114404733e-01 1.522875127876292464e-02 5.759166562996215211e-02 7.248033650218114188e-01 1.531439495044239330e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.304732456827934817e+00
2.501250625312656517e-01 5.891359503236994755e-01 1.724301592573708811e-02 6.636064532395988258e-02 7.275260224491240102e-01 1.324115320335565826e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.300642065228920119e+00
2.701350675337668705e-01 5.629226650926746345e-01 1.966818259099940153e-02 7.589692902225529669e-02 7.259117425352793473e-01 1.157137127945699540e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.298011379152172573e+00
2.901450725362681449e-01 5.371295603636345728e-01 2.260637076797693268e-02 8.627849956066220571e-02 7.201505312807132686e-01 1.020721672280737025e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.296725141156345629e+00
3.201600800400200009e-01 5.009078317686562754e-01 2.621579010479842264e-02 1.016170518710826365e-01 7.201731772649626606e-01 8.674208355455704123e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.291316691541520623e+00
3.601800900450224940e-01 4.559106888132586355e-01 3.066626380596704227e-02 1.226452743468534196e-01 7.225089252024544662e-01 7.201079278176614196e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.282715828632241983e+00
4.002001000500249872e-01 4.129462944166220062e-01 3.620286080877660462e-02 1.456916088569694956e-01 7.165293058528178216e-01 6.118188356695772434e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.276654245470512317e+00
4.502251125562781175e-01 3.633049752531851695e-01 4.308164466616686006e-02 1.755329451621046866e-01 7.086437667019418463e-01 5.149254071703817992e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.268423325529592249e+00
5.102551275637818851e-01 3.088672923302754336e-01 5.154365441958702609e-02 2.127882302821272886e-01 6.955231642300504502e-01 4.335979764079494814e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.258639982023815662e+00
5.702851425712855971e-01 2.580110274007883508e-01 6.162560371819436611e-02 2.526657158042303064e-01 6.702658664288063672e-01 3.752943707857299582e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.250870154146128455e+00
6.503251625812905834e-01 1.996185272383512732e-01 7.273603163347007461e-02 3.044172163448702895e-01 6.369863118910794597e-01 3.217305689290840043e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.237742505587196229e+00
7.103551775887944064e-01 1.584360760731206297e-01 8.310623512456839779e-02 3.456512507801137168e-01 5.878367518902508637e-01 2.917894789284904533e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.230098279004062656e+00
7.503751875937968441e-01 1.332922391891392944e-01 8.967047208358984445e-02 3.728175536334112361e-01 5.450754345740121964e-01 2.756140591777977544e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.224742311116581384e+00
7.503751875937968441e-01 1.332922391891394887e-01 8.967047208358983057e-02 3.728175536334111806e-01 5.450754345740118634e-01 2.756140591777977544e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.224742311116582050e+00
7.103551775887944064e-01 1.584360760731203799e-01 8.310623512456838391e-02 3.456512507801140499e-01 5.878367518902509747e-01 2.917894789284901425e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.230098279004062878e+00
6.503251625812905834e-01 1.996185272383512732e-01 7.273603163347007461e-02 3.044172163448702895e-01 6.369863118910794597e-01 3.217305689290840043e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.237742505587196229e+00
5.702851425712855971e-01 2.580110274007885174e-01 6.162560371819429672e-02 2.526657158042303064e-01 6.702658664288067003e-01 3.752943707857297806e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.250870154146127788e+00
5.102551275637818851e-01 3.088672923302756002e-01 5.154365441958695671e-02 2.127882302821271221e-01 6.955231642300510053e-01 4.335979764079497478e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.258639982023816106e+00
4.502251125562781175e-01 3.633049752531851695e-01 4.308164466616686006e-02 1.755329451621046866e-01 7.086437667019418463e-01 5.149254071703817992e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.268423325529592249e+00
4.002001000500249872e-01 4.129462944166221172e-01 3.620286080877654911e-02 1.456916088569693846e-01 7.165293058528180437e-01 6.118188356695775987e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.276654245470512539e+00
3.601800900450224940e-01 4.559106888132588020e-01 3.066626380596702492e-02 1.226452743468533502e-01 7.225089252024544662e-01 7.201079278176617748e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.282715828632241983e+00
3.201600800400200009e-01 5.009078317686563864e-01 2.621579010479838795e-02 1.016170518710825671e-01 7.201731772649629937e-01 8.674208355455707675e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.291316691541520401e+00
2.901450725362681449e-01 5.371295603636344618e-01 2.260637076797691880e-02 8.627849956066223347e-02 7.201505312807133796e-01 1.020721672280736669e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.296725141156344741e+00
2.701350675337668705e-01 5.629226650926746345e-01 1.966818259099940153e-02 7.589692902225529669e-02 7.259117425352793473e-01 1.157137127945699540e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.298011379152172573e+00
2.501250625312656517e-01 5.891359503236993644e-01 1.724301592573706729e-02 6.636064532395985482e-02 7.275260224491242322e-01 1.324115320335566359e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.300642065228920563e+00
2.301150575287643774e-01 6.159096404114400292e-01 1.522875127876290730e-02 5.759166562996217292e-02 7.248033650218119739e-01 1.531439495044238264e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.304732456827935927e+00
2.201100550275137402e-01 6.303690210820303008e-01 1.352565467054347471e-02 5.265086578431910080e-02 7.337225755052586562e-01 1.670461950331661782e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.302702610224080404e+00
2.001000500250124936e-01 6.580774321485496348e-01 1.210849484169300092e-02 4.506291316422722515e-02 7.231843522153365011e-01 1.969400177838235777e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.309542286121350596e+00
1.900950475237618842e-01 6.728403121932393649e-01 1.089110992207346744e-02 4.091606651553009871e-02 7.266523073914099573e-01 2.170985120283858549e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.309560753883257656e+00
1.800900450225112470e-01 6.877065230852076327e-01 9.844169178704216192e-03 3.704958752432278152e-02 7.279362273346089429e-01 2.402909218095084398e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.310332944390485199e+00
1.700850425212606376e-01 7.027088373472358818e-01 8.940433588331729922e-03 3.343988948855924209e-02 7.269673031822145859e-01 2.671619257130712910e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.311899375648304167e+00
1.600800400200100004e-01 7.178784895119380005e-01 8.154314430246880838e-03 3.006515729015089844e-02 7.236963041200681346e-01 2.985344477080814940e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314224172127244739e+00
1.500750375187593633e-01 7.332452129682016650e-01 7.461837370730559776e-03 2.690531130305059276e-02 7.180982420496425656e-01 3.354808086710370674e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.317181205556616552e+00
1.500750375187593633e-01 7.338595560603176082e-01 6.847494339727849127e-03 2.629028784251323178e-02 7.353512460983562260e-01 3.412340679811629229e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.310850955550832975e+00
1.400700350175087538e-01 7.493532110338724239e-01 6.324674961499991352e-03 2.342555131173117491e-02 7.262068036093872747e-01 3.858291338038506524e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315486381968676621e+00
1.300650325162581167e-01 7.651081011471355664e-01 5.843204190007650518e-03 2.073151715560467984e-02 7.147037372910276520e-01 4.394577217324891905e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.320243018577420102e+00
1.300650325162581167e-01 7.655293894926327170e-01 5.421915853009921619e-03 2.030988168625488116e-02 7.298384442065657396e-01 4.465127557343808462e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315113884915592335e+00
1.200600300150075073e-01 7.814927838776088986e-01 5.040640218128316502e-03 1.784977407317455550e-02 7.146891702055485629e-01 5.127854010513478755e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.321206701350820634e+00
1.200600300150075073e-01 7.818322359946127120e-01 4.701188114766670367e-03 1.751008402484719936e-02 7.287884153250888675e-01 5.206468411447614386e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.316490720264580361e+00
1.100550275137568701e-01 7.980447191201720525e-01 4.385762447164300026e-03 1.525388218997747285e-02 7.099916149028387968e-01 6.037829885778512562e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.323384309747392296e+00
1.100550275137568701e-01 7.983138889462880750e-01 4.116592616556245809e-03 1.498455549902395767e-02 7.229340102547647806e-01 6.126145756763820316e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.319461725791895468e+00
1.100550275137568701e-01 7.985789859971758053e-01 3.851495569903370508e-03 1.471929978197230107e-02 7.361425721269001521e-01 6.213917930359817632e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314441280877187035e+00
1.000500250125062468e-01 8.150210467700533812e-01 3.627796371820455473e-03 1.269740138511406963e-02 7.122645413512264101e-01 7.288527559148303681e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.323549907366924572e+00
1.000500250125062468e-01 8.152276839548540099e-01 3.421159183877863896e-03 1.249066436644326837e-02 7.241899233277033776e-01 7.388356071661421254e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.319827933023133726e+00
1.000500250125062468e-01 8.154313020192711647e-01 3.217541115114595784e-03 1.228694546212690496e-02 7.363329324285342592e-01 7.487766883497660331e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.315179934163488218e+00
9.004502251125562351e-02 8.321518658729569751e-01 3.043137009195915742e-03 1.046147644550262865e-02 7.074457805949279088e-01 8.906385254301828525e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.325535647507160908e+00
9.004502251125562351e-02 8.323069572663979176e-01 2.888045613168111012e-03 1.030632504017702303e-02 7.181954571564023171e-01 9.020321397817447462e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.322537389946351949e+00
9.004502251125562351e-02 8.324601490777584489e-01 2.734853800807591877e-03 1.015307264198938957e-02 7.291355900849746385e-01 9.134354298586039533e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.318782288237488221e+00
9.004502251125562351e-02 8.326110790827030428e-01 2.583923792585037654e-03 1.000208155393527039e-02 7.402415800180465189e-01 9.247912162950690629e+01 0.000000000000000000e+00 0.000000000000000000e+00 1.314251559911986611e+00
8.004002001000500022e-02 8.496137792381770470e-01 2.461806867468999387e-03 8.380763184413277458e-03 7.049343943093580034e-01 1.119064870313245450e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.326780081485962048e+00
8.004002001000500022e-02 8.497256348081783095e-01 2.349951293679399238e-03 8.268873639568534786e-03 7.145433824596471029e-01 1.132217394394776164e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.324294303598700262e+00
8.004002001000500022e-02 8.498363066722027792e-01 2.239279425838654972e-03 8.158167501738578659e-03 7.243098324031265189e-01 1.145417586727265871e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.321207010125557524e+00
8.004002001000500022e-02 8.499455856747557547e-01 2.130000421022929576e-03 8.048853968148163979e-03 7.342167343532854940e-01 1.158617955768291949e+02 0.000000000000000000e+00 0.000000000000000000e+00 1.317492084097994898e+00
......@@ -66,9 +66,9 @@ def SearchForMax(array:list):
#parameters
kappa_a=2;kappa_b=2;kappa_c=2
psi0_l=[0,1,0]
Ea=1
g=1
DeltaB=np.linspace(-4,4,40)
Ea=10
g=4
DeltaB=np.linspace(-40,40,80)
tlist=np.linspace(0,20,2000)
#data storage
......
#!/bin/sh
#SBATCH -J SFG_Search
#SBATCH -o job-%j.log
#SBATCH -e job-%j.err
#SBATCH -N 4 -n 8
cd /gpfs/home/quaninfo/yesunhuang/SFG
conda activate sfg_dev
python SFG_search.py
'''
Name: SFG_search.py
Desriptption:
Email: yesunhuang@mail.ustc.edu.cn
OpenSource: https://github.com/yesunhuang
Msg: For super computer
Author: YesunHuang
Date: 2021-06-05 21:15:28
'''
#import area
from qutip import*
import numpy as np
from scipy import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
from matplotlib.pyplot import MultipleLocator
import time
'''
@name: BuildOperator_Exact
@fuction: Helper function for mesolve
@param {float} Ea
@param {float} deltaB
@param {float} g
@return {qobj} operator
'''
def BuildOperator_Exact(Ea:float,DeltaB:float,g:float):
Na=int(max(math.ceil(Ea*Ea+6*Ea),4)); Nb=5*psi0_l[1]; Nc=Nb
psi0=tensor(basis(Na,psi0_l[0]),basis(Nb,psi0_l[1]),basis(Nc,psi0_l[2]))
a=tensor(destroy(Na),qeye(Nb),qeye(Nc))
b=tensor(qeye(Na),destroy(Nb),qeye(Nc))
c=tensor(qeye(Na),qeye(Nb),destroy(Nc))
H=g*(a.dag()*b*c.dag()+a*b.dag()*c)+Ea*(a.dag()+a)+DeltaB*b.dag()*b
c_ops=[]
c_ops.append(np.sqrt(kappa_a)*a)
c_ops.append(np.sqrt(kappa_b)*b)
c_ops.append(np.sqrt(kappa_c)*c)
operator={'Hamilton':H,'Collapse':c_ops,'Initial_state':psi0,'track':[b.dag()*b,\
c.dag()*c,\
a.dag()*a,\
a.dag()*b.dag()*b*a,\
a.dag()*c.dag()*c*a,\
b.dag()*b.dag()*b*b,\
c.dag()*c.dag()*c*c,\
a.dag()*a.dag()*a*a]}
return operator
'''
@name: SearchForMax
@fuction: Search for max
@param {list} array
@return {int} maxIndex
'''
def SearchForMax(array:list):
max=0
maxIndex=0
for i in range(len(array)):
if array[i]>max:
max=array[i]
maxIndex=i
return maxIndex
#parameters
kappa_a=2;kappa_b=2;kappa_c=2
psi0_l=[0,1,0]
Ea=1
g=1
DeltaB=np.linspace(-40,40,80)
tlist=np.linspace(0,20,2000)
#data storage
data=np.zeros([np.size(DeltaB),9])
#solve for data
ts=time.time()
for j in range(0,np.size(DeltaB)):
op=BuildOperator_Exact(Ea,DeltaB[j],g)
output=mesolve(op['Hamilton'],op['Initial_state'],tlist,op['Collapse'],op['track'])
maxIndex=SearchForMax(output.expect[1])
data[j][0]=tlist[maxIndex] #t
data[j][1]=output.expect[0][maxIndex] #Nb
data[j][2]=output.expect[1][maxIndex] #Nc
data[j][3]=output.expect[2][maxIndex] #Na
data[j][4]=output.expect[3][maxIndex]/(data[j][1]*data[j][3]) #g2ab
data[j][5]=output.expect[4][maxIndex]/(data[j][2]*data[j][3]) #g2ac
data[j][6]=output.expect[5][maxIndex]/(data[j][1]*data[j][1]) #g2b
data[j][7]=output.expect[6][maxIndex]/(data[j][2]*data[j][2]) #g2c
data[j][8]=output.expect[7][maxIndex]/(data[j][3]*data[j][3]) #g2a
te=time.time()
print('Time cost:'+str(te-ts)+'s')
#save data
np.savetxt('Data/population_g_'+str(g)+'_Ea_'+str(Ea)+'_DeltaB_'+str(DeltaB[0])+'-'+str(DeltaB[-1])+'.txt',data)
np.save('Data/population_g_'+str(g)+'_Ea_'+str(Ea)+'_DeltaB_'+str(DeltaB[0])+'-'+str(DeltaB[-1])+'.npy',data)
#print population
fig, axes = plt.subplots(3,1 , figsize=(3,18))
axes[0].set_xlabel(r'$\Delta_b$')
axes[1].set_xlabel(r'$\Delta_b$')
axes[1].set_xlabel(r'$\Delta_b$')
axes[0].set_ylabel(r'$\langle b^{\dagger}b\rangle$')
axes[1].set_ylabel(r'$\langle c^{\dagger}c\rangle$')
axes[2].set_ylabel(r'$\langle a^{\dagger}a\rangle$')
axes[0].plot(DeltaB,data[...,0],linestyle='-')
axes[1].plot(DeltaB,data[...,1],linestyle='-')
axes[2].plot(DeltaB,data[...,2],linestyle='-')
fig.savefig('imgs/population_g_'+str(g)+'_Ea_'+str(Ea)+'_DeltaB_'+str(DeltaB[0])+'-'+str(DeltaB[-1])+'.svg',dpi=600,format='svg',bbox_inches='tight')
#print other data
fig, axes = plt.subplots(3,2,figsize=(12,18))
axes[0,0].set_xlabel(r'$\Delta_b$')
axes[0,1].set_xlabel(r'$\Delta_b$')
axes[1,0].set_xlabel(r'$\Delta_b$')
axes[1,1].set_xlabel(r'$\Delta_b$')
axes[2,0].set_xlabel(r'$\Delta_b$')
axes[2,1].set_xlabel(r'$\Delta_b$')
#axes[0,1].set_ylim(0,5)
#axes[1,0].set_ylim(0,2)
#axes[1,1].set_ylim(0,2)
#axes[2,0].set_ylim(0,2)
axes[0,0].plot(DeltaB,data[...,4],linestyle='-.')
axes[0,1].plot(DeltaB,data[...,5],linestyle='-.')
axes[1,0].plot(DeltaB,data[...,8],linestyle='-.')
axes[1,1].plot(DeltaB,data[...,6],linestyle='-.')
axes[2,0].plot(DeltaB,data[...,7],linestyle='-.')
axes[2,1].plot(DeltaB,data[...,0],linestyle='-.')
axes[0,0].set_ylabel(r'$g_2ab$')
axes[0,1].set_ylabel(r'$g_2ac$')
axes[1,0].set_ylabel(r'$g_2a$')
axes[1,1].set_ylabel(r'$g_2b$')
axes[2,0].set_ylabel(r'$g_2c$')
axes[2,1].set_ylabel(r'$t_max$')
fig.savefig('imgs/otherData_g_'+str(g)+'_Ea_'+str(Ea)+'_DeltaB_'+str(DeltaB[0])+'-'+str(DeltaB[-1])+'.svg',dpi=600,format='svg',bbox_inches='tight')
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment