Gross-Pitaevskii equation with magnetism

We solve the 2D Gross-Pitaevskii equation with a magnetic field. This is similar to the previous example (Gross-Pitaevskii equation in one dimension), but with an extra term for the magnetic field. We reproduce here the results of https://arxiv.org/pdf/1611.02045.pdf Fig. 10

In [1]:
using DFTK
using StaticArrays
using Plots

Unit cell. Having one of the lattice vectors as zero means a 2D system

In [2]:
a = 15
lattice = a .* [[1 0 0.]; [0 1 0]; [0 0 0]];

Confining scalar potential, and magnetic vector potential

In [3]:
pot(x, y, z) = ((x - a/2)^2 + (y - a/2)^2)/2
ω = .6
Apot(x, y, z) = ω * @SVector [y - a/2, -(x - a/2), 0]
Apot(X) = Apot(X...);

Parameters

In [4]:
Ecut = 20  # Increase this for production
η = 500
C = η/2
α = 2
n_electrons = 1;  # Increase this for fun

Collect all the terms, build and run the model

In [5]:
terms = [Kinetic(),
         ExternalFromReal(X -> pot(X...)),
         PowerNonlinearity(C, α),
         Magnetic(Apot),
]
model = Model(lattice; n_electrons=n_electrons,
              terms=terms, spin_polarization=:spinless)  # "spinless electrons"
