Verified Commit 2754a59e authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

docstring fix

parent 5de7f129
...@@ -110,7 +110,7 @@ class SiteArray(collections.abc.Sequence): ...@@ -110,7 +110,7 @@ class SiteArray(collections.abc.Sequence):
Raises Raises
------ ------
ValueError ValueError
If `tags` are not proper tags for `family`. If ``tags`` are not proper tags for ``family``.
See Also See Also
-------- --------
...@@ -557,23 +557,23 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta): ...@@ -557,23 +557,23 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta):
the site array, and the offset of the first orbital of the first the site array, and the offset of the first orbital of the first
site in the site array. In addition, the final row has the form site in the site array. In addition, the final row has the form
``(len(graph.num_nodes), 0, tot_norbs)`` where ``tot_norbs`` is the ``(len(graph.num_nodes), 0, tot_norbs)`` where ``tot_norbs`` is the
total number of orbitals in the system. Note 'site_ranges' total number of orbitals in the system. Note ``site_ranges``
is directly computable from 'site_arrays'. is directly computable from ``site_arrays``.
graph : kwant.graph.CGraph graph : kwant.graph.CGraph
The system graph. The system graph.
subgraphs : sequence of tuples subgraphs : sequence of tuples
Each subgraph has the form '((idx1, idx2), (offsets1, offsets2))' Each subgraph has the form ``((idx1, idx2), (offsets1, offsets2))``
where 'offsets1' and 'offsets2' index sites within the site arrays where ``offsets1`` and ``offsets2`` index sites within the site arrays
indexed by 'idx1' and 'idx2'. indexed by ``idx1`` and ``idx2``.
terms : sequence of tuples terms : sequence of tuples
Each tuple has the following structure: Each tuple has the following structure:
(subgraph: int, symmetry_element: tuple, hermitian: bool, (subgraph: int, symmetry_element: tuple, hermitian: bool,
parameters: List(str)) parameters: List(str))
'subgraph' indexes 'subgraphs' and supplies the to/from sites of this ``subgraph`` indexes ``subgraphs`` and supplies the to/from sites of this
term. 'symmetry_element' is the symmetry group element that should be term. ``symmetry_element`` is the symmetry group element that should be
applied to the 'to-sites' of this term. applied to the to-sites of this term.
'hermitian' is 'True' if the term needs its Hermitian ``hermitian`` is ``True`` if the term needs its Hermitian
conjugate to be added when evaluating the Hamiltonian, and 'parameters' conjugate to be added when evaluating the Hamiltonian, and ``parameters``
contains a list of parameter names used when evaluating this term. contains a list of parameter names used when evaluating this term.
parameters : frozenset of strings parameters : frozenset of strings
The names of the parameters on which the system depends. This attribute The names of the parameters on which the system depends. This attribute
...@@ -588,6 +588,7 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta): ...@@ -588,6 +588,7 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta):
``pos`` which is assumed to return the real-space position of a site ``pos`` which is assumed to return the real-space position of a site
given its index. given its index.
""" """
@abc.abstractmethod @abc.abstractmethod
def hamiltonian_term(self, index, selector=slice(None), def hamiltonian_term(self, index, selector=slice(None),
args=(), params=None): args=(), params=None):
...@@ -615,6 +616,7 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta): ...@@ -615,6 +616,7 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta):
Providing positional arguments via 'args' is deprecated, Providing positional arguments via 'args' is deprecated,
instead, provide named parameters as a dictionary via 'params'. instead, provide named parameters as a dictionary via 'params'.
""" """
@property @property
@lru_cache(1) @lru_cache(1)
def site_ranges(self): def site_ranges(self):
......
[pytest] [pytest]
testpaths = kwant testpaths = kwant
junit_family = xunit2
flakes-ignore = flakes-ignore =
__init__.py UnusedImport ImportStarUsed ImportStarUsage __init__.py UnusedImport ImportStarUsed ImportStarUsage
kwant/_plotter.py UnusedImport kwant/_plotter.py UnusedImport
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment