symmray.sparse.sparse_abelian_array =================================== .. py:module:: symmray.sparse.sparse_abelian_array .. autoapi-nested-parse:: Abelian symmetric arrays with block sparse backend. Classes ------- .. autoapisummary:: symmray.sparse.sparse_abelian_array.AbelianArray symmray.sparse.sparse_abelian_array.Z2Array symmray.sparse.sparse_abelian_array.U1Array symmray.sparse.sparse_abelian_array.Z2Z2Array symmray.sparse.sparse_abelian_array.U1U1Array Module Contents --------------- .. py:class:: AbelianArray(indices, charge=None, blocks=(), symmetry=None, label=None) Bases: :py:obj:`symmray.sparse.sparse_array_common.SparseArrayCommon`, :py:obj:`symmray.sparse.sparse_data_common.BlockCommon`, :py:obj:`symmray.bosonic_common.BosonicCommon`, :py:obj:`symmray.array_common.ArrayCommon`, :py:obj:`symmray.common.SymmrayCommon` A block sparse array with symmetry constraints. :param indices: The indices of the array. :type indices: tuple[BlockIndex] :param charge: The total charge of the array, if not given it will be inferred from either the first sector or set to the identity charge, if no sectors are given. :type charge: hashable, optionals :param blocks: A mapping of each 'sector' (tuple of charges) to the data array. :type blocks: dict[tuple[hashable], array_like] :param symmetry: The symmetry of the array, if not using a specific symmetry class. :type symmetry: str or Symmetry, optional .. py:attribute:: __slots__ :value: ('_blocks', '_charge', '_indices', '_label', '_symmetry') .. py:attribute:: fermionic :value: False .. py:attribute:: static_symmetry :value: None .. py:method:: new_with(indices, charge, blocks, label=None) -> AbelianArray Create a new block sparse abelian array of the same class as this one. Unlike `copy`, this does not copy over any existing data and drops for example `label`. .. py:method:: copy() Copy this abelian block sparse array. .. py:method:: copy_with(indices=None, charge=None, blocks=None) A copy of this block array with some attributes replaced. Note that checks are not performed on the new properties, this is intended for internal use. .. py:method:: modify(indices=None, charge=None, blocks=None) Modify this block array in place with some attributes replaced. Note that checks are not performed on the new properties, this is intended for internal use. .. py:method:: from_pytree(pytree) :classmethod: Create a sparse abelian array from a pytree purely of non-symmray containers and objects. .. py:method:: _map_blocks(fn_block=None, fn_sector=None, fn_filter=None) Map the blocks and their keys (sectors) of the array inplace. .. py:method:: solve(b: AbelianArray, **kwargs) -> AbelianArray Solve the linear system `A @ x == b` for x, where A is this array. :param b: The right-hand side array. :type b: AbelianArray :returns: **x** -- The solution array. :rtype: AbelianArray .. py:class:: Z2Array(indices, charge=None, blocks=(), symmetry=None, label=None) Bases: :py:obj:`AbelianArray` A block array with Z2 symmetry. .. py:attribute:: static_symmetry .. py:method:: to_pyblock3(flat=False) .. py:class:: U1Array(indices, charge=None, blocks=(), symmetry=None, label=None) Bases: :py:obj:`AbelianArray` A block array with U1 symmetry. .. py:attribute:: static_symmetry .. py:method:: to_pyblock3(flat=False) .. py:method:: to_yastn(**config_opts) .. py:class:: Z2Z2Array(indices, charge=None, blocks=(), symmetry=None, label=None) Bases: :py:obj:`AbelianArray` A block array with Z2 x Z2 symmetry. .. py:attribute:: static_symmetry .. py:class:: U1U1Array(indices, charge=None, blocks=(), symmetry=None, label=None) Bases: :py:obj:`AbelianArray` A block array with U1 x U1 symmetry. .. py:attribute:: static_symmetry