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.181378e+01     9.870895e+00
 * time: 0.002177000045776367
     1     3.011008e+01     5.567599e+00
 * time: 0.009013891220092773
     2     2.139950e+01     5.593874e+00
 * time: 0.016654014587402344
     3     1.657827e+01     5.224965e+00
 * time: 0.025249004364013672
     4     1.182497e+01     1.876204e+00
 * time: 0.033312082290649414
     5     1.138761e+01     2.659294e+00
 * time: 0.03926205635070801
     6     1.062140e+01     1.972147e+00
 * time: 0.04570603370666504
     7     9.893499e+00     1.547767e+00
 * time: 0.05213308334350586
     8     9.400374e+00     1.540797e+00
 * time: 0.05857110023498535
     9     8.960376e+00     1.600791e+00
 * time: 0.06446599960327148
    10     8.630369e+00     1.027981e+00
 * time: 0.07117009162902832
    11     8.405594e+00     9.925518e-01
 * time: 0.07755708694458008
    12     8.215028e+00     8.771012e-01
 * time: 0.08423399925231934
    13     8.060957e+00     4.831716e-01
 * time: 0.09109807014465332
    14     7.957614e+00     3.230127e-01
 * time: 0.09706807136535645
    15     7.952174e+00     8.246058e-01
 * time: 0.10203289985656738
    16     7.905007e+00     4.635742e-01
 * time: 0.10765290260314941
    17     7.869904e+00     6.323642e-01
 * time: 0.11279606819152832
    18     7.831834e+00     3.503089e-01
 * time: 0.11961007118225098
    19     7.816516e+00     5.582323e-01
 * time: 0.12477898597717285
    20     7.792292e+00     4.536573e-01
 * time: 0.13014507293701172
    21     7.772558e+00     3.802472e-01
 * time: 0.13544201850891113
    22     7.758859e+00     3.578391e-01
 * time: 0.16525697708129883
    23     7.754024e+00     4.120638e-01
 * time: 0.1685628890991211
    24     7.747321e+00     2.915412e-01
 * time: 0.1733410358428955
    25     7.739785e+00     3.960328e-01
 * time: 0.1766510009765625
    26     7.721315e+00     2.372297e-01
 * time: 0.18109989166259766
    27     7.709032e+00     2.379223e-01
 * time: 0.18420791625976562
    28     7.699102e+00     2.837649e-01
 * time: 0.18744611740112305
    29     7.695808e+00     3.102473e-01
 * time: 0.19069695472717285
    30     7.687183e+00     1.700968e-01
 * time: 0.1947329044342041
    31     7.685180e+00     2.682569e-01
 * time: 0.19808697700500488
    32     7.682984e+00     2.788849e-01
 * time: 0.20148801803588867
    33     7.681360e+00     2.073162e-01
 * time: 0.20453906059265137
    34     7.676597e+00     1.486242e-01
 * time: 0.20862197875976562
    35     7.675333e+00     2.699651e-01
 * time: 0.2120680809020996
    36     7.670708e+00     1.214227e-01
 * time: 0.21514892578125
    37     7.665404e+00     1.318785e-01
 * time: 0.2186110019683838
    38     7.662817e+00     1.001011e-01
 * time: 0.22221589088439941
    39     7.662399e+00     1.446876e-01
 * time: 0.22524499893188477
    40     7.660194e+00     9.392956e-02
 * time: 0.22931289672851562
    41     7.659141e+00     1.360469e-01
 * time: 0.23276400566101074
    42     7.657224e+00     8.737660e-02
 * time: 0.23969197273254395
    43     7.656074e+00     1.343965e-01
 * time: 0.2451789379119873
    44     7.655046e+00     1.016003e-01
 * time: 0.2507638931274414
    45     7.653713e+00     8.724650e-02
 * time: 0.25696897506713867
    46     7.651396e+00     5.985730e-02
 * time: 0.2655661106109619
    47     7.650100e+00     9.278837e-02
 * time: 0.27536892890930176
    48     7.647707e+00     8.950711e-02
 * time: 0.2822530269622803
    49     7.646759e+00     1.855564e-01
 * time: 0.28871893882751465
    50     7.644808e+00     1.355937e-01
 * time: 0.297713041305542
    51     7.642266e+00     8.816050e-02
 * time: 0.30451202392578125
    52     7.641308e+00     1.127601e-01
 * time: 0.30992889404296875
    53     7.639486e+00     1.175096e-01
 * time: 0.3323080539703369
    54     7.638471e+00     1.849132e-01
 * time: 0.3355588912963867
    55     7.638311e+00     1.498368e-01
 * time: 0.3388819694519043
    56     7.636410e+00     1.020664e-01
 * time: 0.3424839973449707
    57     7.634122e+00     1.214188e-01
 * time: 0.3457679748535156
    58     7.632174e+00     9.744501e-02
 * time: 0.348966121673584
    59     7.631657e+00     1.157391e-01
 * time: 0.3522000312805176
    60     7.629865e+00     8.564354e-02
 * time: 0.356442928314209
    61     7.628720e+00     6.129150e-02
 * time: 0.35999011993408203
    62     7.627565e+00     7.484975e-02
 * time: 0.3632240295410156
    63     7.626556e+00     5.450509e-02
 * time: 0.3671300411224365
    64     7.626366e+00     1.247762e-01
 * time: 0.37050700187683105
    65     7.626152e+00     1.165183e-01
 * time: 0.37384510040283203
    66     7.625068e+00     6.049342e-02
 * time: 0.3779571056365967
    67     7.624564e+00     9.068418e-02
 * time: 0.38132810592651367
    68     7.623702e+00     8.241390e-02
 * time: 0.38471293449401855
    69     7.623181e+00     1.032951e-01
 * time: 0.3881070613861084
    70     7.622232e+00     4.799063e-02
 * time: 0.3933279514312744
    71     7.621751e+00     5.852966e-02
 * time: 0.3968479633331299
    72     7.621444e+00     6.514392e-02
 * time: 0.4002671241760254
    73     7.621335e+00     5.034334e-02
 * time: 0.4071919918060303
    74     7.620891e+00     5.019804e-02
 * time: 0.4126110076904297
    75     7.620466e+00     4.222768e-02
 * time: 0.4195590019226074
    76     7.620076e+00     2.615660e-02
 * time: 0.4252490997314453
    77     7.619831e+00     3.308669e-02
 * time: 0.42986202239990234
    78     7.619582e+00     2.643220e-02
 * time: 0.43650293350219727
    79     7.619580e+00     5.961720e-02
 * time: 0.4399290084838867
    80     7.619542e+00     4.142535e-02
 * time: 0.4431760311126709
    81     7.619308e+00     3.200206e-02
 * time: 0.4461050033569336
    82     7.619115e+00     6.132642e-02
 * time: 0.449415922164917
    83     7.618842e+00     5.767187e-02
 * time: 0.4529240131378174
    84     7.618754e+00     5.739387e-02
 * time: 0.47153210639953613
    85     7.618407e+00     3.375749e-02
 * time: 0.47493505477905273
    86     7.617922e+00     3.605143e-02
 * time: 0.47808408737182617
    87     7.617403e+00     3.743774e-02
 * time: 0.48122310638427734
    88     7.617212e+00     5.118934e-02
 * time: 0.4925239086151123
    89     7.616759e+00     4.118817e-02
 * time: 0.49580812454223633
    90     7.616357e+00     6.254198e-02
 * time: 0.5002820491790771
    91     7.616030e+00     3.408293e-02
 * time: 0.5042860507965088
    92     7.615747e+00     3.991483e-02
 * time: 0.5073931217193604
    93     7.615607e+00     6.159236e-02
 * time: 0.5106620788574219
    94     7.615289e+00     3.964765e-02
 * time: 0.5148138999938965
    95     7.615028e+00     5.277666e-02
 * time: 0.5178990364074707
    96     7.614550e+00     5.343814e-02
 * time: 0.5211019515991211
    97     7.614191e+00     6.015162e-02
 * time: 0.5243370532989502
    98     7.613900e+00     5.843907e-02
 * time: 0.5274810791015625
    99     7.613731e+00     7.718938e-02
 * time: 0.5312039852142334
   100     7.613350e+00     6.671927e-02
 * time: 0.5343799591064453
   101     7.612989e+00     5.178083e-02
 * time: 0.5383169651031494
   102     7.612718e+00     3.536126e-02
 * time: 0.5424759387969971
   103     7.612420e+00     5.074594e-02
 * time: 0.546929121017456
   104     7.612170e+00     5.592484e-02
 * time: 0.5514869689941406
   105     7.612047e+00     4.115484e-02
 * time: 0.5553591251373291
   106     7.611835e+00     3.714871e-02
 * time: 0.5586891174316406
   107     7.611523e+00     3.073197e-02
 * time: 0.5629539489746094
   108     7.611461e+00     4.808942e-02
 * time: 0.5661389827728271
   109     7.611203e+00     3.648855e-02
 * time: 0.5702519416809082
   110     7.610881e+00     3.144785e-02
 * time: 0.5737159252166748
   111     7.610516e+00     4.533274e-02
 * time: 0.5774860382080078
   112     7.610248e+00     4.137887e-02
 * time: 0.5816209316253662
   113     7.610134e+00     3.941642e-02
 * time: 0.5857090950012207
   114     7.609981e+00     1.991233e-02
 * time: 0.6016309261322021
   115     7.609887e+00     3.678904e-02
 * time: 0.6048579216003418
   116     7.609667e+00     3.054150e-02
 * time: 0.6080119609832764
   117     7.609580e+00     3.545305e-02
 * time: 0.6110310554504395
   118     7.609366e+00     3.374087e-02
 * time: 0.6140389442443848
   119     7.609111e+00     2.132177e-02
 * time: 0.6176400184631348
   120     7.608921e+00     3.232676e-02
 * time: 0.6208279132843018
   121     7.608783e+00     5.344966e-02
 * time: 0.6243560314178467
   122     7.608457e+00     3.736616e-02
 * time: 0.6274220943450928
   123     7.608287e+00     4.028187e-02
 * time: 0.6305899620056152
   124     7.608087e+00     4.563596e-02
 * time: 0.6339280605316162
   125     7.607794e+00     3.031604e-02
 * time: 0.6379690170288086
   126     7.607518e+00     3.119621e-02
 * time: 0.6421329975128174
   127     7.607324e+00     2.486876e-02
 * time: 0.6456940174102783
   128     7.607144e+00     3.927294e-02
 * time: 0.6484870910644531
   129     7.606905e+00     3.743028e-02
 * time: 0.6514968872070312
   130     7.606865e+00     5.001889e-02
 * time: 0.6597630977630615
   131     7.606684e+00     5.998625e-02
 * time: 0.6630260944366455
   132     7.606379e+00     4.892161e-02
 * time: 0.6663720607757568
   133     7.606019e+00     5.897510e-02
 * time: 0.669666051864624
   134     7.605895e+00     5.835775e-02
 * time: 0.6737511157989502
   135     7.605529e+00     6.145676e-02
 * time: 0.6781129837036133
   136     7.605441e+00     5.913657e-02
 * time: 0.681225061416626
   137     7.604960e+00     6.140341e-02
 * time: 0.6850600242614746
   138     7.604615e+00     7.197212e-02
 * time: 0.6882419586181641
   139     7.604391e+00     6.654725e-02
 * time: 0.6913149356842041
   140     7.604042e+00     4.288100e-02
 * time: 0.6951639652252197
   141     7.603491e+00     4.574636e-02
 * time: 0.6983311176300049
   142     7.603190e+00     3.852431e-02
 * time: 0.7026081085205078
   143     7.602961e+00     4.645119e-02
 * time: 0.7057540416717529
   144     7.602846e+00     4.211701e-02
 * time: 0.7088649272918701
   145     7.602700e+00     4.313572e-02
 * time: 0.7223649024963379
   146     7.602494e+00     4.806204e-02
 * time: 0.7253549098968506
   147     7.602222e+00     2.716103e-02
 * time: 0.7291650772094727
   148     7.602073e+00     3.925079e-02
 * time: 0.732511043548584
   149     7.601807e+00     4.177805e-02
 * time: 0.7370409965515137
   150     7.601649e+00     3.735440e-02
 * time: 0.7407538890838623
   151     7.601484e+00     2.376040e-02
 * time: 0.74434494972229
   152     7.601470e+00     4.903720e-02
 * time: 0.7480709552764893
   153     7.601317e+00     3.932386e-02
 * time: 0.7525091171264648
   154     7.601255e+00     4.931099e-02
 * time: 0.7557470798492432
   155     7.601215e+00     4.414912e-02
 * time: 0.7586669921875
   156     7.601134e+00     3.269668e-02
 * time: 0.7621428966522217
   157     7.601022e+00     2.164684e-02
 * time: 0.7657370567321777
   158     7.600899e+00     2.864477e-02
 * time: 0.7692220211029053
   159     7.600712e+00     2.320747e-02
 * time: 0.7735199928283691
   160     7.600634e+00     3.618709e-02
 * time: 0.7770650386810303
   161     7.600579e+00     3.187546e-02
 * time: 0.7806549072265625
   162     7.600535e+00     2.335649e-02
 * time: 0.783958911895752
   163     7.600528e+00     4.300130e-02
 * time: 0.7871699333190918
   164     7.600498e+00     2.436966e-02
 * time: 0.790229082107544
   165     7.600399e+00     4.620966e-02
 * time: 0.7935009002685547
   166     7.600281e+00     1.754702e-02
 * time: 0.7974939346313477
   167     7.600153e+00     1.268561e-02
 * time: 0.8015010356903076
   168     7.600101e+00     3.072953e-02
 * time: 0.8048090934753418
   169     7.600038e+00     1.985024e-02
 * time: 0.8092870712280273
   170     7.599987e+00     2.231722e-02
 * time: 0.8130450248718262
   171     7.599944e+00     2.888140e-02
 * time: 0.8163149356842041
   172     7.599870e+00     1.815027e-02
 * time: 0.8202509880065918
   173     7.599850e+00     2.125707e-02
 * time: 0.8235421180725098
   174     7.599782e+00     1.586047e-02
 * time: 0.8278069496154785
   175     7.599747e+00     1.386194e-02
 * time: 0.842379093170166
   176     7.599719e+00     1.542014e-02
 * time: 0.8454849720001221
   177     7.599660e+00     1.137233e-02
 * time: 0.8484539985656738
   178     7.599629e+00     1.981184e-02
 * time: 0.8515310287475586
   179     7.599583e+00     1.536164e-02
 * time: 0.8555169105529785
   180     7.599541e+00     1.844064e-02
 * time: 0.8590860366821289
   181     7.599511e+00     1.749195e-02
 * time: 0.863055944442749
   182     7.599475e+00     1.202908e-02
 * time: 0.867048978805542
   183     7.599445e+00     1.054672e-02
 * time: 0.8702089786529541
   184     7.599443e+00     1.801723e-02
 * time: 0.8736300468444824
   185     7.599416e+00     1.321944e-02
 * time: 0.8765599727630615
   186     7.599376e+00     1.556261e-02
 * time: 0.8796429634094238
   187     7.599356e+00     1.502147e-02
 * time: 0.8826000690460205
   188     7.599341e+00     2.127865e-02
 * time: 0.8856079578399658
   189     7.599299e+00     8.966958e-03
 * time: 0.8898129463195801
   190     7.599272e+00     9.103726e-03
 * time: 0.8928489685058594
   191     7.599252e+00     9.522144e-03
 * time: 0.8957169055938721
   192     7.599224e+00     9.413032e-03
 * time: 0.8986289501190186
   193     7.599214e+00     1.205275e-02
 * time: 0.9016048908233643
   194     7.599213e+00     1.362649e-02
 * time: 0.9051210880279541
   195     7.599188e+00     9.556280e-03
 * time: 0.9094860553741455
   196     7.599172e+00     8.555209e-03
 * time: 0.9125380516052246
   197     7.599156e+00     6.744782e-03
 * time: 0.9158439636230469
   198     7.599156e+00     1.388259e-02
 * time: 0.919105052947998
   199     7.599143e+00     8.155193e-03
 * time: 0.9233279228210449
   200     7.599136e+00     1.031590e-02
 * time: 0.9265310764312744
   201     7.599127e+00     7.791599e-03
 * time: 0.9298279285430908
   202     7.599122e+00     7.751337e-03
 * time: 0.9331250190734863
   203     7.599112e+00     6.378310e-03
 * time: 0.9364039897918701
   204     7.599108e+00     1.004145e-02
 * time: 0.9395549297332764
   205     7.599100e+00     6.300964e-03
 * time: 0.9435939788818359
   206     7.599095e+00     6.997528e-03
 * time: 0.9567849636077881
   207     7.599089e+00     8.928699e-03
 * time: 0.9600059986114502
   208     7.599082e+00     6.693594e-03
 * time: 0.963141918182373
   209     7.599082e+00     1.005236e-02
 * time: 0.9662630558013916
   210     7.599078e+00     7.104780e-03
 * time: 0.9700789451599121
   211     7.599073e+00     9.154709e-03
 * time: 0.9733579158782959
   212     7.599067e+00     5.794263e-03
 * time: 0.977665901184082
   213     7.599065e+00     8.799044e-03
 * time: 0.980863094329834
   214     7.599060e+00     6.162073e-03
 * time: 0.9842259883880615
   215     7.599058e+00     6.560874e-03
 * time: 0.9876739978790283
   216     7.599052e+00     5.394681e-03
 * time: 0.9907679557800293
   217     7.599045e+00     5.668608e-03
 * time: 0.9946799278259277
   218     7.599045e+00     8.940259e-03
 * time: 0.9980630874633789
   219     7.599042e+00     5.563049e-03
 * time: 1.0012640953063965
   220     7.599039e+00     8.681427e-03
 * time: 1.0045781135559082
   221     7.599038e+00     5.695018e-03
 * time: 1.0076940059661865
   222     7.599035e+00     6.094192e-03
 * time: 1.0111329555511475
   223     7.599027e+00     6.610097e-03
 * time: 1.0145149230957031
   224     7.599025e+00     1.275476e-02
 * time: 1.0175139904022217
   225     7.599022e+00     8.951125e-03
 * time: 1.0208029747009277
   226     7.599017e+00     8.744781e-03
 * time: 1.023893117904663
   227     7.599007e+00     8.258316e-03
 * time: 1.0268158912658691
   228     7.598995e+00     6.639872e-03
 * time: 1.031559944152832
   229     7.598985e+00     4.652088e-03
 * time: 1.0355710983276367
   230     7.598981e+00     9.492069e-03
 * time: 1.038909912109375
   231     7.598970e+00     1.026518e-02
 * time: 1.0430619716644287
   232     7.598955e+00     6.670021e-03
 * time: 1.0472180843353271
   233     7.598953e+00     9.308846e-03
 * time: 1.0502099990844727
   234     7.598945e+00     1.168844e-02
 * time: 1.053339958190918
   235     7.598924e+00     6.774992e-03
 * time: 1.0570878982543945
   236     7.598921e+00     1.048632e-02
 * time: 1.0601179599761963
   237     7.598908e+00     6.978028e-03
 * time: 1.0744600296020508
   238     7.598903e+00     6.601921e-03
 * time: 1.0785300731658936
   239     7.598893e+00     7.486318e-03
 * time: 1.0818800926208496
   240     7.598881e+00     5.266363e-03
 * time: 1.0851590633392334
   241     7.598876e+00     1.145832e-02
 * time: 1.0886180400848389
   242     7.598868e+00     8.234629e-03
 * time: 1.0930581092834473
   243     7.598863e+00     1.220363e-02
 * time: 1.09639310836792
   244     7.598856e+00     7.057238e-03
 * time: 1.099782943725586
   245     7.598852e+00     7.292515e-03
 * time: 1.1033470630645752
   246     7.598844e+00     6.635386e-03
 * time: 1.1065399646759033
   247     7.598842e+00     1.099113e-02
 * time: 1.1099159717559814
   248     7.598837e+00     8.643752e-03
 * time: 1.1132290363311768
   249     7.598832e+00     7.454498e-03
 * time: 1.1163089275360107
   250     7.598827e+00     5.194726e-03
 * time: 1.1195619106292725
   251     7.598821e+00     5.087209e-03
 * time: 1.1230759620666504
   252     7.598821e+00     5.830070e-03
 * time: 1.1263349056243896
   253     7.598817e+00     5.113637e-03
 * time: 1.1296560764312744
   254     7.598810e+00     6.716678e-03
 * time: 1.133678913116455
   255     7.598806e+00     3.591292e-03
 * time: 1.1378231048583984
   256     7.598802e+00     4.278781e-03
 * time: 1.1419761180877686
   257     7.598799e+00     6.671592e-03
 * time: 1.1453750133514404
   258     7.598794e+00     3.130776e-03
 * time: 1.14935302734375
   259     7.598793e+00     5.527704e-03
 * time: 1.152446985244751
   260     7.598792e+00     6.192293e-03
 * time: 1.1573679447174072
   261     7.598791e+00     4.619408e-03
 * time: 1.1609220504760742
   262     7.598786e+00     4.619104e-03
 * time: 1.1642260551452637
   263     7.598784e+00     6.747568e-03
 * time: 1.1675488948822021
   264     7.598781e+00     4.380397e-03
 * time: 1.1710989475250244
   265     7.598776e+00     5.113458e-03
 * time: 1.1745641231536865
   266     7.598773e+00     4.411115e-03
 * time: 1.1776869297027588
   267     7.598768e+00     7.371776e-03
 * time: 1.1808130741119385
   268     7.598763e+00     3.709126e-03
 * time: 1.20094895362854
   269     7.598761e+00     5.668983e-03
 * time: 1.2044000625610352
   270     7.598759e+00     5.081911e-03
 * time: 1.208453893661499
   271     7.598756e+00     4.594798e-03
 * time: 1.2123188972473145
   272     7.598756e+00     4.818197e-03
 * time: 1.2156140804290771
   273     7.598753e+00     4.925025e-03
 * time: 1.2190070152282715
   274     7.598753e+00     7.579308e-03
 * time: 1.2221879959106445
   275     7.598751e+00     6.290251e-03
 * time: 1.2253038883209229
   276     7.598748e+00     6.331856e-03
 * time: 1.2286059856414795
   277     7.598745e+00     3.756275e-03
 * time: 1.2330551147460938
   278     7.598744e+00     4.631379e-03
 * time: 1.2366108894348145
   279     7.598741e+00     3.419788e-03
 * time: 1.2400529384613037
   280     7.598739e+00     5.387184e-03
 * time: 1.2434170246124268
   281     7.598738e+00     3.265844e-03
 * time: 1.2465839385986328
   282     7.598737e+00     4.040581e-03
 * time: 1.2501909732818604
   283     7.598736e+00     2.613479e-03
 * time: 1.2541980743408203
   284     7.598735e+00     3.059482e-03
 * time: 1.2572929859161377
   285     7.598734e+00     1.882848e-03
 * time: 1.2614319324493408
   286     7.598733e+00     2.295664e-03
 * time: 1.2646629810333252
   287     7.598732e+00     2.313777e-03
 * time: 1.2683019638061523
   288     7.598731e+00     2.203327e-03
 * time: 1.271723985671997
   289     7.598731e+00     1.230984e-03
 * time: 1.276392936706543
   290     7.598730e+00     1.796526e-03
 * time: 1.2809150218963623
   291     7.598729e+00     8.866850e-04
 * time: 1.2854878902435303
   292     7.598729e+00     1.646098e-03
 * time: 1.2888050079345703
   293     7.598729e+00     1.350538e-03
 * time: 1.2922499179840088
   294     7.598728e+00     1.167798e-03
 * time: 1.295543909072876
   295     7.598728e+00     1.628298e-03
 * time: 1.298590898513794
   296     7.598728e+00     1.398335e-03
 * time: 1.301793098449707
   297     7.598728e+00     2.147336e-03
 * time: 1.3050470352172852
   298     7.598728e+00     1.529154e-03
 * time: 1.3079841136932373
   299     7.598727e+00     1.377212e-03
 * time: 1.3215200901031494
   300     7.598727e+00     1.519043e-03
 * time: 1.3246779441833496
   301     7.598726e+00     1.515007e-03
 * time: 1.3279941082000732
   302     7.598726e+00     1.265058e-03
 * time: 1.3316020965576172
   303     7.598726e+00     2.304934e-03
 * time: 1.334686040878296
   304     7.598725e+00     1.446549e-03
 * time: 1.3386731147766113
   305     7.598725e+00     1.366589e-03
 * time: 1.3420689105987549
   306     7.598725e+00     1.707924e-03
 * time: 1.345141887664795
   307     7.598725e+00     1.522957e-03
 * time: 1.348357915878296
   308     7.598725e+00     1.260043e-03
 * time: 1.3522980213165283
   309     7.598724e+00     1.102570e-03
 * time: 1.3563649654388428
   310     7.598724e+00     1.345754e-03
 * time: 1.3595969676971436
   311     7.598724e+00     1.030515e-03
 * time: 1.3626110553741455
   312     7.598724e+00     1.065598e-03
 * time: 1.3659119606018066
   313     7.598724e+00     1.267758e-03
 * time: 1.3688170909881592
   314     7.598724e+00     1.540675e-03
 * time: 1.3719420433044434
   315     7.598724e+00     1.084002e-03
 * time: 1.3750450611114502
   316     7.598724e+00     9.246774e-04
 * time: 1.378175973892212
   317     7.598723e+00     1.229101e-03
 * time: 1.3812448978424072
   318     7.598723e+00     9.155766e-04
 * time: 1.3851289749145508
   319     7.598723e+00     1.054951e-03
 * time: 1.3881700038909912
   320     7.598723e+00     1.205218e-03
 * time: 1.3914549350738525
   321     7.598723e+00     7.061848e-04
 * time: 1.3951020240783691
   322     7.598723e+00     7.194395e-04
 * time: 1.3981170654296875
   323     7.598723e+00     7.745660e-04
 * time: 1.401155948638916
   324     7.598723e+00     1.209861e-03
 * time: 1.4044640064239502
   325     7.598723e+00     1.101015e-03
 * time: 1.408785104751587
   326     7.598723e+00     1.025108e-03
 * time: 1.4119601249694824
   327     7.598722e+00     8.701216e-04
 * time: 1.4150989055633545
   328     7.598722e+00     9.394007e-04
 * time: 1.4182178974151611
   329     7.598722e+00     8.008154e-04
 * time: 1.4216609001159668
   330     7.598722e+00     1.429228e-03
 * time: 1.4346981048583984
   331     7.598722e+00     8.889286e-04
 * time: 1.4391429424285889
   332     7.598722e+00     8.938396e-04
 * time: 1.4420299530029297
   333     7.598722e+00     6.671993e-04
 * time: 1.4456820487976074
   334     7.598722e+00     9.958619e-04
 * time: 1.4487440586090088
   335     7.598722e+00     8.202336e-04
 * time: 1.45284104347229
   336     7.598722e+00     8.027109e-04
 * time: 1.4560160636901855
   337     7.598722e+00     4.321111e-04
 * time: 1.4599320888519287
   338     7.598722e+00     7.842968e-04
 * time: 1.4632279872894287
   339     7.598722e+00     7.286952e-04
 * time: 1.466322898864746
   340     7.598722e+00     5.875914e-04
 * time: 1.4697339534759521
   341     7.598722e+00     5.433838e-04
 * time: 1.4730150699615479
   342     7.598721e+00     5.424111e-04
 * time: 1.4761850833892822
   343     7.598721e+00     7.517617e-04
 * time: 1.479438066482544
   344     7.598721e+00     4.516957e-04
 * time: 1.4824531078338623
   345     7.598721e+00     6.303975e-04
 * time: 1.4856109619140625
   346     7.598721e+00     5.094169e-04
 * time: 1.4886629581451416
   347     7.598721e+00     4.613780e-04
 * time: 1.491779088973999
   348     7.598721e+00     5.280957e-04
 * time: 1.4950571060180664
   349     7.598721e+00     1.067353e-03
 * time: 1.4984478950500488
   350     7.598721e+00     6.675628e-04
 * time: 1.5040900707244873
   351     7.598721e+00     8.263135e-04
 * time: 1.5072259902954102
   352     7.598721e+00     8.311332e-04
 * time: 1.5106699466705322
   353     7.598721e+00     1.015735e-03
 * time: 1.5141410827636719
   354     7.598721e+00     7.207090e-04
 * time: 1.5182991027832031
   355     7.598721e+00     9.056067e-04
 * time: 1.5214800834655762
   356     7.598721e+00     6.106045e-04
 * time: 1.5256218910217285
   357     7.598721e+00     6.104408e-04
 * time: 1.5324220657348633
   358     7.598721e+00     7.783587e-04
 * time: 1.535794973373413
   359     7.598720e+00     1.272730e-03
 * time: 1.539241075515747
   360     7.598720e+00     2.243971e-03
 * time: 1.5427451133728027
   361     7.598720e+00     1.669035e-03
 * time: 1.5565459728240967
   362     7.598720e+00     1.473053e-03
 * time: 1.5606110095977783
   363     7.598720e+00     2.562167e-03
 * time: 1.5643839836120605
   364     7.598719e+00     1.452983e-03
 * time: 1.5687339305877686
   365     7.598719e+00     1.425404e-03
 * time: 1.57212495803833
   366     7.598718e+00     2.515201e-03
 * time: 1.5754039287567139
   367     7.598718e+00     1.450139e-03
 * time: 1.578834056854248
   368     7.598718e+00     1.588296e-03
 * time: 1.5820770263671875
   369     7.598717e+00     1.831191e-03
 * time: 1.5851750373840332
   370     7.598717e+00     2.861617e-03
 * time: 1.5882799625396729
   371     7.598717e+00     1.772637e-03
 * time: 1.5924999713897705
   372     7.598716e+00     1.588883e-03
 * time: 1.5957369804382324
   373     7.598716e+00     1.371079e-03
 * time: 1.5986690521240234
   374     7.598716e+00     2.219997e-03
 * time: 1.6016759872436523
   375     7.598716e+00     2.019910e-03
 * time: 1.6050400733947754
   376     7.598715e+00     1.517477e-03
 * time: 1.6083629131317139
   377     7.598715e+00     1.370497e-03
 * time: 1.6122140884399414
   378     7.598714e+00     1.606267e-03
 * time: 1.6160879135131836
   379     7.598714e+00     1.702471e-03
 * time: 1.6190979480743408
   380     7.598714e+00     1.650339e-03
 * time: 1.6222209930419922
   381     7.598713e+00     8.558381e-04
 * time: 1.6262168884277344
   382     7.598713e+00     1.408438e-03
 * time: 1.6293830871582031
   383     7.598713e+00     1.270114e-03
 * time: 1.6323769092559814
   384     7.598713e+00     8.899787e-04
 * time: 1.6452770233154297
   385     7.598712e+00     1.138379e-03
 * time: 1.6494159698486328
   386     7.598712e+00     1.631318e-03
 * time: 1.652390956878662
   387     7.598712e+00     1.204121e-03
 * time: 1.6558010578155518
   388     7.598712e+00     1.485057e-03
 * time: 1.658682107925415
   389     7.598711e+00     9.704521e-04
 * time: 1.6617000102996826
   390     7.598711e+00     1.785372e-03
 * time: 1.664721965789795
   391     7.598710e+00     1.159944e-03
 * time: 1.6791820526123047
   392     7.598710e+00     1.585841e-03
 * time: 1.682615041732788
   393     7.598709e+00     1.365018e-03
 * time: 1.68607497215271
   394     7.598708e+00     1.397530e-03
 * time: 1.6898720264434814
   395     7.598708e+00     1.757342e-03
 * time: 1.69297194480896
   396     7.598708e+00     8.766835e-04
 * time: 1.696655035018921
   397     7.598707e+00     1.203942e-03
 * time: 1.6997148990631104
   398     7.598707e+00     1.199751e-03
 * time: 1.703726053237915
   399     7.598706e+00     1.812212e-03
 * time: 1.7065489292144775
   400     7.598706e+00     1.634000e-03
 * time: 1.70933198928833
   401     7.598706e+00     2.717626e-03
 * time: 1.7122409343719482
   402     7.598705e+00     1.093487e-03
 * time: 1.715224027633667
   403     7.598705e+00     1.329281e-03
 * time: 1.718616008758545
   404     7.598705e+00     1.686438e-03
 * time: 1.7214961051940918
   405     7.598704e+00     1.849168e-03
 * time: 1.7244160175323486
   406     7.598704e+00     1.871600e-03
 * time: 1.7272889614105225
   407     7.598704e+00     1.580471e-03
 * time: 1.7309739589691162
   408     7.598704e+00     2.024247e-03
 * time: 1.7343599796295166
   409     7.598703e+00     1.460100e-03
 * time: 1.7377040386199951
   410     7.598703e+00     9.087871e-04
 * time: 1.7418670654296875
   411     7.598703e+00     1.278795e-03
 * time: 1.7454280853271484
   412     7.598702e+00     1.581154e-03
 * time: 1.7493700981140137
   413     7.598702e+00     1.059246e-03
 * time: 1.7535710334777832
   414     7.598702e+00     8.258048e-04
 * time: 1.7578520774841309
   415     7.598702e+00     1.157950e-03
 * time: 1.761159896850586
   416     7.598702e+00     9.532252e-04
 * time: 1.7652969360351562
   417     7.598701e+00     1.048914e-03
 * time: 1.7688050270080566
   418     7.598701e+00     1.041139e-03
 * time: 1.772171974182129
   419     7.598701e+00     8.132259e-04
 * time: 1.7762069702148438
   420     7.598701e+00     7.094565e-04
 * time: 1.7795538902282715
   421     7.598701e+00     6.780542e-04
 * time: 1.7827210426330566
   422     7.598701e+00     8.905583e-04
 * time: 1.7986679077148438
   423     7.598700e+00     6.259412e-04
 * time: 1.8029289245605469
   424     7.598700e+00     8.955104e-04
 * time: 1.8061659336090088
   425     7.598700e+00     1.291328e-03
 * time: 1.809324026107788
   426     7.598700e+00     1.338926e-03
 * time: 1.8125901222229004
   427     7.598700e+00     6.850607e-04
 * time: 1.8159270286560059
   428     7.598700e+00     4.294056e-04
 * time: 1.8189198970794678
   429     7.598700e+00     8.221951e-04
 * time: 1.822171926498413
   430     7.598700e+00     5.612582e-04
 * time: 1.825261116027832
   431     7.598700e+00     4.535699e-04
 * time: 1.829190969467163
   432     7.598700e+00     8.028438e-04
 * time: 1.8324930667877197
   433     7.598700e+00     5.667367e-04
 * time: 1.8357419967651367
   434     7.598699e+00     5.470449e-04
 * time: 1.8388659954071045
   435     7.598699e+00     6.519974e-04
 * time: 1.8423080444335938
   436     7.598699e+00     6.789692e-04
 * time: 1.8462591171264648
   437     7.598699e+00     3.836938e-04
 * time: 1.8502509593963623
   438     7.598699e+00     5.883703e-04
 * time: 1.8536341190338135
   439     7.598699e+00     5.028550e-04
 * time: 1.8567659854888916
   440     7.598699e+00     6.894197e-04
 * time: 1.8601479530334473
   441     7.598699e+00     8.529473e-04
 * time: 1.863374948501587
   442     7.598699e+00     7.562455e-04
 * time: 1.8664700984954834
   443     7.598699e+00     4.304935e-04
 * time: 1.8705759048461914
   444     7.598699e+00     2.888762e-04
 * time: 1.8744699954986572
   445     7.598699e+00     4.360466e-04
 * time: 1.8776319026947021
   446     7.598699e+00     5.767385e-04
 * time: 1.8806500434875488
   447     7.598699e+00     4.372463e-04
 * time: 1.8837499618530273
   448     7.598699e+00     4.789014e-04
 * time: 1.8869071006774902
   449     7.598699e+00     4.343549e-04
 * time: 1.891174077987671
   450     7.598699e+00     5.166728e-04
 * time: 1.894212007522583
   451     7.598699e+00     5.777651e-04
 * time: 1.8975839614868164
   452     7.598699e+00     7.693372e-04
 * time: 1.9008700847625732
   453     7.598698e+00     4.968161e-04
 * time: 1.914520025253296
   454     7.598698e+00     6.450706e-04
 * time: 1.9175610542297363
   455     7.598698e+00     1.186797e-03
 * time: 1.9216539859771729
   456     7.598698e+00     9.582563e-04
 * time: 1.925004005432129
   457     7.598698e+00     1.457105e-03
 * time: 1.9282100200653076
   458     7.598698e+00     7.284776e-04
 * time: 1.9313099384307861
   459     7.598698e+00     1.011401e-03
 * time: 1.9344439506530762
   460     7.598697e+00     9.101952e-04
 * time: 1.9377100467681885
   461     7.598697e+00     6.677622e-04
 * time: 1.941499948501587
   462     7.598697e+00     7.854965e-04
 * time: 1.94535493850708
   463     7.598697e+00     6.028643e-04
 * time: 1.9491510391235352
   464     7.598697e+00     6.778111e-04
 * time: 1.95225191116333
   465     7.598697e+00     6.498104e-04
 * time: 1.9551401138305664
   466     7.598697e+00     8.917549e-04
 * time: 1.9589729309082031
   467     7.598697e+00     7.004593e-04
 * time: 1.9625420570373535
   468     7.598696e+00     3.054936e-04
 * time: 1.9667720794677734
   469     7.598696e+00     5.355521e-04
 * time: 1.9701309204101562
   470     7.598696e+00     5.200561e-04
 * time: 1.9731340408325195
   471     7.598696e+00     3.692628e-04
 * time: 1.9759619235992432
   472     7.598696e+00     4.675714e-04
 * time: 1.9791688919067383
   473     7.598696e+00     3.874923e-04
 * time: 1.9821970462799072
   474     7.598696e+00     6.487450e-04
 * time: 1.9852070808410645
   475     7.598696e+00     1.044002e-03
 * time: 1.9879939556121826
   476     7.598696e+00     6.217150e-04
 * time: 1.9907560348510742
   477     7.598696e+00     5.532096e-04
 * time: 1.9936459064483643
   478     7.598696e+00     5.231194e-04
 * time: 1.9965050220489502
   479     7.598696e+00     7.052042e-04
 * time: 1.9998741149902344
   480     7.598696e+00     3.674588e-04
 * time: 2.0036680698394775
   481     7.598696e+00     4.972539e-04
 * time: 2.006709098815918
   482     7.598696e+00     5.184080e-04
 * time: 2.0096540451049805
   483     7.598696e+00     4.327454e-04
 * time: 2.0125679969787598
   484     7.598696e+00     6.276157e-04
 * time: 2.0253961086273193
   485     7.598695e+00     7.520174e-04
 * time: 2.0285611152648926
   486     7.598695e+00     6.759132e-04
 * time: 2.0325140953063965
   487     7.598695e+00     4.577462e-04
 * time: 2.036602020263672
   488     7.598695e+00     5.316049e-04
 * time: 2.0396580696105957
   489     7.598695e+00     4.106061e-04
 * time: 2.0435070991516113
   490     7.598695e+00     5.134823e-04
 * time: 2.047914981842041
   491     7.598695e+00     3.929256e-04
 * time: 2.0511369705200195
   492     7.598695e+00     5.960607e-04
 * time: 2.054374933242798
   493     7.598695e+00     7.066916e-04
 * time: 2.057486057281494
   494     7.598695e+00     6.119717e-04
 * time: 2.0605320930480957
   495     7.598695e+00     8.661095e-04
 * time: 2.0638909339904785
   496     7.598695e+00     2.781548e-04
 * time: 2.0695700645446777
   497     7.598695e+00     6.600319e-04
 * time: 2.07326602935791
   498     7.598695e+00     7.615193e-04
 * time: 2.0779929161071777
   499     7.598695e+00     3.404864e-04
 * time: 2.082819938659668
   500     7.598695e+00     5.520007e-04
 * time: 2.0861079692840576
   501     7.598695e+00     4.267948e-04
 * time: 2.0905299186706543
   502     7.598695e+00     5.036224e-04
 * time: 2.09397292137146
   503     7.598695e+00     5.250339e-04
 * time: 2.097407102584839
   504     7.598695e+00     3.207097e-04
 * time: 2.1016299724578857
   505     7.598695e+00     3.169226e-04
 * time: 2.1058590412139893
   506     7.598695e+00     2.058985e-04
 * time: 2.1101019382476807
   507     7.598695e+00     2.983427e-04
 * time: 2.1134989261627197
   508     7.598695e+00     5.301863e-04
 * time: 2.116995096206665
   509     7.598695e+00     5.181497e-04
 * time: 2.120445966720581
   510     7.598695e+00     4.222465e-04
 * time: 2.1238200664520264
   511     7.598695e+00     3.463315e-04
 * time: 2.1282451152801514
   512     7.598695e+00     4.262577e-04
 * time: 2.1314260959625244
   513     7.598695e+00     1.615462e-04
 * time: 2.1458730697631836
   514     7.598695e+00     2.221645e-04
 * time: 2.149095058441162
   515     7.598695e+00     2.175180e-04
 * time: 2.1524500846862793
Out[5]: