Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MeanFi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantum Tinkerer
MeanFi
Commits
1a3f357d
Commit
1a3f357d
authored
1 year ago
by
Kostas Vilkelis
Browse files
Options
Downloads
Patches
Plain Diff
remove from redundant args
parent
a5ddef60
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
create solvers and interface modules
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codes/hf.py
+3
-2
3 additions, 2 deletions
codes/hf.py
with
3 additions
and
2 deletions
codes/hf.py
+
3
−
2
View file @
1a3f357d
...
...
@@ -2,7 +2,7 @@ from scipy.ndimage import convolve
import
numpy
as
np
import
codes.utils
as
utils
def
density_matrix
(
vals
,
vecs
,
E_F
,
dim
):
def
density_matrix
(
vals
,
vecs
,
E_F
):
"""
Returns the mean field F_ij(k) = <psi_i(k)|psi_j(k)> for all k-points and
eigenvectors below the Fermi level.
...
...
@@ -22,6 +22,7 @@ def density_matrix(vals, vecs, E_F, dim):
Density matrix rho=rho[kx, ky, ..., i, j] where i,j are cell indices.
"""
norbs
=
vals
.
shape
[
-
1
]
dim
=
len
(
vals
.
shape
)
-
1
nk
=
vals
.
shape
[
0
]
if
dim
>
0
:
...
...
@@ -152,7 +153,7 @@ def updated_matrices(mf_k, model):
vals
,
vecs
=
np
.
linalg
.
eigh
(
hamiltonians
)
vecs
=
np
.
linalg
.
qr
(
vecs
)[
0
]
E_F
=
utils
.
get_fermi_energy
(
vals
,
model
.
filling
)
rho
=
density_matrix
(
vals
=
vals
,
vecs
=
vecs
,
E_F
=
E_F
,
dim
=
model
.
dim
)
rho
=
density_matrix
(
vals
=
vals
,
vecs
=
vecs
,
E_F
=
E_F
)
return
rho
,
compute_mf
(
rho
=
rho
,
H_int
=
model
.
H_int
)
-
E_F
*
np
.
eye
(
model
.
hamiltonians_0
.
shape
[
-
1
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment