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
787e75fe
Commit
787e75fe
authored
11 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
clean-up docs after introduction of neighbors()
parent
30c3d08a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/source/tutorial/tutorial1.rst
+0
-21
0 additions, 21 deletions
doc/source/tutorial/tutorial1.rst
doc/source/whatsnew/0.3.rst
+20
-16
20 additions, 16 deletions
doc/source/whatsnew/0.3.rst
with
20 additions
and
37 deletions
doc/source/tutorial/tutorial1.rst
+
0
−
21
View file @
787e75fe
...
...
@@ -373,27 +373,6 @@ The result of the example should be identical to the previous one.
.. specialnote:: Technical details
- In
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_nooi
:end-before: #HIDDEN_END_nooi
we write ``*hopping`` instead of ``hopping``. The reason is as follows:
`~kwant.builder.HoppingKind` expects the hopping to
be defined using three parameters (in particular, a tuple
containing a relative lattice vector, and two (sub)lattice objects that
indicate the start and end lattice, more about that in
a :ref:`later tutorial <tutorial_spinorbit>`). ``lat.nearest``
is a list of tuples, with every tuple containing the three
parameters expected by `~kwant.builder.HoppingKind`.
Hence, ``hopping`` is a tuple. But passing it to
`~kwant.builder.HoppingKind` would fail,
as three parameters are expected (not a single tuple). ``*hopping``
unpacks the tuple into these three separate parameters (see
<http://docs.python.org/tutorial/controlflow.html#unpacking-argument-lists>)
- We have seen different ways to add lattice points to a
`~kwant.builder.Builder`. It allows to
...
...
This diff is collapsed.
Click to expand it.
doc/source/whatsnew/0.3.rst
+
20
−
16
View file @
787e75fe
...
...
@@ -4,6 +4,25 @@ What's New in kwant 0.3
This article explains the user-visible changes in kwant 0.3.
Lattice and shape improvements
------------------------------
Lattices now have a method `~kwant.lattice.Polyatomic.neighbors`,
which calculates all the n-th shortest possible hoppings on this lattice. This
replaces the ``nearest`` attribute that some lattices used to have.
`~kwant.lattice.Polyatomic.shape` uses an improved flood-fill algorithm, making
it work better on narrow ribbons (which were sometimes buggy before with
non-square lattices). Additionally, it was made symmetry-aware: If
`~kwant.lattice.Polyatomic.shape` is used with a lead, the shape does not have
to be limited along the lead direction anymore. In fact, if the shape function
does not have the same symmetry as the lead, the result may be unexpected, so
it is highly recommended to use shape functions that have the same symmetry as
the lead.
`~kwant.lattice.Monoatomic.closest` now returns an exact, and not approximate
closest point. A new method `~kwant.lattice.Monoatomic.n_closest` was added,
which returns the n closest lattice points.
``possible_hoppings`` replaced by `~kwant.builder.HoppingKind`
--------------------------------------------------------------
The `~kwant.builder.Builder` method ``possible_hoppings`` has been rendered
...
...
@@ -22,7 +41,7 @@ keys in addition to `~kwant.builder.Site` objects and tuples of them
when given a builder instance as the sole argument. The use of such keys is to
implement sets of sites or hoppings that depend on what is already present in
the builder, such as `~kwant.builder.HoppingKind`. In the above example,
``lat.ne
arest
`` is a list of ``HoppingKind`` objects.
``lat.ne
ighbors()
`` is a list of ``HoppingKind`` objects.
Some renames
------------
...
...
@@ -119,18 +138,3 @@ collection could be a dictionary, or a class instance, for example::
Arguments can be passed in an equivalent way to
`~kwant.solvers.default.wave_function`,
`~kwant.system.System.hamiltonian_submatrix`, etc.
Lattice and shape improvements
------------------------------
`~kwant.lattice.Monoatomic.closest` now returns an exact, and not approximately
closest point. A new method `~kwant.lattice.Monoatomic.n_closest` was added,
which returns n closest lattice points.
Likewise `~kwant.lattice.Polyatomic.shape` has acquired an improved flood-fill
algorithm, making it work better on narrow ribbon (which were sometimes buggy
before with non-square lattices). Additionally, it was made symmetry-aware, so
if a shape is used for a lead, no conditions with regard to coordnate parallel
to the lead period are required.
Finally, lattices now have a method `~kwant.lattice.Polyatomic.neighbors`,
which calculates all the n-th shortest possible hoppings on this lattice.
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