Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
kwant
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
134
Issues
134
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
kwant
Commits
3530ee76
Commit
3530ee76
authored
Apr 02, 2019
by
Christoph Groth
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify whatsnew code snippet
parent
02edf61d
Pipeline
#16809
passed with stages
in 43 minutes and 57 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
doc/source/pre/whatsnew/1.4.rst
doc/source/pre/whatsnew/1.4.rst
+3
-7
No files found.
doc/source/pre/whatsnew/1.4.rst
View file @
3530ee76
...
...
@@ -35,12 +35,12 @@ ensure that the chosen gauge is consistent across the whole system
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, peierls):
return -t * peierls(a, b)
def B_syst(pos):
return np.exp(-np.sum(pos * pos))
syst = make_system(hopping)
lead = make_lead(hopping).substituted(peierls='
peierls_lead
')
syst.attach_lead(lead)
...
...
@@ -48,11 +48,7 @@ which calculates the Peierls phases for you::
gauge = kwant.physics.magnetic_gauge(syst)
def B_syst(pos):
return np.exp(-np.sum(pos * pos))
# B_syst in scattering region, 0 in lead.
# Ensure that the fields match at the system/lead interface!
peierls_syst, peierls_lead = gauge(B_syst, 0)
params = dict(t=1, peierls=peierls_syst, peierls_lead=peierls_lead)
...
...
Christoph Groth
@cwg
mentioned in issue
#291 (closed)
·
Apr 02, 2019
mentioned in issue
#291 (closed)
mentioned in issue #291
Toggle commit list
Christoph Groth
@cwg
mentioned in issue
#292 (closed)
·
Apr 02, 2019
mentioned in issue
#292 (closed)
mentioned in issue #292
Toggle commit list
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