basis = PlaneWaveBasis(model, Ecut, kgrid=(1, 1, 1))
scfres = direct_minimization(basis, tol=1e-5)  # Reduce tol for production
heatmap(scfres.ρ[:, :, 1, 1], c=:blues)
Iter     Function value   Gradient norm 
     0     3.102290e+01     7.041416e+00
 * time: 0.0018489360809326172
     1     2.840777e+01     4.949200e+00
 * time: 0.006920814514160156
     2     2.097527e+01     5.716790e+00
 * time: 0.012439966201782227
     3     1.370089e+01     2.886502e+00
 * time: 0.016038894653320312
     4     1.116671e+01     1.133748e+00
 * time: 0.01960587501525879
     5     1.040005e+01     2.048981e+00
 * time: 0.022694826126098633
     6     9.888087e+00     1.255660e+00
 * time: 0.025656938552856445
     7     9.461884e+00     1.011384e+00
 * time: 0.028729915618896484
     8     9.000984e+00     8.456923e-01
 * time: 0.03168487548828125
     9     8.655796e+00     9.045388e-01
 * time: 0.03452897071838379
    10     8.390322e+00     5.943918e-01
 * time: 0.03753781318664551
    11     8.350848e+00     1.030523e+00
 * time: 0.040007829666137695
    12     8.294046e+00     8.644571e-01
 * time: 0.04257392883300781
    13     8.198117e+00     6.974578e-01
 * time: 0.04592585563659668
    14     8.048967e+00     4.116745e-01
 * time: 0.04960989952087402
    15     7.957076e+00     3.845398e-01
 * time: 0.05331587791442871
    16     7.943642e+00     6.021342e-01
 * time: 0.092681884765625
    17     7.911156e+00     5.087298e-01
 * time: 0.09547591209411621
    18     7.879390e+00     5.412756e-01
 * time: 0.09806990623474121
    19     7.842516e+00     3.481325e-01
 * time: 0.10102200508117676
    20     7.812414e+00     2.676037e-01
 * time: 0.10408997535705566
    21     7.782916e+00     3.394597e-01
 * time: 0.10641288757324219
    22     7.765237e+00     3.985629e-01
 * time: 0.10876202583312988
    23     7.746721e+00     1.605332e-01
 * time: 0.11177182197570801
    24     7.732907e+00     2.088353e-01
 * time: 0.1141350269317627
    25     7.728162e+00     2.831760e-01
 * time: 0.11638784408569336
    26     7.725938e+00     2.903319e-01
 * time: 0.11867284774780273
    27     7.715058e+00     2.002263e-01
 * time: 0.12154793739318848
    28     7.705152e+00     2.600964e-01
 * time: 0.12373900413513184
    29     7.699972e+00     2.184188e-01
 * time: 0.12601494789123535
    30     7.692585e+00     2.279659e-01
 * time: 0.12842392921447754
    31     7.689894e+00     2.321909e-01
 * time: 0.1306748390197754
    32     7.683332e+00     2.787574e-01
 * time: 0.13326787948608398
    33     7.680395e+00     1.890848e-01
 * time: 0.13609600067138672
    34     7.672437e+00     1.547245e-01
 * time: 0.13898992538452148
    35     7.669930e+00     2.164050e-01
 * time: 0.14186501502990723
    36     7.665492e+00     1.855944e-01
 * time: 0.14486002922058105
    37     7.661820e+00     1.272048e-01
 * time: 0.14773893356323242
    38     7.657584e+00     1.362699e-01
 * time: 0.15016889572143555
    39     7.654934e+00     8.766086e-02
 * time: 0.15271401405334473
    40     7.654480e+00     1.598830e-01
 * time: 0.15536999702453613
    41     7.652239e+00     9.934691e-02
 * time: 0.1589670181274414
    42     7.650453e+00     7.527233e-02
 * time: 0.16277003288269043
    43     7.649083e+00     1.150946e-01
 * time: 0.165618896484375
    44     7.648177e+00     8.135321e-02
 * time: 0.16861701011657715
    45     7.646946e+00     7.720579e-02
 * time: 0.17166686058044434
    46     7.645058e+00     5.406924e-02
 * time: 0.17465686798095703
    47     7.643652e+00     5.052017e-02
 * time: 0.17757081985473633
    48     7.642202e+00     6.189246e-02
 * time: 0.18045401573181152
    49     7.641855e+00     9.368634e-02
 * time: 0.18334603309631348
    50     7.641054e+00     6.412553e-02
 * time: 0.18594789505004883
    51     7.639683e+00     3.917063e-02
 * time: 0.20866894721984863
    52     7.638715e+00     5.194167e-02
 * time: 0.21099591255187988
    53     7.638035e+00     6.588134e-02
 * time: 0.21354293823242188
    54     7.636989e+00     6.142308e-02
 * time: 0.2164309024810791
    55     7.636072e+00     4.057438e-02
 * time: 0.21939587593078613
    56     7.635475e+00     4.872530e-02
 * time: 0.222398042678833
    57     7.634980e+00     3.900013e-02
 * time: 0.22528791427612305
    58     7.634404e+00     4.278678e-02
 * time: 0.2277059555053711
    59     7.634009e+00     5.571754e-02
 * time: 0.2299790382385254
    60     7.633680e+00     5.079089e-02
 * time: 0.23236584663391113
    61     7.633375e+00     5.332203e-02
 * time: 0.23460984230041504
    62     7.632928e+00     7.453823e-02
 * time: 0.2369098663330078
    63     7.632317e+00     5.953921e-02
 * time: 0.2391979694366455
    64     7.631522e+00     4.226178e-02
 * time: 0.24220800399780273
    65     7.631328e+00     7.342402e-02
 * time: 0.24451398849487305
    66     7.630578e+00     4.370234e-02
 * time: 0.2468578815460205
    67     7.629892e+00     6.013812e-02
 * time: 0.24912190437316895
    68     7.629020e+00     3.830866e-02
 * time: 0.2514188289642334
    69     7.628330e+00     4.472795e-02
 * time: 0.25385403633117676
    70     7.627872e+00     5.994983e-02
 * time: 0.25613903999328613
    71     7.627804e+00     7.089002e-02
 * time: 0.25854992866516113
    72     7.627268e+00     6.465028e-02
 * time: 0.261538028717041
    73     7.627131e+00     9.168751e-02
 * time: 0.2640049457550049
    74     7.627032e+00     8.133178e-02
 * time: 0.2662949562072754
    75     7.626524e+00     6.939501e-02
 * time: 0.26857900619506836
    76     7.625646e+00     8.837095e-02
 * time: 0.2708468437194824
    77     7.624706e+00     5.111281e-02
 * time: 0.27394986152648926
    78     7.624605e+00     1.144389e-01
 * time: 0.27618885040283203
    79     7.623676e+00     6.356848e-02
 * time: 0.27858996391296387
    80     7.622880e+00     6.605025e-02
 * time: 0.2809908390045166
    81     7.622372e+00     6.413931e-02
 * time: 0.2839798927307129
    82     7.621806e+00     4.222750e-02
 * time: 0.286984920501709
    83     7.621357e+00     5.332367e-02
 * time: 0.2892758846282959
    84     7.620831e+00     4.491713e-02
 * time: 0.30832791328430176
    85     7.620395e+00     3.744157e-02
 * time: 0.311262845993042
    86     7.619932e+00     2.750860e-02
 * time: 0.314162015914917
    87     7.619625e+00     4.952384e-02
 * time: 0.31640100479125977
    88     7.619325e+00     4.109088e-02
 * time: 0.3193199634552002
    89     7.618805e+00     4.077561e-02
 * time: 0.3223879337310791
    90     7.618440e+00     6.256811e-02
 * time: 0.32460999488830566
    91     7.618277e+00     5.624196e-02
 * time: 0.3268589973449707
    92     7.617923e+00     4.926166e-02
 * time: 0.3297419548034668
    93     7.617529e+00     3.595190e-02
 * time: 0.33199286460876465
    94     7.617030e+00     4.915827e-02
 * time: 0.33424997329711914
    95     7.616617e+00     4.009074e-02
 * time: 0.3372659683227539
    96     7.616325e+00     3.765083e-02
 * time: 0.3400909900665283
    97     7.615827e+00     4.831876e-02
 * time: 0.3425748348236084
    98     7.615529e+00     4.149599e-02
 * time: 0.3454148769378662
    99     7.615277e+00     5.030796e-02
 * time: 0.3477199077606201
   100     7.614993e+00     2.840701e-02
 * time: 0.35056400299072266
   101     7.614957e+00     6.053424e-02
 * time: 0.3530080318450928
   102     7.614873e+00     4.829080e-02
 * time: 0.3552408218383789
   103     7.614364e+00     4.870874e-02
 * time: 0.3575890064239502
   104     7.614015e+00     6.855373e-02
 * time: 0.3598289489746094
   105     7.613472e+00     5.783060e-02
 * time: 0.36226892471313477
   106     7.613176e+00     5.116245e-02
 * time: 0.36455202102661133
   107     7.612838e+00     3.983134e-02
 * time: 0.36757683753967285
   108     7.612509e+00     3.729807e-02
 * time: 0.36981201171875
   109     7.612240e+00     3.433138e-02
 * time: 0.37215685844421387
   110     7.611957e+00     4.622372e-02
 * time: 0.37439489364624023
   111     7.611711e+00     3.217555e-02
 * time: 0.3774528503417969
   112     7.611399e+00     3.286435e-02
 * time: 0.380511999130249
   113     7.611322e+00     4.109409e-02
 * time: 0.3829958438873291
   114     7.611141e+00     3.494357e-02
 * time: 0.3852348327636719
   115     7.610745e+00     5.965660e-02
 * time: 0.38759398460388184
   116     7.610352e+00     4.204375e-02
 * time: 0.3898189067840576
   117     7.610031e+00     3.620723e-02
 * time: 0.3923499584197998
   118     7.609874e+00     4.097104e-02
 * time: 0.4032559394836426
   119     7.609354e+00     4.943510e-02
 * time: 0.4055008888244629
   120     7.609015e+00     2.944610e-02
 * time: 0.40834784507751465
   121     7.608768e+00     4.623617e-02
 * time: 0.41059398651123047
   122     7.608608e+00     3.723652e-02
 * time: 0.41300296783447266
   123     7.608435e+00     2.723995e-02
 * time: 0.4158759117126465
   124     7.608404e+00     5.236463e-02
 * time: 0.41828489303588867
   125     7.608051e+00     3.931512e-02
 * time: 0.421205997467041
   126     7.607862e+00     3.253523e-02
 * time: 0.4241750240325928
   127     7.607687e+00     3.829422e-02
 * time: 0.4265158176422119
   128     7.607525e+00     3.936380e-02
 * time: 0.4288468360900879
   129     7.607300e+00     2.277224e-02
 * time: 0.43172693252563477
   130     7.607037e+00     2.225021e-02
 * time: 0.43400001525878906
   131     7.606898e+00     2.747788e-02
 * time: 0.43624091148376465
   132     7.606719e+00     2.867698e-02
 * time: 0.43854784965515137
   133     7.606591e+00     1.936495e-02
 * time: 0.44152283668518066
   134     7.606474e+00     2.327721e-02
 * time: 0.4444398880004883
   135     7.606350e+00     1.397533e-02
 * time: 0.44738292694091797
   136     7.606283e+00     2.037536e-02
 * time: 0.4496469497680664
   137     7.606139e+00     2.166394e-02
 * time: 0.45197582244873047
   138     7.606028e+00     1.691680e-02
 * time: 0.4548468589782715
   139     7.605931e+00     3.363934e-02
 * time: 0.4571249485015869
   140     7.605885e+00     3.210235e-02
 * time: 0.4593830108642578
   141     7.605735e+00     3.743706e-02
 * time: 0.46168994903564453
   142     7.605672e+00     2.553263e-02
 * time: 0.4640069007873535
   143     7.605569e+00     3.283540e-02
 * time: 0.46627283096313477
   144     7.605387e+00     2.316794e-02
 * time: 0.468552827835083
   145     7.605260e+00     3.224783e-02
 * time: 0.4708118438720703
   146     7.605209e+00     3.186753e-02
 * time: 0.47321295738220215
   147     7.605165e+00     3.512431e-02
 * time: 0.4754478931427002
   148     7.605161e+00     5.130535e-02
 * time: 0.4778409004211426
   149     7.605003e+00     2.895404e-02
 * time: 0.4800739288330078
   150     7.604861e+00     4.363684e-02
 * time: 0.482496976852417
   151     7.604709e+00     1.558589e-02
 * time: 0.4855179786682129
   152     7.604545e+00     2.500268e-02
 * time: 0.49652791023254395
   153     7.604422e+00     2.204940e-02
 * time: 0.4995279312133789
   154     7.604363e+00     3.075254e-02
 * time: 0.5018858909606934
   155     7.604280e+00     3.219137e-02
 * time: 0.5042359828948975
   156     7.604230e+00     3.849645e-02
 * time: 0.5066089630126953
   157     7.604108e+00     2.877284e-02
 * time: 0.5096139907836914
   158     7.603934e+00     2.888318e-02
 * time: 0.512617826461792
   159     7.603731e+00     1.754829e-02
 * time: 0.5156219005584717
   160     7.603524e+00     2.132989e-02
 * time: 0.5178928375244141
   161     7.603486e+00     3.557791e-02
 * time: 0.520143985748291
   162     7.603342e+00     2.550083e-02
 * time: 0.5224509239196777
   163     7.603185e+00     2.814757e-02
 * time: 0.5247318744659424
   164     7.603074e+00     4.622987e-02
 * time: 0.5271279811859131
   165     7.602846e+00     2.494884e-02
 * time: 0.5300228595733643
   166     7.602685e+00     3.211304e-02
 * time: 0.5323209762573242
   167     7.602513e+00     2.603963e-02
 * time: 0.535161018371582
   168     7.602400e+00     4.820417e-02
 * time: 0.5375568866729736
   169     7.602260e+00     4.101240e-02
 * time: 0.5397899150848389
   170     7.602105e+00     3.786428e-02
 * time: 0.5428140163421631
   171     7.602016e+00     4.638605e-02
 * time: 0.5450470447540283
   172     7.601765e+00     4.340607e-02
 * time: 0.5480949878692627
   173     7.601575e+00     4.458416e-02
 * time: 0.5511059761047363
   174     7.601400e+00     5.454856e-02
 * time: 0.5535039901733398
   175     7.601009e+00     3.113959e-02
 * time: 0.5557270050048828
   176     7.600793e+00     2.206292e-02
 * time: 0.5587968826293945
   177     7.600657e+00     2.376004e-02
 * time: 0.5618908405303955
   178     7.600463e+00     2.238766e-02
 * time: 0.5642938613891602
   179     7.600371e+00     3.672642e-02
 * time: 0.5665860176086426
   180     7.600316e+00     4.326935e-02
 * time: 0.5689868927001953
   181     7.600138e+00     5.547518e-02
 * time: 0.5715160369873047
   182     7.599836e+00     4.137294e-02
 * time: 0.5740549564361572
   183     7.599775e+00     4.531431e-02
 * time: 0.5765838623046875
   184     7.599562e+00     5.338432e-02
 * time: 0.5789139270782471
   185     7.599180e+00     4.253677e-02
 * time: 0.5901570320129395
   186     7.599165e+00     4.784022e-02
 * time: 0.5927720069885254
   187     7.599000e+00     4.425419e-02
 * time: 0.5951118469238281
   188     7.598760e+00     3.243815e-02
 * time: 0.5982010364532471
   189     7.598566e+00     4.819262e-02
 * time: 0.6005439758300781
   190     7.598439e+00     5.266591e-02
 * time: 0.6029269695281982
   191     7.598423e+00     6.374650e-02
 * time: 0.6052608489990234
   192     7.598010e+00     6.289213e-02
 * time: 0.6083559989929199
   193     7.597793e+00     5.683004e-02
 * time: 0.6106388568878174
   194     7.597546e+00     6.211485e-02
 * time: 0.613090991973877
   195     7.597473e+00     5.042880e-02
 * time: 0.6154630184173584
   196     7.597134e+00     4.642671e-02
 * time: 0.6178610324859619
   197     7.597072e+00     6.263889e-02
 * time: 0.620189905166626
   198     7.596587e+00     5.182877e-02
 * time: 0.6230578422546387
   199     7.596243e+00     4.544697e-02
 * time: 0.6260459423065186
   200     7.596068e+00     3.643112e-02
 * time: 0.6284899711608887
   201     7.596041e+00     6.219180e-02
 * time: 0.6307530403137207
   202     7.595757e+00     5.405962e-02
 * time: 0.633836030960083
   203     7.595583e+00     3.919552e-02
 * time: 0.6368780136108398
   204     7.595555e+00     5.148544e-02
 * time: 0.6393508911132812
   205     7.595329e+00     4.462371e-02
 * time: 0.6418328285217285
   206     7.595030e+00     4.471488e-02
 * time: 0.6442320346832275
   207     7.594872e+00     3.658050e-02
 * time: 0.6473250389099121
   208     7.594684e+00     3.072993e-02
 * time: 0.6495640277862549
   209     7.594620e+00     3.742502e-02
 * time: 0.6520109176635742
   210     7.594491e+00     3.668803e-02
 * time: 0.6549868583679199
   211     7.594338e+00     2.719559e-02
 * time: 0.6582369804382324
   212     7.594192e+00     1.184969e-02
 * time: 0.6614518165588379
   213     7.594130e+00     1.735984e-02
 * time: 0.6637728214263916
   214     7.594117e+00     3.105997e-02
 * time: 0.6662440299987793
   215     7.594115e+00     2.907798e-02
 * time: 0.6686220169067383
   216     7.594099e+00     2.492571e-02
 * time: 0.6709568500518799
   217     7.594037e+00     1.858997e-02
 * time: 0.6733658313751221
   218     7.593967e+00     1.892479e-02
 * time: 0.675743818283081
   219     7.593841e+00     1.893340e-02
 * time: 0.6869869232177734
   220     7.593720e+00     7.826913e-03
 * time: 0.6900689601898193
   221     7.593704e+00     1.684473e-02
 * time: 0.6925289630889893
   222     7.593659e+00     1.214727e-02
 * time: 0.694943904876709
   223     7.593654e+00     1.549655e-02
 * time: 0.6974649429321289
   224     7.593621e+00     1.408484e-02
 * time: 0.6998920440673828
   225     7.593587e+00     8.559957e-03
 * time: 0.7030520439147949
   226     7.593542e+00     1.016134e-02
 * time: 0.7062668800354004
   227     7.593495e+00     1.094938e-02
 * time: 0.7093589305877686
   228     7.593444e+00     6.977957e-03
 * time: 0.7124788761138916
   229     7.593424e+00     1.182483e-02
 * time: 0.71486496925354
   230     7.593403e+00     1.310013e-02
 * time: 0.7173929214477539
   231     7.593392e+00     1.383707e-02
 * time: 0.7197329998016357
   232     7.593380e+00     1.695454e-02
 * time: 0.7223069667816162
   233     7.593365e+00     1.192060e-02
 * time: 0.7246530055999756
   234     7.593353e+00     1.355933e-02
 * time: 0.7271528244018555
   235     7.593332e+00     9.094047e-03
 * time: 0.7295999526977539
   236     7.593288e+00     8.053882e-03
 * time: 0.7320489883422852
   237     7.593265e+00     1.405932e-02
 * time: 0.73447585105896
   238     7.593234e+00     1.048732e-02
 * time: 0.7369370460510254
   239     7.593213e+00     7.938562e-03
 * time: 0.7400178909301758
   240     7.593193e+00     7.865888e-03
 * time: 0.7432348728179932
   241     7.593187e+00     1.138788e-02
 * time: 0.7456369400024414
   242     7.593174e+00     9.469342e-03
 * time: 0.7486598491668701
   243     7.593160e+00     6.798705e-03
 * time: 0.7516608238220215
   244     7.593159e+00     1.093102e-02
 * time: 0.7542450428009033
   245     7.593146e+00     7.775876e-03
 * time: 0.7575018405914307
   246     7.593136e+00     8.500382e-03
 * time: 0.7603809833526611
   247     7.593127e+00     6.138444e-03
 * time: 0.7627630233764648
   248     7.593117e+00     8.954750e-03
 * time: 0.7649998664855957
   249     7.593111e+00     6.341075e-03
 * time: 0.7674088478088379
   250     7.593105e+00     6.304217e-03
 * time: 0.7697160243988037
   251     7.593095e+00     7.786700e-03
 * time: 0.7720248699188232
   252     7.593082e+00     3.817842e-03
 * time: 0.7751288414001465
   253     7.593072e+00     7.646007e-03
 * time: 0.7859518527984619
   254     7.593064e+00     8.282611e-03
 * time: 0.7883968353271484
   255     7.593050e+00     5.374068e-03
 * time: 0.7912449836730957
   256     7.593043e+00     5.705911e-03
 * time: 0.7935609817504883
   257     7.593038e+00     5.497065e-03
 * time: 0.7958269119262695
   258     7.593029e+00     4.878459e-03
 * time: 0.7981808185577393
   259     7.593017e+00     4.652318e-03
 * time: 0.8010509014129639
   260     7.593015e+00     1.104281e-02
 * time: 0.8035018444061279
   261     7.593013e+00     8.086203e-03
 * time: 0.8057370185852051
   262     7.593011e+00     7.618414e-03
 * time: 0.808107852935791
   263     7.592999e+00     4.706563e-03
 * time: 0.8104839324951172
   264     7.592989e+00     9.396902e-03
 * time: 0.8128619194030762
   265     7.592985e+00     1.042203e-02
 * time: 0.8151969909667969
   266     7.592970e+00     8.589162e-03
 * time: 0.8176829814910889
   267     7.592963e+00     1.237687e-02
 * time: 0.8200428485870361
   268     7.592962e+00     1.540658e-02
 * time: 0.8223910331726074
   269     7.592951e+00     8.275880e-03
 * time: 0.8246569633483887
   270     7.592946e+00     1.262295e-02
 * time: 0.8271238803863525
   271     7.592933e+00     1.933851e-02
 * time: 0.8294618129730225
   272     7.592911e+00     1.027468e-02
 * time: 0.8324909210205078
   273     7.592893e+00     1.180618e-02
 * time: 0.8354220390319824
   274     7.592883e+00     1.038783e-02
 * time: 0.8378329277038574
   275     7.592880e+00     1.482674e-02
 * time: 0.8400628566741943
   276     7.592855e+00     9.504104e-03
 * time: 0.8431220054626465
   277     7.592834e+00     9.866064e-03
 * time: 0.8453998565673828
   278     7.592828e+00     1.989648e-02
 * time: 0.8478028774261475
   279     7.592787e+00     1.205759e-02
 * time: 0.8507568836212158
   280     7.592785e+00     1.579968e-02
 * time: 0.8531529903411865
   281     7.592764e+00     1.371804e-02
 * time: 0.8560290336608887
   282     7.592729e+00     1.070743e-02
 * time: 0.8590638637542725
   283     7.592704e+00     8.149899e-03
 * time: 0.8612768650054932
   284     7.592688e+00     1.431637e-02
 * time: 0.8636538982391357
   285     7.592658e+00     9.374058e-03
 * time: 0.8666868209838867
   286     7.592642e+00     8.178616e-03
 * time: 0.8699498176574707
   287     7.592636e+00     1.358512e-02
 * time: 0.8808798789978027
   288     7.592625e+00     1.516025e-02
 * time: 0.8833749294281006
   289     7.592611e+00     9.263103e-03
 * time: 0.8863129615783691
   290     7.592602e+00     9.580045e-03
 * time: 0.8887369632720947
   291     7.592579e+00     6.095229e-03
 * time: 0.8910820484161377
   292     7.592565e+00     1.353807e-02
 * time: 0.8934588432312012
   293     7.592553e+00     6.658948e-03
 * time: 0.896759033203125
   294     7.592552e+00     7.859525e-03
 * time: 0.8992648124694824
   295     7.592549e+00     5.818541e-03
 * time: 0.9017248153686523
   296     7.592542e+00     5.185018e-03
 * time: 0.9041600227355957
   297     7.592530e+00     7.175007e-03
 * time: 0.906466007232666
   298     7.592529e+00     1.066231e-02
 * time: 0.9087958335876465
   299     7.592523e+00     9.963244e-03
 * time: 0.9110579490661621
   300     7.592514e+00     1.142981e-02
 * time: 0.9133880138397217
   301     7.592513e+00     1.093670e-02
 * time: 0.9157090187072754
   302     7.592503e+00     8.528525e-03
 * time: 0.9180879592895508
   303     7.592503e+00     1.203676e-02
 * time: 0.9204168319702148
   304     7.592493e+00     1.025464e-02
 * time: 0.9227769374847412
   305     7.592474e+00     7.746780e-03
 * time: 0.9259998798370361
   306     7.592463e+00     6.256538e-03
 * time: 0.9289908409118652
   307     7.592460e+00     6.178687e-03
 * time: 0.931380033493042
   308     7.592452e+00     7.753947e-03
 * time: 0.9336960315704346
   309     7.592441e+00     4.178463e-03
 * time: 0.936621904373169
   310     7.592434e+00     3.672045e-03
 * time: 0.9396660327911377
   311     7.592430e+00     8.876585e-03
 * time: 0.9418928623199463
   312     7.592419e+00     5.661403e-03
 * time: 0.9449348449707031
   313     7.592418e+00     1.081678e-02
 * time: 0.9472808837890625
   314     7.592414e+00     7.256687e-03
 * time: 0.9497430324554443
   315     7.592405e+00     5.136565e-03
 * time: 0.9519619941711426
   316     7.592398e+00     5.228207e-03
 * time: 0.9543240070343018
   317     7.592386e+00     4.698692e-03
 * time: 0.9565229415893555
   318     7.592385e+00     9.713478e-03
 * time: 0.9589769840240479
   319     7.592378e+00     5.990810e-03
 * time: 0.9618508815765381
   320     7.592371e+00     6.680337e-03
 * time: 0.9642598628997803
   321     7.592366e+00     5.503588e-03
 * time: 0.9760148525238037
   322     7.592362e+00     6.541491e-03
 * time: 0.9784619808197021
   323     7.592358e+00     5.164568e-03
 * time: 0.9808449745178223
   324     7.592357e+00     1.151333e-02
 * time: 0.9831838607788086
   325     7.592351e+00     5.503384e-03
 * time: 0.9860849380493164
   326     7.592347e+00     6.053568e-03
 * time: 0.9884779453277588
   327     7.592346e+00     5.830202e-03
 * time: 0.9908618927001953
   328     7.592343e+00     4.895123e-03
 * time: 0.9931788444519043
   329     7.592343e+00     7.158989e-03
 * time: 0.9955618381500244
   330     7.592340e+00     3.902016e-03
 * time: 0.9978978633880615
   331     7.592338e+00     3.387040e-03
 * time: 1.0002338886260986
   332     7.592336e+00     4.372013e-03
 * time: 1.0024988651275635
   333     7.592333e+00     2.911150e-03
 * time: 1.0056488513946533
   334     7.592331e+00     3.097144e-03
 * time: 1.0086169242858887
   335     7.592329e+00     1.127305e-03
 * time: 1.011512041091919
   336     7.592329e+00     3.052394e-03
 * time: 1.0137269496917725
   337     7.592328e+00     2.238078e-03
 * time: 1.015941858291626
   338     7.592328e+00     2.812973e-03
 * time: 1.018263816833496
   339     7.592328e+00     3.167805e-03
 * time: 1.0206060409545898
   340     7.592327e+00     2.458869e-03
 * time: 1.0228359699249268
   341     7.592327e+00     2.349392e-03
 * time: 1.0251789093017578
   342     7.592326e+00     1.384441e-03
 * time: 1.0275919437408447
   343     7.592325e+00     7.736827e-04
 * time: 1.0308029651641846
   344     7.592324e+00     1.574218e-03
 * time: 1.0332670211791992
   345     7.592324e+00     2.662153e-03
 * time: 1.035696029663086
   346     7.592324e+00     2.477905e-03
 * time: 1.038064956665039
   347     7.592323e+00     1.475692e-03
 * time: 1.0412909984588623
   348     7.592323e+00     2.079524e-03
 * time: 1.0436749458312988
   349     7.592322e+00     1.936475e-03
 * time: 1.0466468334197998
   350     7.592322e+00     1.695085e-03
 * time: 1.0498619079589844
   351     7.592321e+00     1.225224e-03
 * time: 1.0528738498687744
   352     7.592321e+00     2.245174e-03
 * time: 1.0553250312805176
   353     7.592321e+00     1.579957e-03
 * time: 1.05769681930542
   354     7.592320e+00     1.190595e-03
 * time: 1.0601890087127686
   355     7.592320e+00     2.164596e-03
 * time: 1.0628750324249268
   356     7.592319e+00     8.348839e-04
 * time: 1.0747179985046387
   357     7.592319e+00     1.344716e-03
 * time: 1.076982021331787
   358     7.592319e+00     1.485746e-03
 * time: 1.0794780254364014
   359     7.592319e+00     8.743250e-04
 * time: 1.0824038982391357
   360     7.592318e+00     8.728192e-04
 * time: 1.084758996963501
   361     7.592318e+00     9.937941e-04
 * time: 1.0870108604431152
   362     7.592318e+00     1.526824e-03
 * time: 1.0894699096679688
   363     7.592318e+00     1.139431e-03
 * time: 1.0923569202423096
   364     7.592317e+00     9.830437e-04
 * time: 1.0948569774627686
   365     7.592317e+00     1.132396e-03
 * time: 1.0971310138702393
   366     7.592317e+00     1.005122e-03
 * time: 1.0995948314666748
   367     7.592317e+00     8.292739e-04
 * time: 1.1018319129943848
   368     7.592317e+00     4.801830e-04
 * time: 1.1048710346221924
   369     7.592317e+00     6.446411e-04
 * time: 1.1071078777313232
   370     7.592317e+00     5.355400e-04
 * time: 1.1095709800720215
   371     7.592316e+00     6.340734e-04
 * time: 1.1118450164794922
   372     7.592316e+00     9.140430e-04
 * time: 1.1142048835754395
   373     7.592316e+00     5.866546e-04
 * time: 1.1170649528503418
   374     7.592316e+00     8.865160e-04
 * time: 1.1195900440216064
   375     7.592316e+00     5.263003e-04
 * time: 1.1225619316101074
   376     7.592316e+00     6.642944e-04
 * time: 1.1250660419464111
   377     7.592316e+00     9.916131e-04
 * time: 1.1274638175964355
   378     7.592316e+00     6.791649e-04
 * time: 1.1299118995666504
   379     7.592316e+00     6.415214e-04
 * time: 1.1323189735412598
   380     7.592316e+00     6.370638e-04
 * time: 1.1353459358215332
   381     7.592316e+00     7.560462e-04
 * time: 1.1375980377197266
   382     7.592316e+00     6.905203e-04
 * time: 1.1400208473205566
   383     7.592315e+00     9.276054e-04
 * time: 1.142401933670044
   384     7.592315e+00     5.670935e-04
 * time: 1.145495891571045
   385     7.592315e+00     4.707314e-04
 * time: 1.148535966873169
   386     7.592315e+00     7.029753e-04
 * time: 1.1510210037231445
   387     7.592315e+00     1.050090e-03
 * time: 1.1535580158233643
   388     7.592315e+00     1.014299e-03
 * time: 1.1559009552001953
   389     7.592315e+00     4.029314e-04
 * time: 1.1592259407043457
   390     7.592315e+00     7.978936e-04
 * time: 1.1702518463134766
   391     7.592315e+00     6.604000e-04
 * time: 1.1725749969482422
   392     7.592315e+00     5.234645e-04
 * time: 1.1756179332733154
   393     7.592315e+00     6.564376e-04
 * time: 1.17787504196167
   394     7.592315e+00     3.842406e-04
 * time: 1.1808419227600098
   395     7.592315e+00     5.187252e-04
 * time: 1.1831228733062744
   396     7.592315e+00     4.479018e-04
 * time: 1.1856958866119385
   397     7.592315e+00     6.042387e-04
 * time: 1.187978982925415
   398     7.592315e+00     3.461923e-04
 * time: 1.1910479068756104
   399     7.592315e+00     5.946887e-04
 * time: 1.1933579444885254
   400     7.592314e+00     6.422876e-04
 * time: 1.1957910060882568
   401     7.592314e+00     3.233411e-04
 * time: 1.1988060474395752
   402     7.592314e+00     6.672690e-04
 * time: 1.2010698318481445
   403     7.592314e+00     5.501135e-04
 * time: 1.2034008502960205
   404     7.592314e+00     5.179317e-04
 * time: 1.2057700157165527
   405     7.592314e+00     4.986598e-04
 * time: 1.20806884765625
   406     7.592314e+00     6.392393e-04
 * time: 1.210526943206787
   407     7.592314e+00     5.532676e-04
 * time: 1.2128360271453857
   408     7.592314e+00     5.947960e-04
 * time: 1.2152738571166992
   409     7.592314e+00     6.107469e-04
 * time: 1.217512845993042
   410     7.592314e+00     8.784793e-04
 * time: 1.2199790477752686
   411     7.592314e+00     5.457388e-04
 * time: 1.2224488258361816
   412     7.592314e+00     5.207802e-04
 * time: 1.2247488498687744
   413     7.592314e+00     6.685354e-04
 * time: 1.227741003036499
   414     7.592314e+00     5.542814e-04
 * time: 1.230841875076294
   415     7.592314e+00     4.433835e-04
 * time: 1.2340190410614014
   416     7.592314e+00     2.840974e-04
 * time: 1.2370150089263916
   417     7.592314e+00     2.116143e-04
 * time: 1.2401340007781982
   418     7.592314e+00     6.686302e-04
 * time: 1.2423639297485352
   419     7.592314e+00     4.637688e-04
 * time: 1.2446789741516113
   420     7.592314e+00     7.000199e-04
 * time: 1.2469170093536377
   421     7.592313e+00     6.319254e-04
 * time: 1.2493369579315186
   422     7.592313e+00     5.643321e-04
 * time: 1.2516438961029053
   423     7.592313e+00     5.706201e-04
 * time: 1.2542028427124023
   424     7.592313e+00     6.002635e-04
 * time: 1.265002965927124
   425     7.592313e+00     5.652962e-04
 * time: 1.2672548294067383
   426     7.592313e+00     6.694805e-04
 * time: 1.2696988582611084
   427     7.592313e+00     7.561422e-04
 * time: 1.2719309329986572
   428     7.592313e+00     7.700220e-04
 * time: 1.274271011352539
   429     7.592313e+00     5.886958e-04
 * time: 1.2771458625793457
   430     7.592313e+00     1.242297e-03
 * time: 1.2795889377593994
   431     7.592313e+00     1.034358e-03
 * time: 1.2818570137023926
   432     7.592312e+00     1.205310e-03
 * time: 1.2842848300933838
   433     7.592312e+00     1.119195e-03
 * time: 1.2865538597106934
   434     7.592312e+00     6.624688e-04
 * time: 1.2888619899749756
   435     7.592312e+00     1.445924e-03
 * time: 1.2911510467529297
   436     7.592312e+00     1.369466e-03
 * time: 1.2935190200805664
   437     7.592312e+00     9.197517e-04
 * time: 1.296483039855957
   438     7.592312e+00     6.728694e-04
 * time: 1.2993009090423584
   439     7.592311e+00     8.488112e-04
 * time: 1.3016059398651123
   440     7.592311e+00     9.128676e-04
 * time: 1.3039519786834717
   441     7.592311e+00     5.240053e-04
 * time: 1.3068568706512451
   442     7.592311e+00     1.034452e-03
 * time: 1.3091819286346436
   443     7.592311e+00     9.269072e-04
 * time: 1.3121328353881836
   444     7.592311e+00     8.845126e-04
 * time: 1.3146109580993652
   445     7.592310e+00     8.025110e-04
 * time: 1.316922903060913
   446     7.592310e+00     6.202968e-04
 * time: 1.3200538158416748
   447     7.592310e+00     5.620058e-04
 * time: 1.323056936264038
   448     7.592310e+00     5.136854e-04
 * time: 1.3255388736724854
   449     7.592310e+00     1.002645e-03
 * time: 1.3279979228973389
   450     7.592310e+00     5.838946e-04
 * time: 1.3312909603118896
   451     7.592310e+00     6.229958e-04
 * time: 1.3338639736175537
   452     7.592309e+00     1.037268e-03
 * time: 1.3361828327178955
   453     7.592309e+00     7.810620e-04
 * time: 1.3391430377960205
   454     7.592309e+00     1.455935e-03
 * time: 1.3415579795837402
   455     7.592309e+00     1.561557e-03
 * time: 1.3440959453582764
   456     7.592309e+00     9.561142e-04
 * time: 1.3464748859405518
   457     7.592309e+00     1.151604e-03
 * time: 1.3487999439239502
   458     7.592308e+00     8.964022e-04
 * time: 1.3598418235778809
   459     7.592308e+00     1.087445e-03
 * time: 1.3621859550476074
   460     7.592308e+00     8.456089e-04
 * time: 1.3644330501556396
   461     7.592308e+00     7.271225e-04
 * time: 1.36673903465271
   462     7.592308e+00     9.024107e-04
 * time: 1.369246006011963
   463     7.592308e+00     5.428255e-04
 * time: 1.3721988201141357
   464     7.592308e+00     9.906250e-04
 * time: 1.374675989151001
   465     7.592308e+00     6.878895e-04
 * time: 1.377619981765747
   466     7.592308e+00     3.721208e-04
 * time: 1.3805079460144043
   467     7.592308e+00     4.070284e-04
 * time: 1.3829419612884521
   468     7.592307e+00     3.219611e-04
 * time: 1.38588285446167
   469     7.592307e+00     4.782827e-04
 * time: 1.3881959915161133
   470     7.592307e+00     4.801304e-04
 * time: 1.391122817993164
   471     7.592307e+00     5.861392e-04
 * time: 1.393460988998413
   472     7.592307e+00     7.772588e-04
 * time: 1.3957159519195557
   473     7.592307e+00     5.881656e-04
 * time: 1.3980779647827148
   474     7.592307e+00     5.232730e-04
 * time: 1.4003100395202637
   475     7.592307e+00     7.462374e-04
 * time: 1.4027659893035889
   476     7.592307e+00     6.163629e-04
 * time: 1.4049999713897705
   477     7.592307e+00     6.590480e-04
 * time: 1.4072790145874023
   478     7.592307e+00     7.110202e-04
 * time: 1.4095098972320557
   479     7.592307e+00     8.450639e-04
 * time: 1.4119348526000977
   480     7.592307e+00     5.254595e-04
 * time: 1.4141738414764404
   481     7.592307e+00     5.403903e-04
 * time: 1.416496992111206
   482     7.592307e+00     7.955876e-04
 * time: 1.4188239574432373
   483     7.592307e+00     8.131631e-04
 * time: 1.4218459129333496
   484     7.592307e+00     8.033843e-04
 * time: 1.4246819019317627
   485     7.592306e+00     9.001554e-04
 * time: 1.4271318912506104
   486     7.592306e+00     6.425147e-04
 * time: 1.4300038814544678
   487     7.592306e+00     6.873360e-04
 * time: 1.4323358535766602
   488     7.592306e+00     1.030023e-03
 * time: 1.4351859092712402
   489     7.592306e+00     5.899199e-04
 * time: 1.438060998916626
   490     7.592306e+00     6.312570e-04
 * time: 1.440269947052002
   491     7.592306e+00     6.195972e-04
 * time: 1.4428019523620605
   492     7.592306e+00     4.270171e-04
 * time: 1.4537379741668701
   493     7.592306e+00     3.880703e-04
 * time: 1.4559988975524902
   494     7.592306e+00     3.948447e-04
 * time: 1.458225965499878
   495     7.592306e+00     4.855579e-04
 * time: 1.460433006286621
   496     7.592306e+00     4.496147e-04
 * time: 1.462751865386963
   497     7.592306e+00     4.425022e-04
 * time: 1.4656648635864258
   498     7.592306e+00     7.195816e-04
 * time: 1.468066930770874
   499     7.592306e+00     4.748474e-04
 * time: 1.4703538417816162
   500     7.592306e+00     4.960634e-04
 * time: 1.4727048873901367
   501     7.592306e+00     6.709209e-04
 * time: 1.4750800132751465
   502     7.592306e+00     3.651232e-04
 * time: 1.478022813796997
   503     7.592306e+00     5.944828e-04
 * time: 1.4802608489990234
   504     7.592306e+00     4.468584e-04
 * time: 1.4832520484924316
   505     7.592306e+00     5.799489e-04
 * time: 1.4854748249053955
   506     7.592306e+00     8.113803e-04
 * time: 1.4876840114593506
   507     7.592306e+00     1.043600e-03
 * time: 1.4898948669433594
   508     7.592306e+00     7.190400e-04
 * time: 1.4922139644622803
   509     7.592306e+00     5.879789e-04
 * time: 1.4951839447021484
   510     7.592305e+00     6.571553e-04
 * time: 1.4975030422210693
   511     7.592305e+00     9.001956e-04
 * time: 1.4998040199279785
   512     7.592305e+00     7.378372e-04
 * time: 1.502089023590088
   513     7.592305e+00     3.964742e-04
 * time: 1.5044119358062744
   514     7.592305e+00     7.574339e-04
 * time: 1.506654977798462
   515     7.592305e+00     7.486537e-04
 * time: 1.508997917175293
   516     7.592305e+00     9.885412e-04
 * time: 1.511214017868042
   517     7.592305e+00     6.927226e-04
 * time: 1.5143029689788818
   518     7.592305e+00     4.341122e-04
 * time: 1.5172319412231445
   519     7.592305e+00     4.593987e-04
 * time: 1.51951003074646
   520     7.592305e+00     5.829484e-04
 * time: 1.5217769145965576
   521     7.592305e+00     7.709669e-04
 * time: 1.5240809917449951
   522     7.592305e+00     9.223135e-04
 * time: 1.5269789695739746
   523     7.592304e+00     4.144980e-04
 * time: 1.5299839973449707
   524     7.592304e+00     6.367513e-04
 * time: 1.5323128700256348
   525     7.592304e+00     7.192259e-04
 * time: 1.5345749855041504
   526     7.592304e+00     5.958315e-04
 * time: 1.5460779666900635
   527     7.592304e+00     6.007328e-04
 * time: 1.5484249591827393
   528     7.592304e+00     5.538829e-04
 * time: 1.5507190227508545
   529     7.592304e+00     6.352578e-04
 * time: 1.5531208515167236
   530     7.592304e+00     9.156473e-04
 * time: 1.5553369522094727
   531     7.592304e+00     1.113372e-03
 * time: 1.5577068328857422
   532     7.592304e+00     1.270301e-03
 * time: 1.5599958896636963
   533     7.592303e+00     8.576146e-04
 * time: 1.5623078346252441
   534     7.592303e+00     8.850594e-04
 * time: 1.5646400451660156
   535     7.592303e+00     1.627696e-03
 * time: 1.5669519901275635
   536     7.592303e+00     9.423361e-04
 * time: 1.5693318843841553
   537     7.592303e+00     1.034615e-03
 * time: 1.5715668201446533
   538     7.592303e+00     8.449986e-04
 * time: 1.5749030113220215
   539     7.592303e+00     6.295347e-04
 * time: 1.577193021774292
   540     7.592302e+00     7.176453e-04
 * time: 1.579530954360962
   541     7.592302e+00     6.586048e-04
 * time: 1.5824990272521973
   542     7.592302e+00     1.942404e-03
 * time: 1.584751844406128
   543     7.592302e+00     1.070989e-03
 * time: 1.5877599716186523
   544     7.592302e+00     9.657404e-04
 * time: 1.5900559425354004
   545     7.592302e+00     9.402287e-04
 * time: 1.5923488140106201
   546     7.592302e+00     1.020338e-03
 * time: 1.594667911529541
   547     7.592302e+00     8.866450e-04
 * time: 1.5969128608703613
   548     7.592302e+00     6.839219e-04
 * time: 1.5999388694763184
   549     7.592302e+00     9.526252e-04
 * time: 1.6022298336029053
   550     7.592302e+00     1.080698e-03
 * time: 1.6045429706573486
   551     7.592301e+00     8.966271e-04
 * time: 1.6068480014801025
   552     7.592301e+00     7.540693e-04
 * time: 1.6091740131378174
   553     7.592301e+00     1.231184e-03
 * time: 1.6114189624786377
   554     7.592301e+00     1.019640e-03
 * time: 1.6138370037078857
   555     7.592301e+00     9.502074e-04
 * time: 1.6161129474639893
   556     7.592301e+00     7.177609e-04
 * time: 1.619182825088501
   557     7.592301e+00     6.939495e-04
 * time: 1.6221868991851807
   558     7.592301e+00     8.901981e-04
 * time: 1.6245129108428955
   559     7.592301e+00     8.014725e-04
 * time: 1.62680983543396
   560     7.592301e+00     6.701744e-04
 * time: 1.6298069953918457
   561     7.592301e+00     4.573906e-04
 * time: 1.6411418914794922
   562     7.592301e+00     5.266435e-04
 * time: 1.6434438228607178
   563     7.592300e+00     8.559942e-04
 * time: 1.6456730365753174
   564     7.592300e+00     4.540772e-04
 * time: 1.6487088203430176
   565     7.592300e+00     5.476328e-04
 * time: 1.6509678363800049
   566     7.592300e+00     6.307882e-04
 * time: 1.653291940689087
   567     7.592300e+00     3.943299e-04
 * time: 1.6555328369140625
   568     7.592300e+00     5.727576e-04
 * time: 1.6577799320220947
   569     7.592300e+00     3.645821e-04
 * time: 1.6606390476226807
   570     7.592300e+00     5.189390e-04
 * time: 1.6630849838256836
   571     7.592300e+00     3.436121e-04
 * time: 1.6653549671173096
   572     7.592300e+00     5.047516e-04
 * time: 1.6675758361816406
   573     7.592300e+00     3.588241e-04
 * time: 1.6697778701782227
   574     7.592300e+00     3.213661e-04
 * time: 1.6720948219299316
   575     7.592300e+00     3.363915e-04
 * time: 1.6745679378509521
   576     7.592300e+00     4.599944e-04
 * time: 1.6768219470977783
   577     7.592300e+00     3.321465e-04
 * time: 1.6796610355377197
   578     7.592300e+00     3.555291e-04
 * time: 1.6819629669189453
   579     7.592300e+00     2.982073e-04
 * time: 1.6850378513336182
   580     7.592300e+00     3.049252e-04
 * time: 1.6872608661651611
   581     7.592300e+00     2.045465e-04
 * time: 1.690194845199585
   582     7.592300e+00     1.968502e-04
 * time: 1.6924188137054443
   583     7.592300e+00     1.599554e-04
 * time: 1.6948168277740479
   584     7.592300e+00     1.835117e-04
 * time: 1.697026014328003
   585     7.592300e+00     1.217371e-04
 * time: 1.6999719142913818
   586     7.592300e+00     1.793300e-04
 * time: 1.7022149562835693
   587     7.592300e+00     2.289451e-04
 * time: 1.7046480178833008
   588     7.592300e+00     1.842698e-04
 * time: 1.706885814666748
   589     7.592300e+00     1.771351e-04
 * time: 1.709928035736084
   590     7.592300e+00     1.610654e-04
 * time: 1.7121479511260986
   591     7.592300e+00     1.221196e-04
 * time: 1.7152299880981445
   592     7.592300e+00     1.481587e-04
 * time: 1.7174479961395264
   593     7.592300e+00     1.301925e-04
 * time: 1.7198619842529297
Out[5]: