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.ρ.real[:, :, 1], c=:blues)
Iter     Function value   Gradient norm 
     0     3.122979e+01     8.041349e+00
 * time: 0.0014331340789794922
     1     2.962691e+01     5.194341e+00
 * time: 0.00603795051574707
     2     2.182118e+01     6.600144e+00
 * time: 0.012025117874145508
     3     1.563171e+01     4.917492e+00
 * time: 0.01752305030822754
     4     1.186117e+01     2.149640e+00
 * time: 0.022284984588623047
     5     1.137053e+01     2.929259e+00
 * time: 0.026194095611572266
     6     1.053403e+01     1.750955e+00
 * time: 0.031018972396850586
     7     9.747891e+00     1.552575e+00
 * time: 0.034928083419799805
     8     9.090514e+00     1.679429e+00
 * time: 0.038886070251464844
     9     8.779532e+00     1.127845e+00
 * time: 0.04311013221740723
    10     8.582690e+00     9.808984e-01
 * time: 0.0481419563293457
    11     8.381509e+00     8.715960e-01
 * time: 0.052304983139038086
    12     8.223375e+00     6.743384e-01
 * time: 0.05624508857727051
    13     8.197315e+00     8.439144e-01
 * time: 0.05989503860473633
    14     8.139930e+00     7.023806e-01
 * time: 0.06377601623535156
    15     8.074470e+00     6.752596e-01
 * time: 0.09373712539672852
    16     8.036873e+00     5.538479e-01
 * time: 0.09615302085876465
    17     7.995625e+00     5.610557e-01
 * time: 0.0984959602355957
    18     7.942597e+00     4.213812e-01
 * time: 0.10098791122436523
    19     7.923442e+00     8.019301e-01
 * time: 0.10300397872924805
    20     7.907011e+00     8.261580e-01
 * time: 0.10527896881103516
    21     7.870397e+00     4.219163e-01
 * time: 0.10834407806396484
    22     7.855176e+00     5.505108e-01
 * time: 0.11079597473144531
    23     7.815045e+00     4.594445e-01
 * time: 0.11294412612915039
    24     7.799625e+00     4.662650e-01
 * time: 0.1157069206237793
    25     7.777751e+00     3.029118e-01
 * time: 0.11850595474243164
    26     7.756934e+00     3.360724e-01
 * time: 0.12151503562927246
    27     7.749661e+00     3.981501e-01
 * time: 0.12383699417114258
    28     7.748521e+00     3.674228e-01
 * time: 0.12640595436096191
    29     7.743930e+00     4.164525e-01
 * time: 0.12885308265686035
    30     7.724561e+00     2.842537e-01
 * time: 0.1319410800933838
    31     7.721135e+00     5.095137e-01
 * time: 0.13440299034118652
    32     7.708546e+00     4.804166e-01
 * time: 0.13692307472229004
    33     7.691247e+00     2.350169e-01
 * time: 0.13994407653808594
    34     7.682490e+00     3.041951e-01
 * time: 0.14243292808532715
    35     7.679673e+00     2.418369e-01
 * time: 0.14464807510375977
    36     7.674242e+00     1.786314e-01
 * time: 0.14735102653503418
    37     7.664293e+00     1.583925e-01
 * time: 0.1502389907836914
    38     7.661325e+00     2.861231e-01
 * time: 0.15380597114562988
    39     7.652962e+00     2.294544e-01
 * time: 0.1591949462890625
    40     7.647011e+00     1.843652e-01
 * time: 0.16402602195739746
    41     7.640637e+00     1.971624e-01
 * time: 0.16797494888305664
    42     7.636014e+00     1.372626e-01
 * time: 0.17357897758483887
    43     7.633162e+00     1.062178e-01
 * time: 0.1783759593963623
    44     7.631505e+00     1.006395e-01
 * time: 0.1817479133605957
    45     7.631221e+00     1.342639e-01
 * time: 0.1857929229736328
    46     7.629368e+00     8.469784e-02
 * time: 0.20447993278503418
    47     7.628685e+00     9.651779e-02
 * time: 0.20651507377624512
    48     7.627694e+00     8.109871e-02
 * time: 0.20859003067016602
    49     7.626311e+00     4.839437e-02
 * time: 0.21058011054992676
    50     7.625166e+00     5.113374e-02
 * time: 0.21263599395751953
    51     7.624780e+00     7.262042e-02
 * time: 0.21499013900756836
    52     7.624503e+00     6.358642e-02
 * time: 0.2175159454345703
    53     7.624236e+00     8.465746e-02
 * time: 0.21996712684631348
    54     7.624051e+00     7.048943e-02
 * time: 0.22196507453918457
    55     7.623163e+00     7.060252e-02
 * time: 0.22400403022766113
    56     7.622416e+00     3.661848e-02
 * time: 0.22653603553771973
    57     7.621963e+00     7.270198e-02
 * time: 0.22852802276611328
    58     7.621737e+00     8.689250e-02
 * time: 0.23093008995056152
    59     7.621224e+00     5.613937e-02
 * time: 0.23328304290771484
    60     7.620919e+00     6.026545e-02
 * time: 0.2357640266418457
    61     7.620240e+00     5.781363e-02
 * time: 0.23807501792907715
    62     7.619508e+00     4.033903e-02
 * time: 0.24078893661499023
    63     7.619377e+00     6.979910e-02
 * time: 0.24297404289245605
    64     7.618908e+00     6.716091e-02
 * time: 0.24570703506469727
    65     7.618355e+00     3.383349e-02
 * time: 0.24873113632202148
    66     7.617652e+00     3.791594e-02
 * time: 0.251068115234375
    67     7.617143e+00     4.593312e-02
 * time: 0.253277063369751
    68     7.616893e+00     8.083180e-02
 * time: 0.255648136138916
    69     7.616190e+00     4.484075e-02
 * time: 0.2586350440979004
    70     7.616032e+00     7.532133e-02
 * time: 0.2624959945678711
    71     7.615566e+00     4.377557e-02
 * time: 0.2677431106567383
    72     7.615047e+00     5.773214e-02
 * time: 0.27170705795288086
    73     7.614853e+00     5.599879e-02
 * time: 0.275130033493042
    74     7.614841e+00     7.548428e-02
 * time: 0.27919602394104004
    75     7.614441e+00     7.990188e-02
 * time: 0.28328704833984375
    76     7.614056e+00     7.432898e-02
 * time: 0.2869751453399658
    77     7.613328e+00     6.679307e-02
 * time: 0.29041504859924316
    78     7.612781e+00     5.976445e-02
 * time: 0.30577611923217773
    79     7.612486e+00     5.926440e-02
 * time: 0.3080129623413086
    80     7.612055e+00     6.092114e-02
 * time: 0.31112003326416016
    81     7.611601e+00     4.362699e-02
 * time: 0.3140439987182617
    82     7.611309e+00     3.585826e-02
 * time: 0.31603407859802246
    83     7.610903e+00     5.130359e-02
 * time: 0.31803107261657715
    84     7.610518e+00     3.544783e-02
 * time: 0.3205270767211914
    85     7.610339e+00     3.879526e-02
 * time: 0.3227670192718506
    86     7.609995e+00     3.580910e-02
 * time: 0.325747013092041
    87     7.609913e+00     7.756345e-02
 * time: 0.3281710147857666
    88     7.609824e+00     5.500128e-02
 * time: 0.3305840492248535
    89     7.609462e+00     5.539547e-02
 * time: 0.33307504653930664
    90     7.609008e+00     5.098483e-02
 * time: 0.3355889320373535
    91     7.608538e+00     3.716341e-02
 * time: 0.33866405487060547
    92     7.608480e+00     5.906393e-02
 * time: 0.3411281108856201
    93     7.608180e+00     4.713079e-02
 * time: 0.3442881107330322
    94     7.607972e+00     5.505148e-02
 * time: 0.3466460704803467
    95     7.607676e+00     5.182515e-02
 * time: 0.3488340377807617
    96     7.607194e+00     3.502500e-02
 * time: 0.35094308853149414
    97     7.607184e+00     5.021192e-02
 * time: 0.35303807258605957
    98     7.606871e+00     5.456627e-02
 * time: 0.3560910224914551
    99     7.606568e+00     3.041682e-02
 * time: 0.3591940402984619
   100     7.606377e+00     5.002653e-02
 * time: 0.3623509407043457
   101     7.606121e+00     3.774674e-02
 * time: 0.3657550811767578
   102     7.606108e+00     5.366885e-02
 * time: 0.3691270351409912
   103     7.605826e+00     3.891657e-02
 * time: 0.3742949962615967
   104     7.605723e+00     4.869222e-02
 * time: 0.37764906883239746
   105     7.605583e+00     7.508928e-02
 * time: 0.38048505783081055
   106     7.605452e+00     5.287392e-02
 * time: 0.3834221363067627
   107     7.605135e+00     3.823169e-02
 * time: 0.38662004470825195
   108     7.604837e+00     2.049159e-02
 * time: 0.39923095703125
   109     7.604801e+00     5.590117e-02
 * time: 0.4014449119567871
   110     7.604780e+00     4.867948e-02
 * time: 0.40383100509643555
   111     7.604596e+00     4.126217e-02
 * time: 0.40619611740112305
   112     7.604281e+00     4.214552e-02
 * time: 0.4082491397857666
   113     7.604201e+00     5.422412e-02
 * time: 0.4102311134338379
   114     7.604004e+00     6.177909e-02
 * time: 0.4121971130371094
   115     7.603796e+00     6.492113e-02
 * time: 0.4141850471496582
   116     7.603532e+00     4.775545e-02
 * time: 0.416748046875
   117     7.603377e+00     5.655964e-02
 * time: 0.41919398307800293
   118     7.603273e+00     5.289166e-02
 * time: 0.4216439723968506
   119     7.603077e+00     5.213989e-02
 * time: 0.4237360954284668
   120     7.603010e+00     6.035143e-02
 * time: 0.42572808265686035
   121     7.602684e+00     4.559793e-02
 * time: 0.42824792861938477
   122     7.602468e+00     4.612345e-02
 * time: 0.4308459758758545
   123     7.602223e+00     4.130215e-02
 * time: 0.4330711364746094
   124     7.601883e+00     4.218979e-02
 * time: 0.43625593185424805
   125     7.601691e+00     2.352147e-02
 * time: 0.4395010471343994
   126     7.601578e+00     2.887224e-02
 * time: 0.4419851303100586
   127     7.601397e+00     2.530797e-02
 * time: 0.44446301460266113
   128     7.601246e+00     2.756150e-02
 * time: 0.4475901126861572
   129     7.601098e+00     3.283176e-02
 * time: 0.45073699951171875
   130     7.600982e+00     3.638977e-02
 * time: 0.4540529251098633
   131     7.600751e+00     2.043097e-02
 * time: 0.45861005783081055
   132     7.600673e+00     3.205637e-02
 * time: 0.4622640609741211
   133     7.600524e+00     3.257767e-02
 * time: 0.4670069217681885
   134     7.600368e+00     4.152013e-02
 * time: 0.4708230495452881
   135     7.600159e+00     3.068077e-02
 * time: 0.4757080078125
   136     7.599995e+00     2.019210e-02
 * time: 0.47872400283813477
   137     7.599949e+00     3.422529e-02
 * time: 0.48124098777770996
   138     7.599757e+00     2.716672e-02
 * time: 0.48394107818603516
   139     7.599620e+00     3.177704e-02
 * time: 0.49555110931396484
   140     7.599512e+00     2.554000e-02
 * time: 0.4980599880218506
   141     7.599491e+00     3.421710e-02
 * time: 0.5007600784301758
   142     7.599362e+00     3.093265e-02
 * time: 0.5038719177246094
   143     7.599191e+00     4.511819e-02
 * time: 0.506385087966919
   144     7.599054e+00     3.398795e-02
 * time: 0.5094509124755859
   145     7.598900e+00     2.125321e-02
 * time: 0.5125961303710938
   146     7.598814e+00     4.055044e-02
 * time: 0.5152161121368408
   147     7.598655e+00     3.750311e-02
 * time: 0.5175681114196777
   148     7.598470e+00     2.800670e-02
 * time: 0.5205399990081787
   149     7.598397e+00     3.532578e-02
 * time: 0.5229840278625488
   150     7.598195e+00     2.672998e-02
 * time: 0.5253291130065918
   151     7.598021e+00     3.399095e-02
 * time: 0.5278270244598389
   152     7.597696e+00     2.404643e-02
 * time: 0.5311551094055176
   153     7.597640e+00     4.313169e-02
 * time: 0.5336430072784424
   154     7.597565e+00     3.324135e-02
 * time: 0.5361270904541016
   155     7.597423e+00     3.367817e-02
 * time: 0.5386481285095215
   156     7.597405e+00     4.493830e-02
 * time: 0.5411150455474854
   157     7.597230e+00     4.822960e-02
 * time: 0.5436179637908936
   158     7.597003e+00     3.339382e-02
 * time: 0.5469570159912109
   159     7.596835e+00     3.311032e-02
 * time: 0.5498371124267578
   160     7.596641e+00     3.784571e-02
 * time: 0.5519981384277344
   161     7.596476e+00     2.975651e-02
 * time: 0.5548510551452637
   162     7.596466e+00     3.859681e-02
 * time: 0.557002067565918
   163     7.596405e+00     3.852983e-02
 * time: 0.5595309734344482
   164     7.596259e+00     3.761790e-02
 * time: 0.561967134475708
   165     7.596253e+00     4.994300e-02
 * time: 0.5644609928131104
   166     7.596093e+00     4.381489e-02
 * time: 0.5665950775146484
   167     7.595878e+00     2.992704e-02
 * time: 0.5700831413269043
   168     7.595690e+00     3.570843e-02
 * time: 0.5722470283508301
   169     7.595489e+00     3.992696e-02
 * time: 0.5833749771118164
   170     7.595335e+00     3.227723e-02
 * time: 0.5861029624938965
   171     7.595157e+00     3.180085e-02
 * time: 0.588231086730957
   172     7.595055e+00     2.444863e-02
 * time: 0.5906410217285156
   173     7.594920e+00     1.698692e-02
 * time: 0.5940279960632324
   174     7.594808e+00     2.074471e-02
 * time: 0.5965960025787354
   175     7.594718e+00     2.181492e-02
 * time: 0.5991120338439941
   176     7.594632e+00     2.167301e-02
 * time: 0.6022260189056396
   177     7.594516e+00     9.238920e-03
 * time: 0.6053309440612793
   178     7.594486e+00     2.221289e-02
 * time: 0.6078379154205322
   179     7.594391e+00     2.262643e-02
 * time: 0.610522985458374
   180     7.594366e+00     2.374135e-02
 * time: 0.6130239963531494
   181     7.594310e+00     1.990355e-02
 * time: 0.6155319213867188
   182     7.594264e+00     2.243086e-02
 * time: 0.6180441379547119
   183     7.594248e+00     2.789877e-02
 * time: 0.6205379962921143
   184     7.594231e+00     2.883251e-02
 * time: 0.6230831146240234
   185     7.594153e+00     2.499256e-02
 * time: 0.6264820098876953
   186     7.594082e+00     2.225329e-02
 * time: 0.629209041595459
   187     7.594033e+00     2.538817e-02
 * time: 0.6318800449371338
   188     7.594014e+00     1.940278e-02
 * time: 0.6344740390777588
   189     7.593959e+00     2.115205e-02
 * time: 0.6379349231719971
   190     7.593910e+00     1.127434e-02
 * time: 0.6413710117340088
   191     7.593904e+00     1.684426e-02
 * time: 0.6440620422363281
   192     7.593871e+00     1.607887e-02
 * time: 0.6465799808502197
   193     7.593842e+00     1.681870e-02
 * time: 0.649183988571167
   194     7.593808e+00     1.131391e-02
 * time: 0.6524429321289062
   195     7.593778e+00     9.706294e-03
 * time: 0.6557459831237793
   196     7.593753e+00     9.213728e-03
 * time: 0.6583030223846436
   197     7.593729e+00     1.640549e-02
 * time: 0.6610541343688965
   198     7.593727e+00     1.756481e-02
 * time: 0.6640870571136475
   199     7.593699e+00     1.183837e-02
 * time: 0.6672670841217041
   200     7.593675e+00     1.020887e-02
 * time: 0.6791789531707764
   201     7.593641e+00     1.286421e-02
 * time: 0.6817100048065186
   202     7.593602e+00     1.505342e-02
 * time: 0.6842019557952881
   203     7.593580e+00     1.100117e-02
 * time: 0.6875169277191162
   204     7.593543e+00     9.048546e-03
 * time: 0.6906700134277344
   205     7.593537e+00     2.092083e-02
 * time: 0.6931331157684326
   206     7.593531e+00     1.725994e-02
 * time: 0.6956090927124023
   207     7.593504e+00     1.538315e-02
 * time: 0.6981029510498047
   208     7.593502e+00     1.934268e-02
 * time: 0.7005951404571533
   209     7.593463e+00     1.756513e-02
 * time: 0.703963041305542
   210     7.593426e+00     1.343708e-02
 * time: 0.7064769268035889
   211     7.593404e+00     1.335173e-02
 * time: 0.7089779376983643
   212     7.593382e+00     1.235428e-02
 * time: 0.7114889621734619
   213     7.593377e+00     1.183915e-02
 * time: 0.7139899730682373
   214     7.593353e+00     1.006407e-02
 * time: 0.7165710926055908
   215     7.593324e+00     1.223770e-02
 * time: 0.7192609310150146
   216     7.593300e+00     1.016437e-02
 * time: 0.7224149703979492
   217     7.593283e+00     1.331974e-02
 * time: 0.7255489826202393
   218     7.593274e+00     1.318231e-02
 * time: 0.7280299663543701
   219     7.593251e+00     9.042707e-03
 * time: 0.7312679290771484
   220     7.593242e+00     6.715157e-03
 * time: 0.7346489429473877
   221     7.593226e+00     4.483438e-03
 * time: 0.7372019290924072
   222     7.593214e+00     9.274588e-03
 * time: 0.7397110462188721
   223     7.593200e+00     8.244464e-03
 * time: 0.7422099113464355
   224     7.593197e+00     1.429226e-02
 * time: 0.7447259426116943
   225     7.593190e+00     9.599830e-03
 * time: 0.7472310066223145
   226     7.593164e+00     7.083517e-03
 * time: 0.7499289512634277
   227     7.593149e+00     1.274406e-02
 * time: 0.7524240016937256
   228     7.593140e+00     1.613032e-02
 * time: 0.7549431324005127
   229     7.593116e+00     8.387166e-03
 * time: 0.7585489749908447
   230     7.593098e+00     7.035766e-03
 * time: 0.7610471248626709
   231     7.593092e+00     1.133280e-02
 * time: 0.7728760242462158
   232     7.593074e+00     9.500377e-03
 * time: 0.7755060195922852
   233     7.593072e+00     1.284885e-02
 * time: 0.7780959606170654
   234     7.593052e+00     9.812644e-03
 * time: 0.7807259559631348
   235     7.593028e+00     9.473956e-03
 * time: 0.7839131355285645
   236     7.593008e+00     6.991877e-03
 * time: 0.7870900630950928
   237     7.592992e+00     7.683299e-03
 * time: 0.7896599769592285
   238     7.592979e+00     1.506843e-02
 * time: 0.7922711372375488
   239     7.592959e+00     7.767108e-03
 * time: 0.7956540584564209
   240     7.592941e+00     8.363681e-03
 * time: 0.798285961151123
   241     7.592928e+00     1.692358e-02
 * time: 0.8007810115814209
   242     7.592906e+00     8.651789e-03
 * time: 0.8039300441741943
   243     7.592901e+00     1.205663e-02
 * time: 0.8064329624176025
   244     7.592883e+00     9.318605e-03
 * time: 0.8095600605010986
   245     7.592863e+00     9.330215e-03
 * time: 0.8122439384460449
   246     7.592843e+00     9.139900e-03
 * time: 0.8147399425506592
   247     7.592828e+00     1.274444e-02
 * time: 0.8172080516815186
   248     7.592808e+00     1.301942e-02
 * time: 0.8197169303894043
   249     7.592787e+00     6.569008e-03
 * time: 0.8229320049285889
   250     7.592771e+00     1.179640e-02
 * time: 0.8254570960998535
   251     7.592757e+00     1.293004e-02
 * time: 0.8281240463256836
   252     7.592753e+00     1.154983e-02
 * time: 0.8306069374084473
   253     7.592736e+00     1.110358e-02
 * time: 0.8330719470977783
   254     7.592723e+00     1.204782e-02
 * time: 0.8355491161346436
   255     7.592718e+00     1.395266e-02
 * time: 0.8380270004272461
   256     7.592702e+00     1.817329e-02
 * time: 0.8404891490936279
   257     7.592700e+00     1.595070e-02
 * time: 0.8430891036987305
   258     7.592680e+00     9.572685e-03
 * time: 0.8461079597473145
   259     7.592661e+00     1.268456e-02
 * time: 0.8484909534454346
   260     7.592642e+00     1.087397e-02
 * time: 0.8509681224822998
   261     7.592633e+00     1.201636e-02
 * time: 0.8534460067749023
   262     7.592621e+00     1.444585e-02
 * time: 0.855942964553833
   263     7.592606e+00     7.205131e-03
 * time: 0.8680529594421387
   264     7.592592e+00     1.108725e-02
 * time: 0.8705160617828369
   265     7.592578e+00     1.022238e-02
 * time: 0.873661994934082
   266     7.592563e+00     7.992463e-03
 * time: 0.8769099712371826
   267     7.592560e+00     1.313093e-02
 * time: 0.879418134689331
   268     7.592543e+00     9.243734e-03
 * time: 0.88254714012146
   269     7.592535e+00     1.114048e-02
 * time: 0.8850550651550293
   270     7.592523e+00     8.722124e-03
 * time: 0.887566089630127
   271     7.592520e+00     1.131925e-02
 * time: 0.890265941619873
   272     7.592520e+00     1.123008e-02
 * time: 0.8927750587463379
   273     7.592508e+00     7.344187e-03
 * time: 0.8952910900115967
   274     7.592504e+00     9.714913e-03
 * time: 0.8977820873260498
   275     7.592492e+00     1.299734e-02
 * time: 0.9003260135650635
   276     7.592487e+00     7.806256e-03
 * time: 0.9028329849243164
   277     7.592482e+00     8.780856e-03
 * time: 0.9054291248321533
   278     7.592467e+00     6.286919e-03
 * time: 0.908668041229248
   279     7.592461e+00     6.726336e-03
 * time: 0.9118211269378662
   280     7.592455e+00     7.431509e-03
 * time: 0.9143400192260742
   281     7.592449e+00     6.141836e-03
 * time: 0.916823148727417
   282     7.592442e+00     6.426480e-03
 * time: 0.9199850559234619
   283     7.592431e+00     3.286473e-03
 * time: 0.9232759475708008
   284     7.592426e+00     3.485459e-03
 * time: 0.9264049530029297
   285     7.592425e+00     8.584793e-03
 * time: 0.9289059638977051
   286     7.592421e+00     6.630196e-03
 * time: 0.9314169883728027
   287     7.592414e+00     6.464129e-03
 * time: 0.9345629215240479
   288     7.592413e+00     8.853763e-03
 * time: 0.9372251033782959
   289     7.592408e+00     5.543389e-03
 * time: 0.9397470951080322
   290     7.592397e+00     5.780869e-03
 * time: 0.9422569274902344
   291     7.592391e+00     3.792298e-03
 * time: 0.9453740119934082
   292     7.592389e+00     4.982756e-03
 * time: 0.9479129314422607
   293     7.592383e+00     3.892845e-03
 * time: 0.9595239162445068
   294     7.592380e+00     5.351848e-03
 * time: 0.9620330333709717
   295     7.592379e+00     5.014534e-03
 * time: 0.9645059108734131
   296     7.592376e+00     3.359004e-03
 * time: 0.9677109718322754
   297     7.592373e+00     2.971451e-03
 * time: 0.9703159332275391
   298     7.592370e+00     4.519380e-03
 * time: 0.9727880954742432
   299     7.592366e+00     3.067496e-03
 * time: 0.9759190082550049
   300     7.592365e+00     2.264150e-03
 * time: 0.9791109561920166
   301     7.592364e+00     3.396637e-03
 * time: 0.9818410873413086
   302     7.592362e+00     2.864486e-03
 * time: 0.98465895652771
   303     7.592362e+00     3.623735e-03
 * time: 0.9871630668640137
   304     7.592361e+00     3.182557e-03
 * time: 0.9896650314331055
   305     7.592359e+00     4.812012e-03
 * time: 0.9921650886535645
   306     7.592358e+00     2.192644e-03
 * time: 0.9953370094299316
   307     7.592357e+00     2.777160e-03
 * time: 0.9978220462799072
   308     7.592355e+00     2.433774e-03
 * time: 1.0005090236663818
   309     7.592354e+00     3.600501e-03
 * time: 1.0029981136322021
   310     7.592353e+00     2.668612e-03
 * time: 1.0055041313171387
   311     7.592352e+00     2.998975e-03
 * time: 1.007997989654541
   312     7.592351e+00     1.791824e-03
 * time: 1.0112099647521973
   313     7.592350e+00     3.367376e-03
 * time: 1.013746976852417
   314     7.592349e+00     1.922486e-03
 * time: 1.017091989517212
   315     7.592348e+00     2.153743e-03
 * time: 1.0202760696411133
   316     7.592347e+00     1.436843e-03
 * time: 1.023442029953003
   317     7.592347e+00     2.600490e-03
 * time: 1.0259771347045898
   318     7.592346e+00     2.584244e-03
 * time: 1.0285530090332031
   319     7.592346e+00     1.942423e-03
 * time: 1.0312299728393555
   320     7.592345e+00     2.375374e-03
 * time: 1.0337319374084473
   321     7.592345e+00     2.430385e-03
 * time: 1.0363221168518066
   322     7.592345e+00     2.365220e-03
 * time: 1.038841962814331
   323     7.592344e+00     2.608496e-03
 * time: 1.041327953338623
   324     7.592343e+00     1.141218e-03
 * time: 1.0539300441741943
   325     7.592342e+00     1.268935e-03
 * time: 1.0565690994262695
   326     7.592342e+00     1.910160e-03
 * time: 1.0592501163482666
   327     7.592342e+00     2.041865e-03
 * time: 1.0619499683380127
   328     7.592341e+00     1.164659e-03
 * time: 1.0651249885559082
   329     7.592341e+00     2.831403e-03
 * time: 1.0676429271697998
   330     7.592341e+00     2.235623e-03
 * time: 1.0707969665527344
   331     7.592341e+00     1.857724e-03
 * time: 1.0733470916748047
   332     7.592341e+00     2.221466e-03
 * time: 1.0759799480438232
   333     7.592341e+00     2.085523e-03
 * time: 1.0787150859832764
   334     7.592340e+00     1.091504e-03
 * time: 1.081860065460205
   335     7.592340e+00     1.782067e-03
 * time: 1.084378957748413
   336     7.592339e+00     1.398026e-03
 * time: 1.0869081020355225
   337     7.592339e+00     1.263535e-03
 * time: 1.0901720523834229
   338     7.592339e+00     8.668438e-04
 * time: 1.0934779644012451
   339     7.592338e+00     1.195870e-03
 * time: 1.0959889888763428
   340     7.592338e+00     7.669958e-04
 * time: 1.099133014678955
   341     7.592338e+00     1.121864e-03
 * time: 1.1016099452972412
   342     7.592338e+00     1.307612e-03
 * time: 1.1041460037231445
   343     7.592338e+00     1.041482e-03
 * time: 1.1073849201202393
   344     7.592338e+00     6.369906e-04
 * time: 1.1106879711151123
   345     7.592338e+00     8.703047e-04
 * time: 1.113171100616455
   346     7.592338e+00     1.051278e-03
 * time: 1.1156530380249023
   347     7.592338e+00     7.105433e-04
 * time: 1.1181590557098389
   348     7.592337e+00     5.603412e-04
 * time: 1.1206979751586914
   349     7.592337e+00     8.054896e-04
 * time: 1.1233630180358887
   350     7.592337e+00     7.510595e-04
 * time: 1.1261470317840576
   351     7.592337e+00     1.051305e-03
 * time: 1.1288061141967773
   352     7.592337e+00     7.131994e-04
 * time: 1.1321649551391602
   353     7.592337e+00     1.006199e-03
 * time: 1.1348590850830078
   354     7.592337e+00     7.986403e-04
 * time: 1.1374831199645996
   355     7.592337e+00     7.457208e-04
 * time: 1.149277925491333
   356     7.592337e+00     7.778563e-04
 * time: 1.151871919631958
   357     7.592337e+00     3.907001e-04
 * time: 1.1551151275634766
   358     7.592337e+00     7.493911e-04
 * time: 1.157745122909546
   359     7.592337e+00     5.842344e-04
 * time: 1.1603729724884033
   360     7.592337e+00     6.562276e-04
 * time: 1.1630771160125732
   361     7.592337e+00     7.506908e-04
 * time: 1.1663539409637451
   362     7.592337e+00     8.352800e-04
 * time: 1.1689810752868652
   363     7.592337e+00     9.472751e-04
 * time: 1.1717050075531006
   364     7.592336e+00     5.720017e-04
 * time: 1.174854040145874
   365     7.592336e+00     6.304469e-04
 * time: 1.1773531436920166
   366     7.592336e+00     5.805973e-04
 * time: 1.1798839569091797
   367     7.592336e+00     6.345697e-04
 * time: 1.182507038116455
   368     7.592336e+00     7.522445e-04
 * time: 1.185157060623169
   369     7.592336e+00     6.243511e-04
 * time: 1.1886589527130127
   370     7.592336e+00     1.197960e-03
 * time: 1.1913409233093262
   371     7.592336e+00     7.431643e-04
 * time: 1.1945970058441162
   372     7.592336e+00     7.106787e-04
 * time: 1.1970889568328857
   373     7.592335e+00     7.888861e-04
 * time: 1.1997339725494385
   374     7.592335e+00     5.318967e-04
 * time: 1.2030761241912842
   375     7.592335e+00     7.995488e-04
 * time: 1.2055590152740479
   376     7.592335e+00     8.509128e-04
 * time: 1.208078145980835
   377     7.592335e+00     9.756695e-04
 * time: 1.2106060981750488
   378     7.592335e+00     9.066597e-04
 * time: 1.2130990028381348
   379     7.592335e+00     9.898951e-04
 * time: 1.2157230377197266
   380     7.592335e+00     9.154441e-04
 * time: 1.2184100151062012
   381     7.592335e+00     6.177933e-04
 * time: 1.2215609550476074
   382     7.592335e+00     7.644241e-04
 * time: 1.2240569591522217
   383     7.592335e+00     7.735228e-04
 * time: 1.2266380786895752
   384     7.592334e+00     6.502734e-04
 * time: 1.2298400402069092
   385     7.592334e+00     1.077262e-03
 * time: 1.2324090003967285
   386     7.592334e+00     1.493294e-03
 * time: 1.2444329261779785
   387     7.592334e+00     7.828781e-04
 * time: 1.2477269172668457
   388     7.592334e+00     1.047423e-03
 * time: 1.2504401206970215
   389     7.592334e+00     1.151099e-03
 * time: 1.2529981136322021
   390     7.592334e+00     6.647514e-04
 * time: 1.2561349868774414
   391     7.592334e+00     9.258147e-04
 * time: 1.2586381435394287
   392     7.592333e+00     1.467664e-03
 * time: 1.261228084564209
   393     7.592333e+00     1.117447e-03
 * time: 1.264456033706665
   394     7.592333e+00     1.002816e-03
 * time: 1.2680439949035645
   395     7.592333e+00     9.770372e-04
 * time: 1.270678997039795
   396     7.592333e+00     1.433352e-03
 * time: 1.2733500003814697
   397     7.592333e+00     1.068466e-03
 * time: 1.2767040729522705
   398     7.592333e+00     1.444333e-03
 * time: 1.2793560028076172
   399     7.592332e+00     1.232882e-03
 * time: 1.2827229499816895
   400     7.592332e+00     8.380539e-04
 * time: 1.28603196144104
   401     7.592332e+00     1.055473e-03
 * time: 1.2885429859161377
   402     7.592332e+00     9.731639e-04
 * time: 1.2911529541015625
   403     7.592332e+00     1.863298e-03
 * time: 1.2937560081481934
   404     7.592331e+00     1.681105e-03
 * time: 1.2964191436767578
   405     7.592331e+00     1.911270e-03
 * time: 1.298996925354004
   406     7.592331e+00     1.853985e-03
 * time: 1.3014941215515137
   407     7.592330e+00     2.457718e-03
 * time: 1.303995132446289
   408     7.592330e+00     2.942402e-03
 * time: 1.3065130710601807
   409     7.592330e+00     3.361880e-03
 * time: 1.3091521263122559
   410     7.592329e+00     2.767590e-03
 * time: 1.3117690086364746
   411     7.592329e+00     3.703688e-03
 * time: 1.3143870830535889
   412     7.592328e+00     2.786403e-03
 * time: 1.3168599605560303
   413     7.592328e+00     2.792871e-03
 * time: 1.3193731307983398
   414     7.592326e+00     1.512939e-03
 * time: 1.3225090503692627
   415     7.592326e+00     1.408154e-03
 * time: 1.3249740600585938
   416     7.592325e+00     1.366084e-03
 * time: 1.3283140659332275
   417     7.592324e+00     1.533627e-03
 * time: 1.3406391143798828
   418     7.592324e+00     1.312936e-03
 * time: 1.3439459800720215
   419     7.592324e+00     2.541340e-03
 * time: 1.3464200496673584
   420     7.592323e+00     1.340366e-03
 * time: 1.3495259284973145
   421     7.592323e+00     1.901944e-03
 * time: 1.3520350456237793
   422     7.592323e+00     1.669735e-03
 * time: 1.3552250862121582
   423     7.592322e+00     2.349817e-03
 * time: 1.3577120304107666
   424     7.592322e+00     1.591539e-03
 * time: 1.3604021072387695
   425     7.592321e+00     1.115719e-03
 * time: 1.363508939743042
   426     7.592321e+00     1.260761e-03
 * time: 1.3659911155700684
   427     7.592321e+00     1.413226e-03
 * time: 1.3684749603271484
   428     7.592320e+00     1.146712e-03
 * time: 1.3710739612579346
   429     7.592320e+00     1.210393e-03
 * time: 1.3736140727996826
   430     7.592320e+00     1.099374e-03
 * time: 1.376986026763916
   431     7.592319e+00     1.825105e-03
 * time: 1.3794970512390137
   432     7.592319e+00     1.076177e-03
 * time: 1.3826360702514648
   433     7.592319e+00     1.374964e-03
 * time: 1.3852241039276123
   434     7.592319e+00     8.315456e-04
 * time: 1.388519048690796
   435     7.592318e+00     1.413261e-03
 * time: 1.3912811279296875
   436     7.592318e+00     1.220718e-03
 * time: 1.3937859535217285
   437     7.592318e+00     1.689296e-03
 * time: 1.3962929248809814
   438     7.592317e+00     1.386973e-03
 * time: 1.3994309902191162
   439     7.592317e+00     1.359832e-03
 * time: 1.4019320011138916
   440     7.592317e+00     9.856739e-04
 * time: 1.404400110244751
   441     7.592316e+00     1.252170e-03
 * time: 1.407094955444336
   442     7.592316e+00     1.045679e-03
 * time: 1.410236120223999
   443     7.592316e+00     2.139240e-03
 * time: 1.412708044052124
   444     7.592316e+00     1.061380e-03
 * time: 1.4158539772033691
   445     7.592315e+00     9.521794e-04
 * time: 1.4184820652008057
   446     7.592315e+00     1.260532e-03
 * time: 1.4217870235443115
   447     7.592315e+00     1.434296e-03
 * time: 1.4334900379180908
   448     7.592315e+00     1.395546e-03
 * time: 1.436094045639038
   449     7.592315e+00     1.023787e-03
 * time: 1.438730001449585
   450     7.592315e+00     8.422402e-04
 * time: 1.441188097000122
   451     7.592315e+00     8.789574e-04
 * time: 1.443681001663208
   452     7.592315e+00     8.822153e-04
 * time: 1.4461770057678223
   453     7.592315e+00     9.217619e-04
 * time: 1.448734998703003
   454     7.592314e+00     6.674760e-04
 * time: 1.45194411277771
   455     7.592314e+00     8.688512e-04
 * time: 1.4545409679412842
   456     7.592314e+00     8.099588e-04
 * time: 1.4570159912109375
   457     7.592314e+00     8.769903e-04
 * time: 1.4595179557800293
   458     7.592314e+00     6.599960e-04
 * time: 1.4626719951629639
   459     7.592314e+00     5.023326e-04
 * time: 1.465951919555664
   460     7.592314e+00     9.451352e-04
 * time: 1.468644142150879
   461     7.592314e+00     6.629701e-04
 * time: 1.4711670875549316
   462     7.592314e+00     6.815671e-04
 * time: 1.4736671447753906
   463     7.592314e+00     1.197415e-03
 * time: 1.4761900901794434
   464     7.592314e+00     8.774134e-04
 * time: 1.4793930053710938
   465     7.592314e+00     1.506129e-03
 * time: 1.482116937637329
   466     7.592313e+00     7.846167e-04
 * time: 1.4855120182037354
   467     7.592313e+00     5.622763e-04
 * time: 1.4886629581451416
   468     7.592313e+00     1.004569e-03
 * time: 1.4911730289459229
   469     7.592313e+00     6.267797e-04
 * time: 1.4936730861663818
   470     7.592313e+00     6.173425e-04
 * time: 1.4961750507354736
   471     7.592313e+00     8.763243e-04
 * time: 1.4987709522247314
   472     7.592313e+00     7.011771e-04
 * time: 1.5020229816436768
   473     7.592313e+00     1.022897e-03
 * time: 1.5045020580291748
   474     7.592313e+00     1.062944e-03
 * time: 1.5069921016693115
   475     7.592312e+00     6.552263e-04
 * time: 1.5094640254974365
   476     7.592312e+00     1.344156e-03
 * time: 1.511965036392212
   477     7.592312e+00     7.983643e-04
 * time: 1.5145149230957031
   478     7.592312e+00     1.206719e-03
 * time: 1.5170960426330566
   479     7.592312e+00     1.091780e-03
 * time: 1.5287930965423584
   480     7.592312e+00     9.127935e-04
 * time: 1.5314481258392334
   481     7.592312e+00     8.307703e-04
 * time: 1.5339291095733643
   482     7.592312e+00     1.670341e-03
 * time: 1.5364179611206055
   483     7.592311e+00     1.393137e-03
 * time: 1.5389249324798584
   484     7.592311e+00     1.084014e-03
 * time: 1.5421299934387207
   485     7.592311e+00     6.979647e-04
 * time: 1.5453450679779053
   486     7.592311e+00     9.840887e-04
 * time: 1.5480151176452637
   487     7.592311e+00     8.268222e-04
 * time: 1.5511541366577148
   488     7.592311e+00     5.040654e-04
 * time: 1.5543699264526367
   489     7.592311e+00     1.622945e-03
 * time: 1.5569190979003906
   490     7.592310e+00     1.203215e-03
 * time: 1.5596251487731934
   491     7.592310e+00     1.095909e-03
 * time: 1.562330961227417
   492     7.592310e+00     1.383502e-03
 * time: 1.5648219585418701
   493     7.592310e+00     1.868239e-03
 * time: 1.567331075668335
   494     7.592310e+00     1.071701e-03
 * time: 1.5699360370635986
   495     7.592309e+00     1.228139e-03
 * time: 1.5725600719451904
   496     7.592309e+00     1.447945e-03
 * time: 1.575186014175415
   497     7.592309e+00     1.472284e-03
 * time: 1.5778329372406006
   498     7.592308e+00     9.794771e-04
 * time: 1.5804810523986816
   499     7.592308e+00     8.326715e-04
 * time: 1.5830590724945068
   500     7.592308e+00     1.244760e-03
 * time: 1.5862109661102295
   501     7.592308e+00     1.803163e-03
 * time: 1.5887501239776611
   502     7.592308e+00     1.425418e-03
 * time: 1.591357946395874
   503     7.592307e+00     1.291239e-03
 * time: 1.5940399169921875
   504     7.592307e+00     1.051159e-03
 * time: 1.5971579551696777
   505     7.592307e+00     9.475327e-04
 * time: 1.6003789901733398
   506     7.592306e+00     6.802385e-04
 * time: 1.6035120487213135
   507     7.592306e+00     1.711117e-03
 * time: 1.6060740947723389
   508     7.592306e+00     9.968570e-04
 * time: 1.609386920928955
   509     7.592306e+00     1.051930e-03
 * time: 1.611889123916626
   510     7.592306e+00     8.129281e-04
 * time: 1.62391996383667
   511     7.592306e+00     1.062359e-03
 * time: 1.6267590522766113
   512     7.592306e+00     1.312330e-03
 * time: 1.6294050216674805
   513     7.592306e+00     7.440486e-04
 * time: 1.6320641040802002
   514     7.592305e+00     8.143635e-04
 * time: 1.6346640586853027
   515     7.592305e+00     1.374633e-03
 * time: 1.6372430324554443
   516     7.592305e+00     1.303545e-03
 * time: 1.6405699253082275
   517     7.592305e+00     1.334270e-03
 * time: 1.6431519985198975
   518     7.592305e+00     7.748057e-04
 * time: 1.6462829113006592
   519     7.592305e+00     1.047324e-03
 * time: 1.648771047592163
   520     7.592305e+00     9.067938e-04
 * time: 1.6513340473175049
   521     7.592305e+00     7.493153e-04
 * time: 1.6538851261138916
   522     7.592305e+00     1.057233e-03
 * time: 1.6566050052642822
   523     7.592305e+00     9.580617e-04
 * time: 1.659924030303955
   524     7.592305e+00     6.010324e-04
 * time: 1.6632399559020996
   525     7.592305e+00     1.082501e-03
 * time: 1.6658079624176025
   526     7.592305e+00     1.143050e-03
 * time: 1.668442964553833
   527     7.592305e+00     8.288707e-04
 * time: 1.6710829734802246
   528     7.592304e+00     6.077063e-04
 * time: 1.6736769676208496
   529     7.592304e+00     4.346339e-04
 * time: 1.6761720180511475
   530     7.592304e+00     5.527290e-04
 * time: 1.6786811351776123
   531     7.592304e+00     6.257253e-04
 * time: 1.6811821460723877
   532     7.592304e+00     4.734995e-04
 * time: 1.6845099925994873
   533     7.592304e+00     3.386831e-04
 * time: 1.6878421306610107
   534     7.592304e+00     5.460467e-04
 * time: 1.6903760433197021
   535     7.592304e+00     4.113025e-04
 * time: 1.6929590702056885
   536     7.592304e+00     1.013812e-03
 * time: 1.6954660415649414
   537     7.592304e+00     8.324561e-04
 * time: 1.6987159252166748
   538     7.592304e+00     5.762140e-04
 * time: 1.7020759582519531
   539     7.592304e+00     8.159976e-04
 * time: 1.7046599388122559
   540     7.592304e+00     6.416366e-04
 * time: 1.7071759700775146
   541     7.592304e+00     1.174705e-03
 * time: 1.7188971042633057
   542     7.592304e+00     5.963562e-04
 * time: 1.7213780879974365
   543     7.592304e+00     5.636157e-04
 * time: 1.7238540649414062
   544     7.592304e+00     7.771219e-04
 * time: 1.726341962814331
   545     7.592304e+00     1.097493e-03
 * time: 1.7288200855255127
   546     7.592303e+00     1.174788e-03
 * time: 1.7314491271972656
   547     7.592303e+00     6.213433e-04
 * time: 1.7347290515899658
   548     7.592303e+00     7.352676e-04
 * time: 1.7371830940246582
   549     7.592303e+00     7.122682e-04
 * time: 1.739673137664795
   550     7.592303e+00     3.879021e-04
 * time: 1.742811918258667
   551     7.592303e+00     6.751406e-04
 * time: 1.745361089706421
   552     7.592303e+00     5.760892e-04
 * time: 1.7487330436706543
   553     7.592303e+00     3.866982e-04
 * time: 1.75205397605896
   554     7.592303e+00     3.531694e-04
 * time: 1.7552099227905273
   555     7.592303e+00     4.800337e-04
 * time: 1.757699966430664
   556     7.592303e+00     6.236399e-04
 * time: 1.7602031230926514
   557     7.592303e+00     4.359017e-04
 * time: 1.7628891468048096
   558     7.592303e+00     4.449010e-04
 * time: 1.7656080722808838
   559     7.592303e+00     5.581119e-04
 * time: 1.768226146697998
   560     7.592303e+00     4.148960e-04
 * time: 1.7707419395446777
   561     7.592303e+00     3.383739e-04
 * time: 1.7732279300689697
   562     7.592303e+00     4.381269e-04
 * time: 1.7757360935211182
   563     7.592303e+00     3.415827e-04
 * time: 1.7790210247039795
   564     7.592303e+00     5.836848e-04
 * time: 1.7816951274871826
   565     7.592303e+00     3.883394e-04
 * time: 1.7842481136322021
   566     7.592303e+00     5.997273e-04
 * time: 1.786790132522583
   567     7.592303e+00     4.828633e-04
 * time: 1.7899670600891113
   568     7.592303e+00     6.059820e-04
 * time: 1.7925410270690918
   569     7.592303e+00     6.807460e-04
 * time: 1.7951021194458008
   570     7.592302e+00     6.052967e-04
 * time: 1.7984230518341064
   571     7.592302e+00     8.221753e-04
 * time: 1.8008971214294434
   572     7.592302e+00     7.858349e-04
 * time: 1.812593936920166
   573     7.592302e+00     7.776014e-04
 * time: 1.8151681423187256
   574     7.592302e+00     7.448790e-04
 * time: 1.8176419734954834
   575     7.592302e+00     5.515709e-04
 * time: 1.820786952972412
   576     7.592302e+00     5.781691e-04
 * time: 1.8233790397644043
   577     7.592302e+00     3.993094e-04
 * time: 1.826643943786621
   578     7.592302e+00     6.794209e-04
 * time: 1.8292970657348633
   579     7.592302e+00     8.990385e-04
 * time: 1.8318049907684326
   580     7.592302e+00     8.154840e-04
 * time: 1.83430814743042
   581     7.592302e+00     8.498985e-04
 * time: 1.8367979526519775
   582     7.592302e+00     6.293984e-04
 * time: 1.840116024017334
   583     7.592302e+00     3.552261e-04
 * time: 1.8434350490570068
   584     7.592302e+00     5.479099e-04
 * time: 1.8459219932556152
   585     7.592302e+00     3.402267e-04
 * time: 1.8484070301055908
   586     7.592302e+00     3.828023e-04
 * time: 1.8509209156036377
   587     7.592302e+00     2.221537e-04
 * time: 1.8540871143341064
   588     7.592302e+00     6.386296e-04
 * time: 1.8566789627075195
   589     7.592302e+00     4.635184e-04
 * time: 1.859377145767212
   590     7.592301e+00     2.196817e-04
 * time: 1.8625340461730957
   591     7.592301e+00     5.021191e-04
 * time: 1.8650119304656982
   592     7.592301e+00     3.984708e-04
 * time: 1.8675010204315186
   593     7.592301e+00     2.675558e-04
 * time: 1.8700709342956543
   594     7.592301e+00     3.526317e-04
 * time: 1.872736930847168
   595     7.592301e+00     6.571966e-04
 * time: 1.8755300045013428
   596     7.592301e+00     5.496870e-04
 * time: 1.8781640529632568
   597     7.592301e+00     4.318822e-04
 * time: 1.8807640075683594
   598     7.592301e+00     3.808529e-04
 * time: 1.8834640979766846
Out[5]: