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.182901e+01     7.795833e+00
 * time: 0.0015950202941894531
     1     2.798890e+01     4.956841e+00
 * time: 0.0071070194244384766
     2     1.969671e+01     5.009689e+00
 * time: 0.012188196182250977
     3     1.282973e+01     3.257868e+00
 * time: 0.016198158264160156
     4     1.058469e+01     1.491212e+00
 * time: 0.02001810073852539
     5     9.702154e+00     1.997822e+00
 * time: 0.023205041885375977
     6     9.254038e+00     1.151561e+00
 * time: 0.026545047760009766
     7     8.963358e+00     7.520703e-01
 * time: 0.029702186584472656
     8     8.650594e+00     7.655641e-01
 * time: 0.03285408020019531
     9     8.408267e+00     6.017257e-01
 * time: 0.036518096923828125
    10     8.271961e+00     6.117114e-01
 * time: 0.03993105888366699
    11     8.188621e+00     5.625566e-01
 * time: 0.04308509826660156
    12     8.135284e+00     4.317111e-01
 * time: 0.04674100875854492
    13     8.102130e+00     6.246954e-01
 * time: 0.04923415184020996
    14     8.068053e+00     5.492248e-01
 * time: 0.0516970157623291
    15     8.025554e+00     4.863287e-01
 * time: 0.10075712203979492
    16     7.993303e+00     6.007184e-01
 * time: 0.10330700874328613
    17     7.985327e+00     6.639576e-01
 * time: 0.10592508316040039
    18     7.933416e+00     5.297995e-01
 * time: 0.10845518112182617
    19     7.912533e+00     6.157943e-01
 * time: 0.11095619201660156
    20     7.905912e+00     6.547221e-01
 * time: 0.1134340763092041
    21     7.871480e+00     4.694006e-01
 * time: 0.11611008644104004
    22     7.843980e+00     5.159290e-01
 * time: 0.11857318878173828
    23     7.840577e+00     7.385688e-01
 * time: 0.12112212181091309
    24     7.796935e+00     3.897199e-01
 * time: 0.1244041919708252
    25     7.763582e+00     4.413576e-01
 * time: 0.12701010704040527
    26     7.751453e+00     4.666119e-01
 * time: 0.12949013710021973
    27     7.730208e+00     3.057094e-01
 * time: 0.13274502754211426
    28     7.708048e+00     2.099653e-01
 * time: 0.13609910011291504
    29     7.693347e+00     1.816581e-01
 * time: 0.1392500400543213
    30     7.688766e+00     3.647389e-01
 * time: 0.14177799224853516
    31     7.676902e+00     2.190269e-01
 * time: 0.1449570655822754
    32     7.672153e+00     2.567602e-01
 * time: 0.14786911010742188
    33     7.669442e+00     2.991194e-01
 * time: 0.15035510063171387
    34     7.666644e+00     1.768711e-01
 * time: 0.15282607078552246
    35     7.654275e+00     1.469596e-01
 * time: 0.1555311679840088
    36     7.648596e+00     3.127774e-01
 * time: 0.1580820083618164
    37     7.639257e+00     1.720795e-01
 * time: 0.16156911849975586
    38     7.637666e+00     2.462429e-01
 * time: 0.16434597969055176
    39     7.633834e+00     1.873826e-01
 * time: 0.17045807838439941
    40     7.630676e+00     1.907696e-01
 * time: 0.1729731559753418
    41     7.627276e+00     1.216255e-01
 * time: 0.17716002464294434
    42     7.625329e+00     1.120364e-01
 * time: 0.17985010147094727
    43     7.625260e+00     1.344570e-01
 * time: 0.18230819702148438
    44     7.625175e+00     1.650475e-01
 * time: 0.18477702140808105
    45     7.623656e+00     8.448788e-02
 * time: 0.18832111358642578
    46     7.621858e+00     9.490464e-02
 * time: 0.19078612327575684
    47     7.620198e+00     6.964938e-02
 * time: 0.1932840347290039
    48     7.619273e+00     7.693805e-02
 * time: 0.19625520706176758
    49     7.619174e+00     1.024584e-01
 * time: 0.1987450122833252
    50     7.618532e+00     7.846299e-02
 * time: 0.20122408866882324
    51     7.617676e+00     5.774121e-02
 * time: 0.20453810691833496
    52     7.617220e+00     5.871266e-02
 * time: 0.20714402198791504
    53     7.616509e+00     7.402475e-02
 * time: 0.2098691463470459
    54     7.615856e+00     5.584623e-02
 * time: 0.21361207962036133
    55     7.615180e+00     1.991162e-02
 * time: 0.21724319458007812
    56     7.614999e+00     5.794120e-02
 * time: 0.24823617935180664
    57     7.614607e+00     3.400781e-02
 * time: 0.25087714195251465
    58     7.614333e+00     3.286529e-02
 * time: 0.2541041374206543
    59     7.614191e+00     6.456124e-02
 * time: 0.2568662166595459
    60     7.613795e+00     4.241773e-02
 * time: 0.26003098487854004
    61     7.613759e+00     5.302181e-02
 * time: 0.2625131607055664
    62     7.613444e+00     3.546896e-02
 * time: 0.26500606536865234
    63     7.613181e+00     3.568412e-02
 * time: 0.26836204528808594
    64     7.613113e+00     4.186827e-02
 * time: 0.270855188369751
    65     7.612850e+00     2.751318e-02
 * time: 0.2733910083770752
    66     7.612661e+00     3.530788e-02
 * time: 0.2758781909942627
    67     7.612502e+00     5.803999e-02
 * time: 0.2795531749725342
    68     7.612432e+00     3.986693e-02
 * time: 0.28203606605529785
    69     7.612256e+00     3.069685e-02
 * time: 0.2845320701599121
    70     7.612052e+00     2.478624e-02
 * time: 0.2877640724182129
    71     7.611846e+00     3.526024e-02
 * time: 0.2902381420135498
    72     7.611808e+00     5.641826e-02
 * time: 0.292741060256958
    73     7.611669e+00     3.760128e-02
 * time: 0.29518699645996094
    74     7.611489e+00     3.921610e-02
 * time: 0.29811716079711914
    75     7.611255e+00     2.570178e-02
 * time: 0.3013191223144531
    76     7.611249e+00     4.516344e-02
 * time: 0.3038320541381836
    77     7.611247e+00     4.865136e-02
 * time: 0.30628514289855957
    78     7.611073e+00     4.837257e-02
 * time: 0.30893898010253906
    79     7.610860e+00     3.213950e-02
 * time: 0.3120880126953125
    80     7.610694e+00     4.415006e-02
 * time: 0.3145902156829834
    81     7.610480e+00     3.869551e-02
 * time: 0.317249059677124
    82     7.610466e+00     4.853458e-02
 * time: 0.31983304023742676
    83     7.610169e+00     4.608561e-02
 * time: 0.3229491710662842
    84     7.610115e+00     4.571226e-02
 * time: 0.3254671096801758
    85     7.610068e+00     3.800216e-02
 * time: 0.32854700088500977
    86     7.609864e+00     3.433130e-02
 * time: 0.33103203773498535
    87     7.609557e+00     3.257779e-02
 * time: 0.334240198135376
    88     7.609286e+00     1.800476e-02
 * time: 0.33776211738586426
    89     7.609003e+00     3.259305e-02
 * time: 0.340238094329834
    90     7.608850e+00     5.413609e-02
 * time: 0.34267616271972656
    91     7.608618e+00     3.242661e-02
 * time: 0.3464012145996094
    92     7.608509e+00     4.729983e-02
 * time: 0.3493931293487549
    93     7.608368e+00     4.219664e-02
 * time: 0.3525660037994385
    94     7.608137e+00     3.481083e-02
 * time: 0.35571718215942383
    95     7.607720e+00     4.960533e-02
 * time: 0.3584151268005371
    96     7.607265e+00     3.568045e-02
 * time: 0.3616490364074707
    97     7.606896e+00     3.645053e-02
 * time: 0.3878641128540039
    98     7.606616e+00     6.424043e-02
 * time: 0.3910250663757324
    99     7.606402e+00     3.628539e-02
 * time: 0.3941609859466553
   100     7.606284e+00     5.187189e-02
 * time: 0.39662599563598633
   101     7.606106e+00     3.630876e-02
 * time: 0.3995201587677002
   102     7.605952e+00     6.238896e-02
 * time: 0.4019811153411865
   103     7.605201e+00     4.605068e-02
 * time: 0.4044811725616455
   104     7.604930e+00     2.125700e-02
 * time: 0.40774106979370117
   105     7.604794e+00     4.266766e-02
 * time: 0.41025710105895996
   106     7.604500e+00     3.235220e-02
 * time: 0.4131321907043457
   107     7.604314e+00     3.402249e-02
 * time: 0.41560816764831543
   108     7.604218e+00     3.828807e-02
 * time: 0.4184300899505615
   109     7.603939e+00     2.880304e-02
 * time: 0.4211289882659912
   110     7.603680e+00     3.570032e-02
 * time: 0.423626184463501
   111     7.603661e+00     5.223243e-02
 * time: 0.42611002922058105
   112     7.603573e+00     4.781460e-02
 * time: 0.4288899898529053
   113     7.603511e+00     5.308732e-02
 * time: 0.4313681125640869
   114     7.603218e+00     2.934813e-02
 * time: 0.43389320373535156
   115     7.602998e+00     4.714035e-02
 * time: 0.43636417388916016
   116     7.602779e+00     4.436420e-02
 * time: 0.4392821788787842
   117     7.602540e+00     2.649035e-02
 * time: 0.44249510765075684
   118     7.602269e+00     3.206203e-02
 * time: 0.4457371234893799
   119     7.602057e+00     1.525701e-02
 * time: 0.4492931365966797
   120     7.601916e+00     1.808723e-02
 * time: 0.45178914070129395
   121     7.601725e+00     2.235921e-02
 * time: 0.4542710781097412
   122     7.601540e+00     2.605546e-02
 * time: 0.45746707916259766
   123     7.601372e+00     2.081683e-02
 * time: 0.46089911460876465
   124     7.601361e+00     3.519971e-02
 * time: 0.46361303329467773
   125     7.601237e+00     2.963502e-02
 * time: 0.46613121032714844
   126     7.601113e+00     4.504419e-02
 * time: 0.4687201976776123
   127     7.600856e+00     3.194459e-02
 * time: 0.47191715240478516
   128     7.600688e+00     4.435267e-02
 * time: 0.4743931293487549
   129     7.600584e+00     3.807013e-02
 * time: 0.47687602043151855
   130     7.600405e+00     1.986216e-02
 * time: 0.48204708099365234
   131     7.600350e+00     3.975766e-02
 * time: 0.4845280647277832
   132     7.600168e+00     2.307156e-02
 * time: 0.48699307441711426
   133     7.599986e+00     2.683787e-02
 * time: 0.4895491600036621
   134     7.599839e+00     3.495979e-02
 * time: 0.49206018447875977
   135     7.599664e+00     2.017059e-02
 * time: 0.49516916275024414
   136     7.599588e+00     2.447524e-02
 * time: 0.4976620674133301
   137     7.599492e+00     2.536040e-02
 * time: 0.5007021427154541
   138     7.599341e+00     2.911457e-02
 * time: 0.5032320022583008
   139     7.599167e+00     1.657637e-02
 * time: 0.5178442001342773
   140     7.599140e+00     4.894781e-02
 * time: 0.5207371711730957
   141     7.599083e+00     5.652759e-02
 * time: 0.5232131481170654
   142     7.599049e+00     3.108235e-02
 * time: 0.5256941318511963
   143     7.598828e+00     3.971102e-02
 * time: 0.5281581878662109
   144     7.598669e+00     4.291273e-02
 * time: 0.530764102935791
   145     7.598515e+00     3.655640e-02
 * time: 0.5332331657409668
   146     7.598321e+00     3.458225e-02
 * time: 0.535736083984375
   147     7.598163e+00     3.773841e-02
 * time: 0.5383071899414062
   148     7.597995e+00     2.708749e-02
 * time: 0.5416920185089111
   149     7.597961e+00     4.778295e-02
 * time: 0.5441761016845703
   150     7.597921e+00     5.273311e-02
 * time: 0.5466911792755127
   151     7.597653e+00     2.963431e-02
 * time: 0.550321102142334
   152     7.597628e+00     3.952414e-02
 * time: 0.5528440475463867
   153     7.597499e+00     3.415718e-02
 * time: 0.5553441047668457
   154     7.597309e+00     3.217545e-02
 * time: 0.557833194732666
   155     7.597068e+00     2.679157e-02
 * time: 0.5611810684204102
   156     7.596879e+00     2.136610e-02
 * time: 0.5643270015716553
   157     7.596676e+00     1.526044e-02
 * time: 0.5675060749053955
   158     7.596658e+00     3.343681e-02
 * time: 0.5733461380004883
   159     7.596648e+00     3.243151e-02
 * time: 0.5769190788269043
   160     7.596594e+00     4.235168e-02
 * time: 0.5793859958648682
   161     7.596431e+00     3.235905e-02
 * time: 0.5834751129150391
   162     7.596411e+00     3.665062e-02
 * time: 0.5861070156097412
   163     7.596396e+00     6.312340e-02
 * time: 0.588935136795044
   164     7.596349e+00     4.656405e-02
 * time: 0.5918810367584229
   165     7.596157e+00     3.916277e-02
 * time: 0.5945100784301758
   166     7.595950e+00     3.717835e-02
 * time: 0.5971870422363281
   167     7.595838e+00     4.562296e-02
 * time: 0.6003291606903076
   168     7.595681e+00     2.792892e-02
 * time: 0.6030020713806152
   169     7.595471e+00     3.492325e-02
 * time: 0.6063439846038818
   170     7.595432e+00     4.008381e-02
 * time: 0.6088321208953857
   171     7.595385e+00     3.147767e-02
 * time: 0.6114530563354492
   172     7.595315e+00     3.703344e-02
 * time: 0.6139659881591797
   173     7.595098e+00     3.107451e-02
 * time: 0.6172080039978027
   174     7.594905e+00     2.908897e-02
 * time: 0.6205980777740479
   175     7.594661e+00     1.938092e-02
 * time: 0.6237621307373047
   176     7.594588e+00     2.449097e-02
 * time: 0.626270055770874
   177     7.594533e+00     4.594181e-02
 * time: 0.6287860870361328
   178     7.594502e+00     3.678008e-02
 * time: 0.6314060688018799
   179     7.594475e+00     3.162107e-02
 * time: 0.6339080333709717
   180     7.594475e+00     2.947044e-02
 * time: 0.6364831924438477
   181     7.594238e+00     3.069006e-02
 * time: 0.6508641242980957
   182     7.594183e+00     3.919755e-02
 * time: 0.6533160209655762
   183     7.594036e+00     3.039133e-02
 * time: 0.6557660102844238
   184     7.593930e+00     2.458984e-02
 * time: 0.6582322120666504
   185     7.593836e+00     3.060697e-02
 * time: 0.6610691547393799
   186     7.593726e+00     3.207243e-02
 * time: 0.6636030673980713
   187     7.593601e+00     1.303089e-02
 * time: 0.6668531894683838
   188     7.593514e+00     1.554783e-02
 * time: 0.6701090335845947
   189     7.593466e+00     1.778889e-02
 * time: 0.6727910041809082
   190     7.593460e+00     2.528457e-02
 * time: 0.6752719879150391
   191     7.593383e+00     1.752822e-02
 * time: 0.6785240173339844
   192     7.593311e+00     1.495942e-02
 * time: 0.6816670894622803
   193     7.593263e+00     2.459590e-02
 * time: 0.6843180656433105
   194     7.593235e+00     2.024434e-02
 * time: 0.6868062019348145
   195     7.593175e+00     1.062793e-02
 * time: 0.6899580955505371
   196     7.593119e+00     1.566207e-02
 * time: 0.6928291320800781
   197     7.593080e+00     9.183803e-03
 * time: 0.69606614112854
   198     7.593029e+00     1.006380e-02
 * time: 0.6985161304473877
   199     7.592992e+00     1.523107e-02
 * time: 0.7011620998382568
   200     7.592943e+00     1.223783e-02
 * time: 0.7043380737304688
   201     7.592896e+00     9.064214e-03
 * time: 0.7075140476226807
   202     7.592889e+00     1.228219e-02
 * time: 0.7100281715393066
   203     7.592868e+00     1.200123e-02
 * time: 0.7128970623016357
   204     7.592833e+00     1.453247e-02
 * time: 0.7161011695861816
   205     7.592797e+00     7.114914e-03
 * time: 0.7192440032958984
   206     7.592757e+00     7.954386e-03
 * time: 0.7218871116638184
   207     7.592734e+00     8.141967e-03
 * time: 0.7243821620941162
   208     7.592719e+00     8.903407e-03
 * time: 0.7268610000610352
   209     7.592687e+00     1.142010e-02
 * time: 0.7293779850006104
   210     7.592658e+00     7.328099e-03
 * time: 0.7326741218566895
   211     7.592632e+00     1.124453e-02
 * time: 0.7351620197296143
   212     7.592616e+00     1.487056e-02
 * time: 0.7376441955566406
   213     7.592590e+00     6.394042e-03
 * time: 0.7408850193023682
   214     7.592587e+00     1.080734e-02
 * time: 0.7438621520996094
   215     7.592572e+00     6.954836e-03
 * time: 0.7463181018829346
   216     7.592556e+00     8.242226e-03
 * time: 0.7488231658935547
   217     7.592549e+00     1.286166e-02
 * time: 0.7513670921325684
   218     7.592543e+00     8.024781e-03
 * time: 0.7542610168457031
   219     7.592533e+00     7.596814e-03
 * time: 0.7568001747131348
   220     7.592527e+00     9.322897e-03
 * time: 0.7593450546264648
   221     7.592518e+00     8.904697e-03
 * time: 0.7621901035308838
   222     7.592510e+00     1.029235e-02
 * time: 0.7763280868530273
   223     7.592506e+00     9.447667e-03
 * time: 0.783703088760376
   224     7.592501e+00     8.012172e-03
 * time: 0.7862629890441895
   225     7.592488e+00     5.456165e-03
 * time: 0.789445161819458
   226     7.592481e+00     6.026109e-03
 * time: 0.792302131652832
   227     7.592475e+00     7.154465e-03
 * time: 0.7947611808776855
   228     7.592465e+00     4.711040e-03
 * time: 0.7979559898376465
   229     7.592457e+00     3.543808e-03
 * time: 0.801145076751709
   230     7.592455e+00     4.774953e-03
 * time: 0.8038861751556396
   231     7.592450e+00     4.331014e-03
 * time: 0.8073110580444336
   232     7.592449e+00     7.896324e-03
 * time: 0.8098690509796143
   233     7.592448e+00     6.748606e-03
 * time: 0.8126401901245117
   234     7.592446e+00     6.123885e-03
 * time: 0.8152501583099365
   235     7.592444e+00     3.184057e-03
 * time: 0.8178400993347168
   236     7.592440e+00     3.730683e-03
 * time: 0.8205389976501465
   237     7.592438e+00     7.746129e-03
 * time: 0.8232321739196777
   238     7.592435e+00     4.228656e-03
 * time: 0.8258349895477295
   239     7.592431e+00     3.203411e-03
 * time: 0.8285400867462158
   240     7.592428e+00     4.345044e-03
 * time: 0.8311021327972412
   241     7.592424e+00     3.010871e-03
 * time: 0.8345901966094971
   242     7.592421e+00     2.995295e-03
 * time: 0.8375091552734375
   243     7.592419e+00     3.266745e-03
 * time: 0.8408980369567871
   244     7.592418e+00     3.018062e-03
 * time: 0.844724178314209
   245     7.592415e+00     2.565199e-03
 * time: 0.8480970859527588
   246     7.592413e+00     1.303541e-03
 * time: 0.8513591289520264
   247     7.592412e+00     2.781261e-03
 * time: 0.853978157043457
   248     7.592411e+00     4.498880e-03
 * time: 0.8564791679382324
   249     7.592411e+00     3.678001e-03
 * time: 0.858971118927002
   250     7.592410e+00     4.114567e-03
 * time: 0.8614501953125
   251     7.592409e+00     2.557394e-03
 * time: 0.864173173904419
   252     7.592407e+00     3.293757e-03
 * time: 0.8666410446166992
   253     7.592407e+00     3.555445e-03
 * time: 0.8691201210021973
   254     7.592404e+00     3.071663e-03
 * time: 0.8716111183166504
   255     7.592401e+00     5.019996e-03
 * time: 0.8742220401763916
   256     7.592399e+00     3.249414e-03
 * time: 0.8774850368499756
   257     7.592397e+00     3.178999e-03
 * time: 0.8806281089782715
   258     7.592396e+00     2.642970e-03
 * time: 0.8838441371917725
   259     7.592395e+00     3.039102e-03
 * time: 0.8870551586151123
   260     7.592394e+00     2.429890e-03
 * time: 0.8902251720428467
   261     7.592393e+00     4.555303e-03
 * time: 0.893118143081665
   262     7.592391e+00     1.971631e-03
 * time: 0.8962790966033936
   263     7.592390e+00     2.490422e-03
 * time: 0.910128116607666
   264     7.592390e+00     3.095748e-03
 * time: 0.9127390384674072
   265     7.592389e+00     2.287251e-03
 * time: 0.9151589870452881
   266     7.592389e+00     3.250358e-03
 * time: 0.9176521301269531
   267     7.592387e+00     1.086930e-03
 * time: 0.9201281070709229
   268     7.592387e+00     2.389749e-03
 * time: 0.9233160018920898
   269     7.592385e+00     2.605243e-03
 * time: 0.9258191585540771
   270     7.592385e+00     3.167433e-03
 * time: 0.9286150932312012
   271     7.592384e+00     2.271481e-03
 * time: 0.9310932159423828
   272     7.592383e+00     1.904539e-03
 * time: 0.9344501495361328
   273     7.592383e+00     2.516242e-03
 * time: 0.9369959831237793
   274     7.592382e+00     1.915901e-03
 * time: 0.9395689964294434
   275     7.592382e+00     3.998503e-03
 * time: 0.9421160221099854
   276     7.592382e+00     3.543687e-03
 * time: 0.945275068283081
   277     7.592381e+00     4.142895e-03
 * time: 0.947857141494751
   278     7.592380e+00     2.404400e-03
 * time: 0.9503741264343262
   279     7.592379e+00     2.089347e-03
 * time: 0.9536821842193604
   280     7.592379e+00     3.896822e-03
 * time: 0.9562242031097412
   281     7.592377e+00     2.080646e-03
 * time: 0.9594151973724365
   282     7.592376e+00     2.576326e-03
 * time: 0.9619441032409668
   283     7.592375e+00     2.689579e-03
 * time: 0.964928150177002
   284     7.592374e+00     1.710743e-03
 * time: 0.9681351184844971
   285     7.592374e+00     2.549059e-03
 * time: 0.9705832004547119
   286     7.592374e+00     3.727877e-03
 * time: 0.9731721878051758
   287     7.592373e+00     3.644222e-03
 * time: 0.9756321907043457
   288     7.592372e+00     3.301444e-03
 * time: 0.9788269996643066
   289     7.592371e+00     2.771627e-03
 * time: 0.9813570976257324
   290     7.592370e+00     3.069738e-03
 * time: 0.9843740463256836
   291     7.592369e+00     3.914468e-03
 * time: 0.9868249893188477
   292     7.592367e+00     2.279698e-03
 * time: 0.9900281429290771
   293     7.592366e+00     3.409123e-03
 * time: 0.9925611019134521
   294     7.592364e+00     3.276240e-03
 * time: 0.995474100112915
   295     7.592363e+00     3.444372e-03
 * time: 0.998021125793457
   296     7.592362e+00     1.972917e-03
 * time: 1.00120210647583
   297     7.592361e+00     1.913391e-03
 * time: 1.00447416305542
   298     7.592359e+00     1.454386e-03
 * time: 1.0076069831848145
   299     7.592358e+00     2.394969e-03
 * time: 1.0100622177124023
   300     7.592357e+00     4.046493e-03
 * time: 1.0125541687011719
   301     7.592357e+00     3.027718e-03
 * time: 1.015120029449463
   302     7.592355e+00     2.004382e-03
 * time: 1.0183181762695312
   303     7.592353e+00     2.166716e-03
 * time: 1.0208580493927002
   304     7.592352e+00     3.967950e-03
 * time: 1.0235190391540527
   305     7.592350e+00     2.466333e-03
 * time: 1.0382001399993896
   306     7.592350e+00     3.163434e-03
 * time: 1.0406811237335205
   307     7.592348e+00     2.513103e-03
 * time: 1.0431389808654785
   308     7.592346e+00     2.931750e-03
 * time: 1.0479331016540527
   309     7.592345e+00     2.945443e-03
 * time: 1.0510931015014648
   310     7.592344e+00     3.276465e-03
 * time: 1.0538501739501953
   311     7.592343e+00     2.991313e-03
 * time: 1.0570580959320068
   312     7.592342e+00     1.897087e-03
 * time: 1.06028413772583
   313     7.592340e+00     2.653658e-03
 * time: 1.0627610683441162
   314     7.592339e+00     2.507921e-03
 * time: 1.0654690265655518
   315     7.592338e+00     2.971692e-03
 * time: 1.0679500102996826
   316     7.592338e+00     2.476542e-03
 * time: 1.0704522132873535
   317     7.592336e+00     1.830073e-03
 * time: 1.0736751556396484
   318     7.592335e+00     2.240062e-03
 * time: 1.0762641429901123
   319     7.592334e+00     1.748829e-03
 * time: 1.0787250995635986
   320     7.592334e+00     2.795038e-03
 * time: 1.0812060832977295
   321     7.592333e+00     1.743699e-03
 * time: 1.0854871273040771
   322     7.592332e+00     1.605354e-03
 * time: 1.0898652076721191
   323     7.592332e+00     2.720685e-03
 * time: 1.0932080745697021
   324     7.592332e+00     2.057776e-03
 * time: 1.0963990688323975
   325     7.592331e+00     2.083627e-03
 * time: 1.0990550518035889
   326     7.592330e+00     3.403022e-03
 * time: 1.1016840934753418
   327     7.592329e+00     2.212083e-03
 * time: 1.1064391136169434
   328     7.592329e+00     2.986484e-03
 * time: 1.1089529991149902
   329     7.592328e+00     2.726814e-03
 * time: 1.1122920513153076
   330     7.592328e+00     3.368810e-03
 * time: 1.1150171756744385
   331     7.592326e+00     1.090949e-03
 * time: 1.1182630062103271
   332     7.592326e+00     1.972888e-03
 * time: 1.120743989944458
   333     7.592325e+00     1.884706e-03
 * time: 1.123317003250122
   334     7.592325e+00     1.451193e-03
 * time: 1.1267871856689453
   335     7.592324e+00     1.281121e-03
 * time: 1.1299359798431396
   336     7.592324e+00     2.201364e-03
 * time: 1.1324591636657715
   337     7.592324e+00     1.125263e-03
 * time: 1.1356990337371826
   338     7.592323e+00     1.908310e-03
 * time: 1.1382319927215576
   339     7.592323e+00     1.308354e-03
 * time: 1.1407032012939453
   340     7.592323e+00     2.303144e-03
 * time: 1.1432061195373535
   341     7.592322e+00     1.140623e-03
 * time: 1.1460750102996826
   342     7.592322e+00     1.746675e-03
 * time: 1.1485860347747803
   343     7.592321e+00     1.111413e-03
 * time: 1.151757001876831
   344     7.592321e+00     1.430306e-03
 * time: 1.1543850898742676
   345     7.592321e+00     9.479341e-04
 * time: 1.157008171081543
   346     7.592321e+00     1.280238e-03
 * time: 1.1709551811218262
   347     7.592321e+00     9.913361e-04
 * time: 1.17411208152771
   348     7.592320e+00     9.891854e-04
 * time: 1.1766581535339355
   349     7.592320e+00     8.780981e-04
 * time: 1.179746150970459
   350     7.592320e+00     6.577826e-04
 * time: 1.182232141494751
   351     7.592320e+00     3.681961e-04
 * time: 1.1864721775054932
   352     7.592320e+00     7.011231e-04
 * time: 1.1889681816101074
   353     7.592320e+00     5.945074e-04
 * time: 1.191452980041504
   354     7.592320e+00     4.895368e-04
 * time: 1.1939430236816406
   355     7.592320e+00     5.529364e-04
 * time: 1.1968860626220703
   356     7.592320e+00     6.976689e-04
 * time: 1.1993842124938965
   357     7.592320e+00     6.627304e-04
 * time: 1.2018611431121826
   358     7.592320e+00     6.710841e-04
 * time: 1.2043280601501465
   359     7.592320e+00     5.770555e-04
 * time: 1.2069721221923828
   360     7.592319e+00     4.518984e-04
 * time: 1.2094640731811523
   361     7.592319e+00     5.736418e-04
 * time: 1.2119481563568115
   362     7.592319e+00     4.935222e-04
 * time: 1.2147791385650635
   363     7.592319e+00     4.858415e-04
 * time: 1.2180120944976807
   364     7.592319e+00     7.582259e-04
 * time: 1.2204830646514893
   365     7.592319e+00     6.689756e-04
 * time: 1.2229831218719482
   366     7.592319e+00     7.358104e-04
 * time: 1.225966215133667
   367     7.592319e+00     4.716570e-04
 * time: 1.229233980178833
   368     7.592319e+00     4.285834e-04
 * time: 1.2324960231781006
   369     7.592319e+00     3.625577e-04
 * time: 1.235748052597046
   370     7.592319e+00     6.419600e-04
 * time: 1.2382700443267822
   371     7.592319e+00     6.906244e-04
 * time: 1.2408020496368408
   372     7.592319e+00     4.258819e-04
 * time: 1.2440311908721924
   373     7.592319e+00     3.956212e-04
 * time: 1.24704909324646
   374     7.592319e+00     6.088822e-04
 * time: 1.2495341300964355
   375     7.592319e+00     9.562926e-04
 * time: 1.2520790100097656
   376     7.592319e+00     6.559068e-04
 * time: 1.255411148071289
   377     7.592319e+00     7.668409e-04
 * time: 1.2579271793365479
   378     7.592319e+00     6.891165e-04
 * time: 1.2603909969329834
   379     7.592319e+00     4.828292e-04
 * time: 1.2628810405731201
   380     7.592319e+00     8.050982e-04
 * time: 1.2655541896820068
   381     7.592318e+00     5.890305e-04
 * time: 1.2687771320343018
   382     7.592318e+00     4.080247e-04
 * time: 1.2719151973724365
   383     7.592318e+00     5.467551e-04
 * time: 1.274425983428955
   384     7.592318e+00     4.462714e-04
 * time: 1.27708101272583
   385     7.592318e+00     5.828566e-04
 * time: 1.2795600891113281
   386     7.592318e+00     3.933699e-04
 * time: 1.282790184020996
   387     7.592318e+00     4.883392e-04
 * time: 1.298793077468872
   388     7.592318e+00     5.041946e-04
 * time: 1.3019862174987793
   389     7.592318e+00     3.226990e-04
 * time: 1.3051111698150635
   390     7.592318e+00     4.623229e-04
 * time: 1.3077571392059326
   391     7.592318e+00     5.650981e-04
 * time: 1.3103480339050293
   392     7.592318e+00     5.326197e-04
 * time: 1.3128712177276611
   393     7.592318e+00     5.149945e-04
 * time: 1.3154051303863525
   394     7.592318e+00     7.284988e-04
 * time: 1.318066120147705
   395     7.592317e+00     4.029045e-04
 * time: 1.3212611675262451
   396     7.592317e+00     7.994105e-04
 * time: 1.323777198791504
   397     7.592317e+00     4.696496e-04
 * time: 1.3265411853790283
   398     7.592317e+00     6.247333e-04
 * time: 1.3290271759033203
   399     7.592317e+00     5.848055e-04
 * time: 1.3315601348876953
   400     7.592317e+00     5.453018e-04
 * time: 1.3340439796447754
   401     7.592317e+00     4.785905e-04
 * time: 1.336698055267334
   402     7.592317e+00     5.078280e-04
 * time: 1.3401989936828613
   403     7.592317e+00     7.941458e-04
 * time: 1.3426830768585205
   404     7.592317e+00     1.392710e-03
 * time: 1.3452110290527344
   405     7.592317e+00     1.151226e-03
 * time: 1.3482310771942139
   406     7.592317e+00     1.012511e-03
 * time: 1.3508610725402832
   407     7.592317e+00     6.313593e-04
 * time: 1.3542070388793945
   408     7.592316e+00     5.515386e-04
 * time: 1.3569271564483643
   409     7.592316e+00     6.551135e-04
 * time: 1.3601810932159424
   410     7.592316e+00     1.104201e-03
 * time: 1.362701177597046
   411     7.592316e+00     6.271316e-04
 * time: 1.3661961555480957
   412     7.592316e+00     7.615330e-04
 * time: 1.3691520690917969
   413     7.592316e+00     6.690091e-04
 * time: 1.371692180633545
   414     7.592316e+00     9.317586e-04
 * time: 1.3743209838867188
   415     7.592315e+00     6.491491e-04
 * time: 1.3777132034301758
   416     7.592315e+00     5.900133e-04
 * time: 1.3809800148010254
   417     7.592315e+00     5.557729e-04
 * time: 1.3842260837554932
   418     7.592315e+00     7.658029e-04
 * time: 1.3875391483306885
   419     7.592315e+00     6.111210e-04
 * time: 1.3901150226593018
   420     7.592315e+00     6.068190e-04
 * time: 1.3926141262054443
   421     7.592315e+00     7.821520e-04
 * time: 1.3951361179351807
   422     7.592314e+00     7.522966e-04
 * time: 1.3981220722198486
   423     7.592314e+00     1.008427e-03
 * time: 1.4006800651550293
   424     7.592314e+00     9.539065e-04
 * time: 1.4031951427459717
   425     7.592314e+00     6.395239e-04
 * time: 1.406574010848999
   426     7.592313e+00     7.490034e-04
 * time: 1.4091711044311523
   427     7.592313e+00     1.139770e-03
 * time: 1.4116911888122559
   428     7.592313e+00     8.367085e-04
 * time: 1.4142570495605469
   429     7.592312e+00     1.023910e-03
 * time: 1.4301412105560303
   430     7.592312e+00     1.679015e-03
 * time: 1.432596206665039
   431     7.592312e+00     1.400101e-03
 * time: 1.4350512027740479
   432     7.592311e+00     1.561855e-03
 * time: 1.4379901885986328
   433     7.592311e+00     1.066528e-03
 * time: 1.4411611557006836
   434     7.592310e+00     1.295493e-03
 * time: 1.444310188293457
   435     7.592310e+00     1.083817e-03
 * time: 1.4485831260681152
   436     7.592310e+00     8.497657e-04
 * time: 1.451829195022583
   437     7.592309e+00     1.508540e-03
 * time: 1.4542901515960693
   438     7.592309e+00     9.784764e-04
 * time: 1.4568610191345215
   439     7.592309e+00     1.180725e-03
 * time: 1.4593431949615479
   440     7.592308e+00     1.890300e-03
 * time: 1.461874008178711
   441     7.592308e+00     8.318850e-04
 * time: 1.4653642177581787
   442     7.592307e+00     1.368542e-03
 * time: 1.4680960178375244
   443     7.592307e+00     1.084386e-03
 * time: 1.470569133758545
   444     7.592307e+00     1.257805e-03
 * time: 1.473107099533081
   445     7.592307e+00     1.269790e-03
 * time: 1.4755611419677734
   446     7.592306e+00     1.429827e-03
 * time: 1.4781529903411865
   447     7.592306e+00     1.098817e-03
 * time: 1.4806849956512451
   448     7.592306e+00     1.777893e-03
 * time: 1.4831881523132324
   449     7.592306e+00     1.507221e-03
 * time: 1.4863309860229492
   450     7.592306e+00     1.234109e-03
 * time: 1.4902541637420654
   451     7.592305e+00     1.262794e-03
 * time: 1.492861032485962
   452     7.592305e+00     1.371291e-03
 * time: 1.4954311847686768
   453     7.592305e+00     1.788419e-03
 * time: 1.4984521865844727
   454     7.592304e+00     1.226915e-03
 * time: 1.5010080337524414
   455     7.592304e+00     2.247262e-03
 * time: 1.5035820007324219
   456     7.592304e+00     1.611492e-03
 * time: 1.506620168685913
   457     7.592304e+00     2.032061e-03
 * time: 1.5093770027160645
   458     7.592304e+00     1.977606e-03
 * time: 1.5123741626739502
   459     7.592304e+00     8.577466e-04
 * time: 1.515557050704956
   460     7.592303e+00     1.147732e-03
 * time: 1.5181400775909424
   461     7.592303e+00     1.305629e-03
 * time: 1.520658016204834
   462     7.592303e+00     8.990719e-04
 * time: 1.5238289833068848
   463     7.592302e+00     1.144577e-03
 * time: 1.5262751579284668
   464     7.592302e+00     1.055130e-03
 * time: 1.5299310684204102
   465     7.592302e+00     5.900112e-04
 * time: 1.5331389904022217
   466     7.592302e+00     1.117077e-03
 * time: 1.5355820655822754
   467     7.592302e+00     1.012849e-03
 * time: 1.538973093032837
   468     7.592302e+00     7.924975e-04
 * time: 1.542168140411377
   469     7.592302e+00     7.349133e-04
 * time: 1.5446829795837402
   470     7.592302e+00     7.607808e-04
 * time: 1.5590441226959229
   471     7.592302e+00     5.758567e-04
 * time: 1.5614981651306152
   472     7.592302e+00     4.747820e-04
 * time: 1.5639660358428955
   473     7.592302e+00     4.370551e-04
 * time: 1.5670580863952637
   474     7.592301e+00     7.846466e-04
 * time: 1.573829174041748
   475     7.592301e+00     6.452557e-04
 * time: 1.5765020847320557
   476     7.592301e+00     5.090762e-04
 * time: 1.5825941562652588
   477     7.592301e+00     8.151430e-04
 * time: 1.586292028427124
   478     7.592301e+00     5.125390e-04
 * time: 1.5902111530303955
   479     7.592301e+00     5.196586e-04
 * time: 1.5930461883544922
   480     7.592301e+00     3.938551e-04
 * time: 1.5962541103363037
   481     7.592301e+00     3.893078e-04
 * time: 1.6003801822662354
   482     7.592301e+00     4.693960e-04
 * time: 1.6029791831970215
   483     7.592301e+00     4.001399e-04
 * time: 1.6055400371551514
   484     7.592301e+00     5.327558e-04
 * time: 1.6090500354766846
   485     7.592301e+00     3.100162e-04
 * time: 1.612354040145874
   486     7.592301e+00     3.741899e-04
 * time: 1.6156561374664307
   487     7.592301e+00     5.377325e-04
 * time: 1.6182661056518555
   488     7.592301e+00     4.218298e-04
 * time: 1.6216130256652832
   489     7.592301e+00     2.363009e-04
 * time: 1.6248221397399902
   490     7.592301e+00     3.952950e-04
 * time: 1.6272730827331543
   491     7.592301e+00     3.678285e-04
 * time: 1.630005121231079
   492     7.592301e+00     5.175131e-04
 * time: 1.6324610710144043
   493     7.592301e+00     4.001153e-04
 * time: 1.6349091529846191
   494     7.592301e+00     3.371032e-04
 * time: 1.6374270915985107
   495     7.592301e+00     4.887440e-04
 * time: 1.6400129795074463
   496     7.592301e+00     3.464450e-04
 * time: 1.6424560546875
   497     7.592301e+00     4.743713e-04
 * time: 1.6449060440063477
   498     7.592301e+00     3.262174e-04
 * time: 1.6486961841583252
   499     7.592301e+00     3.302284e-04
 * time: 1.6513299942016602
   500     7.592301e+00     2.816619e-04
 * time: 1.653839111328125
   501     7.592301e+00     2.648276e-04
 * time: 1.6563730239868164
Out[5]: