Skip to content
Snippets Groups Projects
Commit fe3f149e authored by Joseph Weston's avatar Joseph Weston
Browse files

correct docstring of system.VectorizedSystem

The docstring erroneously stated that 'site_ranges' could be 'None',
however we want to restrict VectorizedSystems to contain only site
families that have 'norbs' specified. The docstring is now explicit
about that fact.
parent d4151380
No related branches found
No related tags found
No related merge requests found
...@@ -376,16 +376,16 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta): ...@@ -376,16 +376,16 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta):
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.
site_arrays : sequence of SiteArray site_arrays : sequence of SiteArray
The sites of the system. The sites of the system. The family of each site array must have
site_ranges : None or Nx3 integer array ``norbs`` specified.
site_ranges : Nx3 integer array
Has 1 row per site array, plus one extra row. Each row consists Has 1 row per site array, plus one extra row. Each row consists
of ``(first_site, norbs, orb_offset)``: the index of the first of ``(first_site, norbs, orb_offset)``: the index of the first
site in the site array, the number of orbitals on each site in site in the site array, the number of orbitals on each site in
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. ``None`` if any site array total number of orbitals in the system. Note 'site_ranges'
in 'site_arrays' does not have 'norbs' specified. Note 'site_ranges'
is directly computable from 'site_arrays'. is directly computable from 'site_arrays'.
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment