Anyonic models

We solve the almost-bosonic anyon model of https://arxiv.org/pdf/1901.10739.pdf

In [1]:
using DFTK
using StaticArrays
using Plots

# Unit cell. Having one of the lattice vectors as zero means a 2D system
a = 14
lattice = a .* [[1 0 0.]; [0 1 0]; [0 0 0]];

# Confining scalar potential
pot(x, y, z) = ((x - a/2)^2 + (y - a/2)^2);

# Parameters
Ecut = 50
n_electrons = 1
β = 5;

# Collect all the terms, build and run the model
terms = [Kinetic(; scaling_factor=2),
         ExternalFromReal(X -> pot(X...)),
         Anyonic(1, β)
]
model = Model(lattice; n_electrons, terms, spin_polarization=:spinless)  # "spinless electrons"
basis = PlaneWaveBasis(model; Ecut, kgrid=(1, 1, 1))
scfres = direct_minimization(basis, tol=1e-14)  # Reduce tol for production
E = scfres.energies.total
s = 2
E11 = π/2 * (2(s+1)/s)^((s+2)/s) * (s/(s+2))^(2(s+1)/s) * E^((s+2)/s) / β
println("e(1,1) / (2π)= ", E11 / (2π))
heatmap(scfres.ρ[:, :, 1, 1], c=:blues)
Iter     Function value   Gradient norm 
     0     8.465892e+01     1.716706e+01
 * time: 0.0030698776245117188
     1     6.564707e+01     1.018560e+01
 * time: 0.009173870086669922
     2     5.855772e+01     1.117976e+01
 * time: 0.0223538875579834
     3     4.332336e+01     1.005994e+01
 * time: 0.04030489921569824
     4     3.284038e+01     9.111023e+00
 * time: 0.05827593803405762
     5     2.865867e+01     8.092787e+00
 * time: 0.07396793365478516
     6     1.425741e+01     2.245998e+00
 * time: 0.08939886093139648
     7     1.319442e+01     4.157865e+00
 * time: 0.15542101860046387
     8     1.159360e+01     3.283415e+00
 * time: 0.16910600662231445
     9     1.061723e+01     3.256131e+00
 * time: 0.18208599090576172
    10     9.941905e+00     4.446929e+00
 * time: 0.19498491287231445
    11     8.725013e+00     2.252228e+00
 * time: 0.2078559398651123
    12     7.578585e+00     1.827392e+00
 * time: 0.22092700004577637
    13     7.007404e+00     2.221164e+00
 * time: 0.23110604286193848
    14     6.568958e+00     1.793942e+00
 * time: 0.24155402183532715
    15     6.366024e+00     1.768311e+00
 * time: 0.2521989345550537
    16     6.194181e+00     1.054662e+00
 * time: 0.2627260684967041
    17     6.146899e+00     1.848130e+00
 * time: 0.270676851272583
    18     5.984643e+00     1.201720e+00
 * time: 0.31085991859436035
    19     5.847840e+00     1.291968e+00
 * time: 0.32152891159057617
    20     5.774691e+00     1.191705e+00
 * time: 0.32973599433898926
    21     5.769751e+00     1.187114e+00
 * time: 0.337831974029541
    22     5.737326e+00     9.649648e-01
 * time: 0.3481559753417969
    23     5.732744e+00     1.169599e+00
 * time: 0.3560829162597656
    24     5.687310e+00     1.049935e+00
 * time: 0.36429500579833984
    25     5.668944e+00     7.582185e-01
 * time: 0.37228989601135254
    26     5.645227e+00     6.893850e-01
 * time: 0.38269901275634766
    27     5.628278e+00     5.089864e-01
 * time: 0.3931128978729248
    28     5.612760e+00     5.401876e-01
 * time: 0.40117788314819336
    29     5.600424e+00     4.030253e-01
 * time: 0.4115869998931885
    30     5.594951e+00     5.280318e-01
 * time: 0.4194190502166748
    31     5.594137e+00     4.196875e-01
 * time: 0.45024800300598145
    32     5.584352e+00     2.181642e-01
 * time: 0.45862388610839844
    33     5.580412e+00     3.504218e-01
 * time: 0.46901798248291016
    34     5.574590e+00     2.336442e-01
 * time: 0.4771120548248291
    35     5.571008e+00     2.342273e-01
 * time: 0.48513102531433105
    36     5.568578e+00     1.322742e-01
 * time: 0.49295902252197266
    37     5.568511e+00     2.314762e-01
 * time: 0.5009419918060303
    38     5.567572e+00     1.536611e-01
 * time: 0.5113060474395752
    39     5.567490e+00     2.450983e-01
 * time: 0.5191559791564941
    40     5.565619e+00     1.869437e-01
 * time: 0.5271279811859131
    41     5.564192e+00     1.357510e-01
 * time: 0.5350699424743652
    42     5.562722e+00     9.982441e-02
 * time: 0.5430610179901123
    43     5.562696e+00     1.114903e-01
 * time: 0.5508790016174316
    44     5.562371e+00     1.259793e-01
 * time: 0.5586450099945068
    45     5.561942e+00     7.301107e-02
 * time: 0.5819690227508545
    46     5.561517e+00     8.751699e-02
 * time: 0.5902938842773438
    47     5.561340e+00     9.421214e-02
 * time: 0.5985429286956787
    48     5.560961e+00     5.570225e-02
 * time: 0.606442928314209
    49     5.560941e+00     7.654729e-02
 * time: 0.6144099235534668
    50     5.560832e+00     5.123415e-02
 * time: 0.6247670650482178
    51     5.560830e+00     7.739870e-02
 * time: 0.6326990127563477
    52     5.560722e+00     5.386054e-02
 * time: 0.6404340267181396
    53     5.560654e+00     3.889105e-02
 * time: 0.6485168933868408
    54     5.560592e+00     4.027462e-02
 * time: 0.6562769412994385
    55     5.560574e+00     3.126074e-02
 * time: 0.6641368865966797
    56     5.560548e+00     2.557753e-02
 * time: 0.6744730472564697
    57     5.560522e+00     1.780308e-02
 * time: 0.6848578453063965
    58     5.560503e+00     2.154328e-02
 * time: 0.692755937576294
    59     5.560489e+00     1.565576e-02
 * time: 0.7159719467163086
    60     5.560476e+00     9.880145e-03
 * time: 0.7241270542144775
    61     5.560472e+00     1.277672e-02
 * time: 0.7343220710754395
    62     5.560471e+00     1.186710e-02
 * time: 0.7420790195465088
    63     5.560469e+00     6.997567e-03
 * time: 0.7525720596313477
    64     5.560468e+00     7.583083e-03
 * time: 0.7605910301208496
    65     5.560466e+00     6.826277e-03
 * time: 0.7683570384979248
    66     5.560465e+00     5.535828e-03
 * time: 0.7787759304046631
    67     5.560464e+00     4.052430e-03
 * time: 0.7864749431610107
    68     5.560464e+00     3.954774e-03
 * time: 0.7967419624328613
    69     5.560464e+00     2.129903e-03
 * time: 0.8073618412017822
    70     5.560463e+00     1.554788e-03
 * time: 0.8152399063110352
    71     5.560463e+00     2.222399e-03
 * time: 0.8229219913482666
    72     5.560463e+00     1.449457e-03
 * time: 0.8435440063476562
    73     5.560463e+00     1.239992e-03
 * time: 0.8518309593200684
    74     5.560463e+00     1.009786e-03
 * time: 0.8597838878631592
    75     5.560463e+00     1.467127e-03
 * time: 0.8677308559417725
    76     5.560463e+00     1.165432e-03
 * time: 0.8757069110870361
    77     5.560463e+00     7.346353e-04
 * time: 0.8836190700531006
    78     5.560463e+00     7.531918e-04
 * time: 0.8915729522705078
    79     5.560463e+00     1.128620e-03
 * time: 0.8994300365447998
    80     5.560463e+00     8.181891e-04
 * time: 0.9071450233459473
    81     5.560463e+00     5.714887e-04
 * time: 0.9175879955291748
    82     5.560463e+00     6.330130e-04
 * time: 0.9255180358886719
    83     5.560463e+00     5.163145e-04
 * time: 0.9334168434143066
    84     5.560463e+00     3.415747e-04
 * time: 0.9413769245147705
    85     5.560463e+00     3.076041e-04
 * time: 0.9517979621887207
    86     5.560463e+00     6.823492e-04
 * time: 0.9722809791564941
    87     5.560463e+00     4.112421e-04
 * time: 0.980604887008667
    88     5.560463e+00     3.820202e-04
 * time: 0.9887959957122803
    89     5.560463e+00     3.173862e-04
 * time: 0.9967339038848877
    90     5.560463e+00     2.687744e-04
 * time: 1.0045499801635742
    91     5.560463e+00     1.452375e-04
 * time: 1.014922857284546
    92     5.560463e+00     2.460757e-04
 * time: 1.0253448486328125
    93     5.560463e+00     1.932301e-04
 * time: 1.035735845565796
    94     5.560463e+00     1.084828e-04
 * time: 1.046151876449585
    95     5.560463e+00     9.775272e-05
 * time: 1.059061050415039
┌ Warning: Negative ρ detected
│   min_ρ = -1.9499668537205443e-18
└ @ DFTK ~/work/DFTK.jl/DFTK.jl/src/densities.jl:5
    96     5.560463e+00     9.775270e-05
 * time: 1.240494966506958
    97     5.560463e+00     9.775270e-05
 * time: 1.2812418937683105
e(1,1) / (2π)= 1.7391793934279238
Out[1]: