Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Joseph Weston
kwant
Commits
e7264b84
Commit
e7264b84
authored
6 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
add a whatsnew entry for 'magnetic_gauge'
parent
a37715b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14203
failed
6 years ago
Stage: build-env
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/source/pre/whatsnew/1.4.rst
+26
-0
26 additions, 0 deletions
doc/source/pre/whatsnew/1.4.rst
with
26 additions
and
0 deletions
doc/source/pre/whatsnew/1.4.rst
+
26
−
0
View file @
e7264b84
...
...
@@ -6,6 +6,32 @@ See also the `full list of changes up to the most recent bugfix
release of the 1.4 series
<https://gitlab.kwant-project.org/kwant/kwant/compare/v1.4.0...latest-1.4>`_.
Automatic Peierls phase calculation
-----------------------------------
When defining systems with orbital magnetic fields it is often cumbersome to
manually calculate the phases required by the Peierls substitution, and to
ensure that the chosen gauge is consistent across the whole system
(this is especially true for systems with leads that point in different
directions). This release introduces `kwant.physics.magnetic_gauge`,
which calculates the Peierls phases for you::
import numpy as np
import kwant
def hopping(a, b, t, phi):
return -t * np.exp(-1j * phi(a, b))
syst = make_system(hopping).finalized()
gauge = kwant.physics.magnetic_gauge(syst)
def B(pos):
return np.exp(-np.sum(pos * pos))
kwant.hamiltonian_submatrix(syst, params=dict(t=1, phi=gauge(B))
Note that the API for this functionality is provisional, and may be
revised in a future version of Kwant.
Value functions may no longer have default values for parameters
----------------------------------------------------------------
Using value functions with default values for parameters can be
...
...
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