Browse code

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.

Joseph Weston authored on 22/11/2019 11:02:03
Showing 1 changed files
... ...
@@ -376,16 +376,16 @@ class VectorizedSystem(System, metaclass=abc.ABCMeta):
376 376
         conjugate to be added when evaluating the Hamiltonian, and 'parameters'
377 377
         contains a list of parameter names used when evaluating this term.
378 378
     site_arrays : sequence of SiteArray
379
-        The sites of the system.
380
-    site_ranges : None or Nx3 integer array
379
+        The sites of the system. The family of each site array must have
380
+        ``norbs`` specified.
381
+    site_ranges : Nx3 integer array
381 382
         Has 1 row per site array, plus one extra row.  Each row consists
382 383
         of ``(first_site, norbs, orb_offset)``: the index of the first
383 384
         site in the site array, the number of orbitals on each site in
384 385
         the site array, and the offset of the first orbital of the first
385 386
         site in the site array.  In addition, the final row has the form
386 387
         ``(len(graph.num_nodes), 0, tot_norbs)`` where ``tot_norbs`` is the
387
-        total number of orbitals in the system.  ``None`` if any site array
388
-        in 'site_arrays' does not have 'norbs' specified. Note 'site_ranges'
388
+        total number of orbitals in the system. Note 'site_ranges'
389 389
         is directly computable from 'site_arrays'.
390 390
     parameters : frozenset of strings
391 391
         The names of the parameters on which the system depends. This attribute