Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
kwant
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
92
Issues
92
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
kwant
Commits
794dd08c
Commit
794dd08c
authored
Dec 20, 2018
by
Kloss
Committed by
Joseph Weston
Jan 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove explicit sorting of the energies
np.linalg.eigvalsh returns eigenvalues already in ascending order
parent
5486af00
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
dispersion.py
kwant/physics/dispersion.py
+3
-2
No files found.
kwant/physics/dispersion.py
View file @
794dd08c
...
...
@@ -117,11 +117,12 @@ class Bands:
h0
=
mat
+
mat
.
conjugate
()
.
transpose
()
+
self
.
ham
# compute energies and if required eigenvectors
# numpy routines eigh and eigvalsh return eigenvalues in ascending order
if
return_eigenvectors
or
derivative_order
>
0
:
energies
,
eigenvectors
=
np
.
linalg
.
eigh
(
h0
)
else
:
energies
=
np
.
sort
(
np
.
linalg
.
eigvalsh
(
h0
)
.
real
)
output
=
(
energies
,)
energies
=
np
.
linalg
.
eigvalsh
(
h0
)
output
=
(
energies
.
real
,)
if
derivative_order
>=
1
:
# compute velocities
h1
=
1j
*
(
-
mat
+
mat
.
conjugate
()
.
transpose
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment