Gross-Pitaevskii equation with external magnetic field

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.186678e+01     9.383155e+00
 * time: 0.0016548633575439453
     1     2.763206e+01     4.860778e+00
 * time: 0.006888866424560547
     2     1.885185e+01     4.280055e+00
 * time: 0.012089967727661133
     3     1.288344e+01     2.940758e+00
 * time: 0.01645803451538086
     4     1.194721e+01     2.801569e+00
 * time: 0.019794940948486328
     5     1.089841e+01     1.770251e+00
 * time: 0.023251056671142578
     6     1.011533e+01     1.271781e+00
 * time: 0.026489973068237305
     7     9.340925e+00     1.162382e+00
 * time: 0.030128002166748047
     8     8.725210e+00     6.931441e-01
 * time: 0.033540964126586914
     9     8.467250e+00     4.123209e-01
 * time: 0.03746485710144043
    10     8.358130e+00     4.780912e-01
 * time: 0.04129290580749512
    11     8.286957e+00     4.688065e-01
 * time: 0.04557991027832031
    12     8.272010e+00     6.452613e-01
 * time: 0.04852890968322754
    13     8.188374e+00     4.655708e-01
 * time: 0.05157303810119629
    14     8.162237e+00     5.967006e-01
 * time: 0.05424189567565918
    15     8.085695e+00     7.480522e-01
 * time: 0.056715965270996094
    16     8.013657e+00     5.301728e-01
 * time: 0.060133934020996094
    17     7.987975e+00     7.962903e-01
 * time: 0.1053159236907959
    18     7.929826e+00     6.741991e-01
 * time: 0.10892200469970703
    19     7.848895e+00     4.961541e-01
 * time: 0.11214494705200195
    20     7.831137e+00     6.316091e-01
 * time: 0.11490297317504883
    21     7.818284e+00     5.626819e-01
 * time: 0.11750292778015137
    22     7.790311e+00     4.648493e-01
 * time: 0.12085604667663574
    23     7.754822e+00     2.852908e-01
 * time: 0.12427401542663574
    24     7.730264e+00     3.372240e-01
 * time: 0.12671494483947754
    25     7.716068e+00     2.843639e-01
 * time: 0.12906289100646973
    26     7.701747e+00     2.010284e-01
 * time: 0.13161396980285645
    27     7.700124e+00     2.883239e-01
 * time: 0.1341390609741211
    28     7.691607e+00     2.326198e-01
 * time: 0.13651299476623535
    29     7.684879e+00     1.332036e-01
 * time: 0.13988590240478516
    30     7.682395e+00     2.440068e-01
 * time: 0.1424999237060547
    31     7.673349e+00     2.106831e-01
 * time: 0.14510488510131836
    32     7.666693e+00     1.711247e-01
 * time: 0.14756393432617188
    33     7.665821e+00     2.187834e-01
 * time: 0.15007495880126953
    34     7.662436e+00     1.341418e-01
 * time: 0.15333986282348633
    35     7.660110e+00     1.645868e-01
 * time: 0.15594887733459473
    36     7.659362e+00     2.084078e-01
 * time: 0.1585710048675537
    37     7.656457e+00     1.626125e-01
 * time: 0.16135597229003906
    38     7.656188e+00     2.102620e-01
 * time: 0.16412687301635742
    39     7.652600e+00     1.180453e-01
 * time: 0.16776490211486816
    40     7.650010e+00     1.336260e-01
 * time: 0.17072606086730957
    41     7.645992e+00     1.265253e-01
 * time: 0.17450690269470215
    42     7.644085e+00     1.230184e-01
 * time: 0.1774458885192871
    43     7.642765e+00     1.558829e-01
 * time: 0.18036198616027832
    44     7.640004e+00     6.930845e-02
 * time: 0.184251070022583
    45     7.638946e+00     9.780124e-02
 * time: 0.18727707862854004
    46     7.637115e+00     7.337029e-02
 * time: 0.19099688529968262
    47     7.635318e+00     5.779216e-02
 * time: 0.19481396675109863
    48     7.634469e+00     9.015674e-02
 * time: 0.19773197174072266
    49     7.632977e+00     4.968419e-02
 * time: 0.2015080451965332
    50     7.632184e+00     5.849560e-02
 * time: 0.20448589324951172
    51     7.631207e+00     3.947136e-02
 * time: 0.20828986167907715
    52     7.630482e+00     6.061611e-02
 * time: 0.21109485626220703
    53     7.629480e+00     4.417135e-02
 * time: 0.23879003524780273
    54     7.629195e+00     6.342209e-02
 * time: 0.24136900901794434
    55     7.628554e+00     5.408703e-02
 * time: 0.24381494522094727
    56     7.627807e+00     5.328629e-02
 * time: 0.24652791023254395
    57     7.627642e+00     5.465785e-02
 * time: 0.24916386604309082
    58     7.627028e+00     4.686141e-02
 * time: 0.2518930435180664
    59     7.626499e+00     5.711766e-02
 * time: 0.2545499801635742
    60     7.626113e+00     3.760274e-02
 * time: 0.25714802742004395
    61     7.625687e+00     4.041762e-02
 * time: 0.2595798969268799
    62     7.625313e+00     4.640540e-02
 * time: 0.26212286949157715
    63     7.625045e+00     5.613019e-02
 * time: 0.26473402976989746
    64     7.624572e+00     3.153462e-02
 * time: 0.2673459053039551
    65     7.624414e+00     8.770346e-02
 * time: 0.2699470520019531
    66     7.624001e+00     6.677856e-02
 * time: 0.2732388973236084
    67     7.623648e+00     6.925827e-02
 * time: 0.2758610248565674
    68     7.622986e+00     4.283296e-02
 * time: 0.2793090343475342
    69     7.622691e+00     5.392292e-02
 * time: 0.2817220687866211
    70     7.622416e+00     5.525521e-02
 * time: 0.2841958999633789
    71     7.621938e+00     4.712146e-02
 * time: 0.2868359088897705
    72     7.621588e+00     5.292050e-02
 * time: 0.2893838882446289
    73     7.621377e+00     9.317087e-02
 * time: 0.2919809818267822
    74     7.621063e+00     6.277133e-02
 * time: 0.29491496086120605
    75     7.620276e+00     5.789929e-02
 * time: 0.2977108955383301
    76     7.619513e+00     3.276276e-02
 * time: 0.3014090061187744
    77     7.618927e+00     4.876947e-02
 * time: 0.30429601669311523
    78     7.618346e+00     4.942239e-02
 * time: 0.3080019950866699
    79     7.617934e+00     4.279016e-02
 * time: 0.310960054397583
    80     7.617496e+00     3.773494e-02
 * time: 0.31472206115722656
    81     7.617094e+00     2.405566e-02
 * time: 0.3184850215911865
    82     7.617053e+00     5.394157e-02
 * time: 0.3213980197906494
    83     7.616967e+00     5.312728e-02
 * time: 0.3242359161376953
    84     7.616922e+00     6.436742e-02
 * time: 0.32726502418518066
    85     7.616531e+00     6.642598e-02
 * time: 0.33019304275512695
    86     7.616523e+00     7.204034e-02
 * time: 0.3329908847808838
    87     7.616272e+00     9.439531e-02
 * time: 0.33581995964050293
    88     7.615383e+00     4.137449e-02
 * time: 0.33868408203125
    89     7.615060e+00     5.195357e-02
 * time: 0.3416099548339844
    90     7.614599e+00     5.764841e-02
 * time: 0.3444099426269531
    91     7.614263e+00     3.488419e-02
 * time: 0.3680250644683838
    92     7.614200e+00     7.111445e-02
 * time: 0.37058591842651367
    93     7.613861e+00     4.745466e-02
 * time: 0.3739299774169922
    94     7.613758e+00     7.308721e-02
 * time: 0.3766360282897949
    95     7.613495e+00     4.235777e-02
 * time: 0.37992191314697266
    96     7.613284e+00     5.425698e-02
 * time: 0.3826110363006592
    97     7.613238e+00     6.422631e-02
 * time: 0.3851280212402344
    98     7.613127e+00     4.979302e-02
 * time: 0.3876760005950928
    99     7.612736e+00     4.531421e-02
 * time: 0.39010095596313477
   100     7.612289e+00     5.095473e-02
 * time: 0.39246296882629395
   101     7.612222e+00     4.808735e-02
 * time: 0.39496707916259766
   102     7.611996e+00     6.912635e-02
 * time: 0.3975050449371338
   103     7.611706e+00     2.985130e-02
 * time: 0.4007599353790283
   104     7.611560e+00     3.449005e-02
 * time: 0.4033820629119873
   105     7.611282e+00     5.316134e-02
 * time: 0.4059779644012451
   106     7.611116e+00     4.251209e-02
 * time: 0.4083578586578369
   107     7.610870e+00     3.447823e-02
 * time: 0.411513090133667
   108     7.610586e+00     2.380779e-02
 * time: 0.4148590564727783
   109     7.610354e+00     1.604283e-02
 * time: 0.4182589054107666
   110     7.610179e+00     2.954325e-02
 * time: 0.4208219051361084
   111     7.609994e+00     2.836942e-02
 * time: 0.423551082611084
   112     7.609707e+00     3.280260e-02
 * time: 0.4263749122619629
   113     7.609551e+00     2.938361e-02
 * time: 0.429218053817749
   114     7.609499e+00     5.670751e-02
 * time: 0.4321138858795166
   115     7.609390e+00     5.356822e-02
 * time: 0.43501996994018555
   116     7.609069e+00     6.140819e-02
 * time: 0.43799400329589844
   117     7.608452e+00     3.059866e-02
 * time: 0.44161105155944824
   118     7.608039e+00     4.174294e-02
 * time: 0.44414806365966797
   119     7.608010e+00     5.065873e-02
 * time: 0.4467949867248535
   120     7.607890e+00     3.976398e-02
 * time: 0.4495210647583008
   121     7.607477e+00     3.737014e-02
 * time: 0.4522089958190918
   122     7.607349e+00     5.343386e-02
 * time: 0.4548349380493164
   123     7.606988e+00     5.275236e-02
 * time: 0.45735788345336914
   124     7.606985e+00     6.752284e-02
 * time: 0.4599778652191162
   125     7.606702e+00     6.529163e-02
 * time: 0.46324992179870605
   126     7.606354e+00     3.788633e-02
 * time: 0.4666469097137451
   127     7.606143e+00     3.974327e-02
 * time: 0.48087000846862793
   128     7.606039e+00     4.722561e-02
 * time: 0.4834408760070801
   129     7.605736e+00     4.394593e-02
 * time: 0.48592400550842285
   130     7.605403e+00     3.369078e-02
 * time: 0.4891970157623291
   131     7.605211e+00     1.990565e-02
 * time: 0.4925079345703125
   132     7.605016e+00     2.552495e-02
 * time: 0.49509286880493164
   133     7.604825e+00     3.091710e-02
 * time: 0.49860191345214844
   134     7.604743e+00     3.957199e-02
 * time: 0.5011980533599854
   135     7.604613e+00     2.444005e-02
 * time: 0.5041649341583252
   136     7.604571e+00     4.185735e-02
 * time: 0.5067319869995117
   137     7.604414e+00     4.031241e-02
 * time: 0.5092198848724365
   138     7.604352e+00     4.443359e-02
 * time: 0.5117340087890625
   139     7.604118e+00     3.322841e-02
 * time: 0.515143871307373
   140     7.603884e+00     3.926253e-02
 * time: 0.5178439617156982
   141     7.603753e+00     4.465385e-02
 * time: 0.5204100608825684
   142     7.603644e+00     4.676564e-02
 * time: 0.522974967956543
   143     7.603606e+00     3.177344e-02
 * time: 0.5255379676818848
   144     7.603503e+00     3.557479e-02
 * time: 0.5282430648803711
   145     7.603356e+00     3.606652e-02
 * time: 0.5309679508209229
   146     7.603291e+00     4.589027e-02
 * time: 0.5334959030151367
   147     7.603101e+00     3.482555e-02
 * time: 0.5369060039520264
   148     7.603052e+00     4.365922e-02
 * time: 0.5397450923919678
   149     7.603047e+00     3.430691e-02
 * time: 0.5425539016723633
   150     7.602956e+00     4.213008e-02
 * time: 0.5454549789428711
   151     7.602784e+00     3.915344e-02
 * time: 0.5484879016876221
   152     7.602743e+00     4.001797e-02
 * time: 0.5513160228729248
   153     7.602743e+00     4.687891e-02
 * time: 0.5541350841522217
   154     7.602557e+00     4.547882e-02
 * time: 0.5567560195922852
   155     7.602279e+00     3.396413e-02
 * time: 0.5602278709411621
   156     7.602109e+00     3.248041e-02
 * time: 0.5634810924530029
   157     7.602092e+00     4.080319e-02
 * time: 0.5661098957061768
   158     7.601970e+00     4.022943e-02
 * time: 0.5687210559844971
   159     7.601800e+00     2.665659e-02
 * time: 0.5719518661499023
   160     7.601629e+00     1.801336e-02
 * time: 0.5752999782562256
   161     7.601494e+00     1.599225e-02
 * time: 0.5786359310150146
   162     7.601395e+00     2.672951e-02
 * time: 0.5812010765075684
   163     7.601362e+00     3.308913e-02
 * time: 0.5838329792022705
   164     7.601237e+00     2.375233e-02
 * time: 0.598167896270752
   165     7.601188e+00     2.970944e-02
 * time: 0.6006879806518555
   166     7.601140e+00     3.254955e-02
 * time: 0.6031169891357422
   167     7.601050e+00     3.888108e-02
 * time: 0.6056129932403564
   168     7.600999e+00     3.323982e-02
 * time: 0.6083159446716309
   169     7.600968e+00     3.611600e-02
 * time: 0.6109418869018555
   170     7.600877e+00     2.558207e-02
 * time: 0.6142258644104004
   171     7.600711e+00     2.935918e-02
 * time: 0.6168379783630371
   172     7.600607e+00     3.342859e-02
 * time: 0.62003493309021
   173     7.600483e+00     1.947477e-02
 * time: 0.6233119964599609
   174     7.600419e+00     2.882836e-02
 * time: 0.6258370876312256
   175     7.600346e+00     2.215383e-02
 * time: 0.6290979385375977
   176     7.600259e+00     2.181243e-02
 * time: 0.6316790580749512
   177     7.600184e+00     1.990610e-02
 * time: 0.6349718570709229
   178     7.600165e+00     2.536770e-02
 * time: 0.6374199390411377
   179     7.600132e+00     2.400257e-02
 * time: 0.6399579048156738
   180     7.600070e+00     2.947572e-02
 * time: 0.6425268650054932
   181     7.600007e+00     1.895615e-02
 * time: 0.6458480358123779
   182     7.599945e+00     2.288032e-02
 * time: 0.6484730243682861
   183     7.599870e+00     2.139015e-02
 * time: 0.6519529819488525
   184     7.599825e+00     1.536702e-02
 * time: 0.6557290554046631
   185     7.599764e+00     1.585411e-02
 * time: 0.6586499214172363
   186     7.599713e+00     2.673557e-02
 * time: 0.6612370014190674
   187     7.599664e+00     1.362455e-02
 * time: 0.6638190746307373
   188     7.599606e+00     1.413752e-02
 * time: 0.6664400100708008
   189     7.599540e+00     1.344158e-02
 * time: 0.6689350605010986
   190     7.599490e+00     2.034987e-02
 * time: 0.6715559959411621
   191     7.599411e+00     1.061431e-02
 * time: 0.6748700141906738
   192     7.599382e+00     1.747391e-02
 * time: 0.6773838996887207
   193     7.599341e+00     1.150247e-02
 * time: 0.6807520389556885
   194     7.599320e+00     1.613736e-02
 * time: 0.6833529472351074
   195     7.599295e+00     1.344730e-02
 * time: 0.6866838932037354
   196     7.599256e+00     1.373432e-02
 * time: 0.6892070770263672
   197     7.599254e+00     2.004124e-02
 * time: 0.6917009353637695
   198     7.599214e+00     9.180532e-03
 * time: 0.6943280696868896
   199     7.599160e+00     1.269563e-02
 * time: 0.6969108581542969
   200     7.599142e+00     2.333147e-02
 * time: 0.7105469703674316
   201     7.599140e+00     1.453107e-02
 * time: 0.7129700183868408
   202     7.599100e+00     9.959897e-03
 * time: 0.7154159545898438
   203     7.599072e+00     2.080789e-02
 * time: 0.717972993850708
   204     7.599044e+00     1.419550e-02
 * time: 0.7205390930175781
   205     7.599020e+00     7.312579e-03
 * time: 0.7239038944244385
   206     7.599003e+00     9.727868e-03
 * time: 0.726499080657959
   207     7.598986e+00     8.120738e-03
 * time: 0.7296738624572754
   208     7.598977e+00     1.206850e-02
 * time: 0.7320840358734131
   209     7.598971e+00     8.774418e-03
 * time: 0.734483003616333
   210     7.598959e+00     8.618926e-03
 * time: 0.736907958984375
   211     7.598951e+00     1.343123e-02
 * time: 0.7394678592681885
   212     7.598950e+00     7.262747e-03
 * time: 0.7420458793640137
   213     7.598938e+00     8.706761e-03
 * time: 0.7445158958435059
   214     7.598930e+00     1.213919e-02
 * time: 0.7471120357513428
   215     7.598917e+00     7.614596e-03
 * time: 0.7504429817199707
   216     7.598907e+00     8.597830e-03
 * time: 0.7528760433197021
   217     7.598906e+00     8.504951e-03
 * time: 0.7554900646209717
   218     7.598893e+00     5.709894e-03
 * time: 0.7580668926239014
   219     7.598891e+00     1.042595e-02
 * time: 0.7605738639831543
   220     7.598885e+00     1.002559e-02
 * time: 0.7631959915161133
   221     7.598877e+00     6.454602e-03
 * time: 0.7659459114074707
   222     7.598873e+00     1.066817e-02
 * time: 0.768779993057251
   223     7.598862e+00     5.488670e-03
 * time: 0.7722969055175781
   224     7.598858e+00     8.595326e-03
 * time: 0.7749669551849365
   225     7.598857e+00     8.508869e-03
 * time: 0.7774660587310791
   226     7.598853e+00     6.631499e-03
 * time: 0.7801470756530762
   227     7.598847e+00     6.793401e-03
 * time: 0.7828259468078613
   228     7.598838e+00     4.744371e-03
 * time: 0.7861430644989014
   229     7.598838e+00     1.051275e-02
 * time: 0.7888078689575195
   230     7.598836e+00     9.985781e-03
 * time: 0.7914619445800781
   231     7.598835e+00     6.336973e-03
 * time: 0.7942049503326416
   232     7.598829e+00     6.199168e-03
 * time: 0.7967569828033447
   233     7.598829e+00     8.946008e-03
 * time: 0.7993290424346924
   234     7.598821e+00     5.621177e-03
 * time: 0.8020498752593994
   235     7.598815e+00     8.267578e-03
 * time: 0.8045849800109863
   236     7.598805e+00     5.995496e-03
 * time: 0.8078470230102539
   237     7.598803e+00     5.921721e-03
 * time: 0.8105199337005615
   238     7.598801e+00     5.259722e-03
 * time: 0.8242149353027344
   239     7.598798e+00     3.897535e-03
 * time: 0.82676100730896
   240     7.598794e+00     4.867455e-03
 * time: 0.8298649787902832
   241     7.598790e+00     2.760599e-03
 * time: 0.8331470489501953
   242     7.598789e+00     5.305676e-03
 * time: 0.8357419967651367
   243     7.598787e+00     5.123665e-03
 * time: 0.8383018970489502
   244     7.598783e+00     4.215931e-03
 * time: 0.8417649269104004
   245     7.598782e+00     4.294664e-03
 * time: 0.8441588878631592
   246     7.598780e+00     4.083520e-03
 * time: 0.8464779853820801
   247     7.598778e+00     2.810421e-03
 * time: 0.8489699363708496
   248     7.598777e+00     6.304887e-03
 * time: 0.8514959812164307
   249     7.598775e+00     4.215372e-03
 * time: 0.8546950817108154
   250     7.598773e+00     3.264186e-03
 * time: 0.8572659492492676
   251     7.598770e+00     3.024073e-03
 * time: 0.8598229885101318
   252     7.598768e+00     2.816987e-03
 * time: 0.8624088764190674
   253     7.598768e+00     3.645748e-03
 * time: 0.8647899627685547
   254     7.598766e+00     3.491364e-03
 * time: 0.8678998947143555
   255     7.598766e+00     3.563649e-03
 * time: 0.8705759048461914
   256     7.598764e+00     3.191888e-03
 * time: 0.8731420040130615
   257     7.598762e+00     2.154353e-03
 * time: 0.8764309883117676
   258     7.598761e+00     3.368218e-03
 * time: 0.8790080547332764
   259     7.598759e+00     2.406263e-03
 * time: 0.8822910785675049
   260     7.598759e+00     1.604818e-03
 * time: 0.88484787940979
   261     7.598758e+00     2.126326e-03
 * time: 0.8874509334564209
   262     7.598757e+00     1.418966e-03
 * time: 0.8900880813598633
   263     7.598756e+00     2.091988e-03
 * time: 0.8926799297332764
   264     7.598755e+00     1.550548e-03
 * time: 0.8959438800811768
   265     7.598754e+00     2.119074e-03
 * time: 0.8983969688415527
   266     7.598753e+00     1.340337e-03
 * time: 0.9015889167785645
   267     7.598753e+00     1.714938e-03
 * time: 0.9041850566864014
   268     7.598752e+00     1.741499e-03
 * time: 0.9066860675811768
   269     7.598751e+00     1.125471e-03
 * time: 0.9099009037017822
   270     7.598751e+00     1.415871e-03
 * time: 0.9124569892883301
   271     7.598751e+00     1.752010e-03
 * time: 0.9150440692901611
   272     7.598750e+00     1.269894e-03
 * time: 0.9176020622253418
   273     7.598750e+00     1.391864e-03
 * time: 0.9203500747680664
   274     7.598750e+00     1.625206e-03
 * time: 0.92330002784729
   275     7.598749e+00     9.771953e-04
 * time: 0.9372720718383789
   276     7.598749e+00     9.245142e-04
 * time: 0.9399459362030029
   277     7.598749e+00     1.608048e-03
 * time: 0.9424839019775391
   278     7.598749e+00     9.271331e-04
 * time: 0.9458909034729004
   279     7.598748e+00     8.243506e-04
 * time: 0.9493110179901123
   280     7.598748e+00     7.394737e-04
 * time: 0.9520590305328369
   281     7.598748e+00     1.241035e-03
 * time: 0.9547719955444336
   282     7.598748e+00     5.846901e-04
 * time: 0.9579079151153564
   283     7.598748e+00     8.984664e-04
 * time: 0.9605429172515869
   284     7.598748e+00     1.071956e-03
 * time: 0.9631459712982178
   285     7.598748e+00     9.774615e-04
 * time: 0.9657669067382812
   286     7.598748e+00     8.647648e-04
 * time: 0.9683048725128174
   287     7.598748e+00     7.914732e-04
 * time: 0.9709079265594482
   288     7.598748e+00     1.260840e-03
 * time: 0.97353196144104
   289     7.598747e+00     7.282224e-04
 * time: 0.9761638641357422
   290     7.598747e+00     9.338586e-04
 * time: 0.9786620140075684
   291     7.598747e+00     1.016944e-03
 * time: 0.9811539649963379
   292     7.598747e+00     8.748992e-04
 * time: 0.9845218658447266
   293     7.598747e+00     8.425502e-04
 * time: 0.9871320724487305
   294     7.598747e+00     9.674194e-04
 * time: 0.9896450042724609
   295     7.598747e+00     7.719983e-04
 * time: 0.993170976638794
   296     7.598747e+00     7.144970e-04
 * time: 0.9965989589691162
   297     7.598746e+00     8.362348e-04
 * time: 0.9998390674591064
   298     7.598746e+00     1.185933e-03
 * time: 1.0024070739746094
   299     7.598746e+00     4.505843e-04
 * time: 1.0058670043945312
   300     7.598746e+00     6.284310e-04
 * time: 1.008375883102417
   301     7.598746e+00     1.139224e-03
 * time: 1.011051893234253
   302     7.598746e+00     5.430809e-04
 * time: 1.0145230293273926
   303     7.598746e+00     6.204265e-04
 * time: 1.0171818733215332
   304     7.598745e+00     6.341721e-04
 * time: 1.0198330879211426
   305     7.598745e+00     9.909805e-04
 * time: 1.0225958824157715
   306     7.598745e+00     6.589709e-04
 * time: 1.0252668857574463
   307     7.598745e+00     5.743697e-04
 * time: 1.028864860534668
   308     7.598745e+00     3.481326e-04
 * time: 1.032459020614624
   309     7.598745e+00     6.606375e-04
 * time: 1.0350849628448486
   310     7.598745e+00     5.922004e-04
 * time: 1.0376758575439453
   311     7.598745e+00     8.657564e-04
 * time: 1.0513288974761963
   312     7.598745e+00     3.656400e-04
 * time: 1.0546319484710693
   313     7.598745e+00     4.991793e-04
 * time: 1.0569980144500732
   314     7.598745e+00     1.085616e-03
 * time: 1.0596630573272705
   315     7.598744e+00     6.882567e-04
 * time: 1.0630950927734375
   316     7.598744e+00     4.364741e-04
 * time: 1.0665478706359863
   317     7.598744e+00     6.834671e-04
 * time: 1.0691609382629395
   318     7.598744e+00     5.619275e-04
 * time: 1.0717110633850098
   319     7.598744e+00     4.689890e-04
 * time: 1.0741190910339355
   320     7.598744e+00     6.520730e-04
 * time: 1.0765950679779053
   321     7.598744e+00     5.846864e-04
 * time: 1.0790410041809082
   322     7.598744e+00     6.514481e-04
 * time: 1.0815870761871338
   323     7.598744e+00     7.966480e-04
 * time: 1.0842320919036865
   324     7.598744e+00     9.645028e-04
 * time: 1.086817979812622
   325     7.598744e+00     1.187893e-03
 * time: 1.08933687210083
   326     7.598744e+00     8.628990e-04
 * time: 1.091836929321289
   327     7.598744e+00     6.989155e-04
 * time: 1.0942559242248535
   328     7.598744e+00     1.241443e-03
 * time: 1.096708059310913
   329     7.598743e+00     8.109766e-04
 * time: 1.0993878841400146
   330     7.598743e+00     1.058001e-03
 * time: 1.101928949356079
   331     7.598743e+00     7.777940e-04
 * time: 1.1052119731903076
   332     7.598743e+00     1.490580e-03
 * time: 1.1077640056610107
   333     7.598743e+00     1.372551e-03
 * time: 1.1103248596191406
   334     7.598743e+00     9.663216e-04
 * time: 1.11360502243042
   335     7.598743e+00     2.067913e-03
 * time: 1.1161820888519287
   336     7.598743e+00     1.382174e-03
 * time: 1.1187100410461426
   337     7.598743e+00     1.355350e-03
 * time: 1.1212060451507568
   338     7.598742e+00     1.065841e-03
 * time: 1.123866081237793
   339     7.598742e+00     6.884058e-04
 * time: 1.127290964126587
   340     7.598742e+00     1.619632e-03
 * time: 1.1298038959503174
   341     7.598741e+00     1.235013e-03
 * time: 1.1322400569915771
   342     7.598741e+00     1.372183e-03
 * time: 1.134855031967163
   343     7.598740e+00     1.480738e-03
 * time: 1.1381809711456299
   344     7.598740e+00     7.922811e-04
 * time: 1.1415278911590576
   345     7.598740e+00     1.109273e-03
 * time: 1.1440999507904053
   346     7.598739e+00     1.634844e-03
 * time: 1.14736008644104
   347     7.598739e+00     1.284465e-03
 * time: 1.150620937347412
   348     7.598738e+00     8.148817e-04
 * time: 1.164952039718628
   349     7.598738e+00     1.015848e-03
 * time: 1.1675050258636475
   350     7.598737e+00     9.696765e-04
 * time: 1.1700489521026611
   351     7.598737e+00     2.151137e-03
 * time: 1.1726830005645752
   352     7.598736e+00     2.127845e-03
 * time: 1.176116943359375
   353     7.598735e+00     1.962484e-03
 * time: 1.1788430213928223
   354     7.598735e+00     1.722451e-03
 * time: 1.1813850402832031
   355     7.598734e+00     2.414473e-03
 * time: 1.1839349269866943
   356     7.598732e+00     1.308094e-03
 * time: 1.1871850490570068
   357     7.598732e+00     2.012508e-03
 * time: 1.1896419525146484
   358     7.598731e+00     1.572734e-03
 * time: 1.1928009986877441
   359     7.598731e+00     2.362828e-03
 * time: 1.1953198909759521
   360     7.598730e+00     1.555552e-03
 * time: 1.1985650062561035
   361     7.598730e+00     1.210227e-03
 * time: 1.2018709182739258
   362     7.598729e+00     1.341097e-03
 * time: 1.2043650150299072
   363     7.598728e+00     1.443803e-03
 * time: 1.2068488597869873
   364     7.598728e+00     1.461290e-03
 * time: 1.2101318836212158
   365     7.598727e+00     2.125804e-03
 * time: 1.2125980854034424
   366     7.598727e+00     1.786081e-03
 * time: 1.2152190208435059
   367     7.598727e+00     2.212777e-03
 * time: 1.217923879623413
   368     7.598726e+00     2.335951e-03
 * time: 1.2204408645629883
   369     7.598725e+00     1.796072e-03
 * time: 1.223949909210205
   370     7.598725e+00     2.106744e-03
 * time: 1.2265748977661133
   371     7.598724e+00     1.891717e-03
 * time: 1.2291479110717773
   372     7.598724e+00     1.116689e-03
 * time: 1.2325348854064941
   373     7.598723e+00     1.126509e-03
 * time: 1.2350950241088867
   374     7.598723e+00     1.693062e-03
 * time: 1.2375130653381348
   375     7.598722e+00     1.079809e-03
 * time: 1.2401518821716309
   376     7.598722e+00     2.334883e-03
 * time: 1.2426989078521729
   377     7.598721e+00     2.496871e-03
 * time: 1.2452239990234375
   378     7.598721e+00     1.798170e-03
 * time: 1.2486450672149658
   379     7.598721e+00     2.125094e-03
 * time: 1.251267910003662
   380     7.598720e+00     2.300942e-03
 * time: 1.253777027130127
   381     7.598720e+00     1.340486e-03
 * time: 1.2570700645446777
   382     7.598719e+00     1.921256e-03
 * time: 1.2596189975738525
   383     7.598719e+00     1.770697e-03
 * time: 1.2629640102386475
   384     7.598718e+00     1.648357e-03
 * time: 1.276676893234253
   385     7.598718e+00     1.710479e-03
 * time: 1.2794089317321777
   386     7.598717e+00     1.295195e-03
 * time: 1.281898021697998
   387     7.598717e+00     2.053197e-03
 * time: 1.2844018936157227
   388     7.598717e+00     1.845963e-03
 * time: 1.287113904953003
   389     7.598717e+00     2.043173e-03
 * time: 1.2898099422454834
   390     7.598717e+00     2.004703e-03
 * time: 1.292443037033081
   391     7.598716e+00     1.218791e-03
 * time: 1.2960209846496582
   392     7.598716e+00     1.200520e-03
 * time: 1.2985548973083496
   393     7.598716e+00     1.619481e-03
 * time: 1.3011209964752197
   394     7.598715e+00     1.814522e-03
 * time: 1.3037219047546387
   395     7.598715e+00     1.840781e-03
 * time: 1.3063230514526367
   396     7.598715e+00     1.512576e-03
 * time: 1.3095669746398926
   397     7.598714e+00     1.369570e-03
 * time: 1.3121459484100342
   398     7.598714e+00     2.018157e-03
 * time: 1.314802885055542
   399     7.598714e+00     1.969647e-03
 * time: 1.3180720806121826
   400     7.598714e+00     1.432662e-03
 * time: 1.3211569786071777
   401     7.598714e+00     1.033744e-03
 * time: 1.3244280815124512
   402     7.598713e+00     1.518978e-03
 * time: 1.3270690441131592
   403     7.598713e+00     8.883050e-04
 * time: 1.3295540809631348
   404     7.598713e+00     7.828632e-04
 * time: 1.332015037536621
   405     7.598713e+00     1.109638e-03
 * time: 1.334618091583252
   406     7.598713e+00     1.078480e-03
 * time: 1.3371269702911377
   407     7.598712e+00     9.504984e-04
 * time: 1.339756965637207
   408     7.598712e+00     1.463131e-03
 * time: 1.3424620628356934
   409     7.598712e+00     1.761264e-03
 * time: 1.3450429439544678
   410     7.598712e+00     1.456860e-03
 * time: 1.3475348949432373
   411     7.598712e+00     9.959205e-04
 * time: 1.3499879837036133
   412     7.598711e+00     1.359802e-03
 * time: 1.3523950576782227
   413     7.598711e+00     1.193451e-03
 * time: 1.3557720184326172
   414     7.598711e+00     1.079512e-03
 * time: 1.3583970069885254
   415     7.598710e+00     6.999329e-04
 * time: 1.3617780208587646
   416     7.598710e+00     7.432825e-04
 * time: 1.364922046661377
   417     7.598710e+00     1.177075e-03
 * time: 1.3674659729003906
   418     7.598710e+00     1.057152e-03
 * time: 1.3700590133666992
   419     7.598710e+00     1.210379e-03
 * time: 1.3726139068603516
   420     7.598710e+00     1.927788e-03
 * time: 1.375230073928833
   421     7.598709e+00     1.037748e-03
 * time: 1.388890027999878
   422     7.598709e+00     1.018303e-03
 * time: 1.3913800716400146
   423     7.598709e+00     1.630644e-03
 * time: 1.393887996673584
   424     7.598708e+00     8.079531e-04
 * time: 1.396346092224121
   425     7.598708e+00     1.498479e-03
 * time: 1.3989980220794678
   426     7.598708e+00     1.051829e-03
 * time: 1.4016010761260986
   427     7.598708e+00     1.064162e-03
 * time: 1.4050180912017822
   428     7.598707e+00     5.613624e-04
 * time: 1.408318042755127
   429     7.598707e+00     1.114029e-03
 * time: 1.4107279777526855
   430     7.598707e+00     1.122863e-03
 * time: 1.4139649868011475
   431     7.598707e+00     7.510833e-04
 * time: 1.4171960353851318
   432     7.598707e+00     1.132593e-03
 * time: 1.4197990894317627
   433     7.598707e+00     8.869230e-04
 * time: 1.4224460124969482
   434     7.598706e+00     1.090175e-03
 * time: 1.4249439239501953
   435     7.598706e+00     1.333141e-03
 * time: 1.4274768829345703
   436     7.598706e+00     1.673329e-03
 * time: 1.4299569129943848
   437     7.598705e+00     1.312149e-03
 * time: 1.4322819709777832
   438     7.598705e+00     1.247996e-03
 * time: 1.434865951538086
   439     7.598704e+00     1.461182e-03
 * time: 1.4374949932098389
   440     7.598704e+00     2.145212e-03
 * time: 1.4400129318237305
   441     7.598704e+00     1.610532e-03
 * time: 1.4425690174102783
   442     7.598703e+00     1.655735e-03
 * time: 1.4451510906219482
   443     7.598703e+00     8.236988e-04
 * time: 1.4484589099884033
   444     7.598703e+00     1.097319e-03
 * time: 1.451106071472168
   445     7.598702e+00     1.120299e-03
 * time: 1.453618049621582
   446     7.598702e+00     2.127626e-03
 * time: 1.4561729431152344
   447     7.598701e+00     1.256368e-03
 * time: 1.4595210552215576
   448     7.598701e+00     1.586266e-03
 * time: 1.4621639251708984
   449     7.598701e+00     1.171328e-03
 * time: 1.4645719528198242
   450     7.598700e+00     1.000104e-03
 * time: 1.4679830074310303
   451     7.598700e+00     1.681408e-03
 * time: 1.4706590175628662
   452     7.598699e+00     7.970621e-04
 * time: 1.4739720821380615
   453     7.598699e+00     1.275742e-03
 * time: 1.476572036743164
   454     7.598699e+00     1.164896e-03
 * time: 1.4791200160980225
   455     7.598699e+00     1.056112e-03
 * time: 1.4817168712615967
   456     7.598699e+00     1.225182e-03
 * time: 1.4841880798339844
   457     7.598698e+00     9.687209e-04
 * time: 1.4868640899658203
   458     7.598698e+00     1.379886e-03
 * time: 1.4894030094146729
   459     7.598698e+00     1.059415e-03
 * time: 1.5039749145507812
   460     7.598698e+00     9.644985e-04
 * time: 1.5064949989318848
   461     7.598698e+00     9.924583e-04
 * time: 1.5090160369873047
   462     7.598698e+00     1.221835e-03
 * time: 1.5116510391235352
   463     7.598697e+00     1.030069e-03
 * time: 1.5151350498199463
   464     7.598697e+00     9.556521e-04
 * time: 1.518568992614746
   465     7.598697e+00     1.073495e-03
 * time: 1.5212039947509766
   466     7.598697e+00     8.974459e-04
 * time: 1.5236740112304688
   467     7.598697e+00     1.117969e-03
 * time: 1.5262339115142822
   468     7.598697e+00     7.660088e-04
 * time: 1.5294280052185059
   469     7.598697e+00     6.449770e-04
 * time: 1.5325469970703125
   470     7.598697e+00     7.961338e-04
 * time: 1.5350818634033203
   471     7.598696e+00     4.819184e-04
 * time: 1.5383589267730713
   472     7.598696e+00     6.618950e-04
 * time: 1.5408239364624023
   473     7.598696e+00     3.646368e-04
 * time: 1.5440330505371094
   474     7.598696e+00     4.473584e-04
 * time: 1.5465989112854004
   475     7.598696e+00     4.536318e-04
 * time: 1.5491559505462646
   476     7.598696e+00     2.937106e-04
 * time: 1.552588939666748
   477     7.598696e+00     4.812923e-04
 * time: 1.5550730228424072
   478     7.598696e+00     3.910846e-04
 * time: 1.5576469898223877
   479     7.598696e+00     2.895100e-04
 * time: 1.5603480339050293
   480     7.598696e+00     4.244862e-04
 * time: 1.5629429817199707
   481     7.598696e+00     3.247668e-04
 * time: 1.5663199424743652
   482     7.598696e+00     4.749077e-04
 * time: 1.5689020156860352
   483     7.598696e+00     5.136351e-04
 * time: 1.5715899467468262
   484     7.598696e+00     4.457725e-04
 * time: 1.5740680694580078
   485     7.598696e+00     3.723342e-04
 * time: 1.5766708850860596
   486     7.598696e+00     4.421459e-04
 * time: 1.5792889595031738
   487     7.598696e+00     4.672057e-04
 * time: 1.5818700790405273
   488     7.598696e+00     3.976771e-04
 * time: 1.585071086883545
   489     7.598696e+00     5.107693e-04
 * time: 1.5877010822296143
   490     7.598696e+00     3.612417e-04
 * time: 1.5902979373931885
   491     7.598696e+00     3.263941e-04
 * time: 1.5929129123687744
   492     7.598695e+00     2.954836e-04
 * time: 1.5955898761749268
   493     7.598695e+00     7.267107e-04
 * time: 1.59812593460083
   494     7.598695e+00     5.574936e-04
 * time: 1.601289987564087
   495     7.598695e+00     4.330699e-04
 * time: 1.6156630516052246
   496     7.598695e+00     5.067217e-04
 * time: 1.6181690692901611
   497     7.598695e+00     4.105999e-04
 * time: 1.621363878250122
   498     7.598695e+00     3.730224e-04
 * time: 1.6239919662475586
   499     7.598695e+00     4.607041e-04
 * time: 1.6265959739685059
   500     7.598695e+00     2.407253e-04
 * time: 1.6300299167633057
   501     7.598695e+00     3.143096e-04
 * time: 1.6326050758361816
   502     7.598695e+00     3.312177e-04
 * time: 1.6351540088653564
   503     7.598695e+00     2.787718e-04
 * time: 1.6376590728759766
   504     7.598695e+00     2.692429e-04
 * time: 1.6402010917663574
   505     7.598695e+00     1.590663e-04
 * time: 1.642793893814087
   506     7.598695e+00     1.988629e-04
 * time: 1.6451928615570068
   507     7.598695e+00     1.082668e-04
 * time: 1.6485860347747803
Out[5]: