block.block

Block definition and operator operations.

class block.block.Block(*args, **kwargs)

Bases: object

add_additional_ops(self: block.block.Block) → None
add_all_comp_ops(self: block.block.Block) → None
bra_state_info
clear(self: block.block.Block) → None
deallocate(self: block.block.Block) → None
diagonal_h(self: block.block.Block, arg0: block.DiagonalMatrix) → None
ket_state_info
left_block

If this is a sum block, return left sub-block for building it.

loop_block

Whether the block is loop block.

move_and_free_memory(self: block.block.Block, arg0: block.block.Block) → None

If the parameter system is allocated before this object, but we need to free system. Then we have to move the memory of this to system then clear system.

multiply_overlap(self: block.block.Block, c: block.operator.Wavefunction, v: block.operator.Wavefunction, num_threads: int = 1) → None
name

A random integer.

ops

Map from operator types to matrix representation of operators.

print_operator_summary(self: block.block.Block) → None

Print operator summary when block.io.Input.output_level at least = 2.

remove_additional_ops(self: block.block.Block) → None
renormalize_from(self: block.block.Block, energies: block.VectorDouble, spins: block.VectorDouble, error: float, rotate_matrix: block.VectorMatrix, kept_states: int, kept_qstates: int, tol: float, big: block.block.Block, guess_wave_type: block.block.GuessWaveTypes, noise: float, additional_noise: float, one_dot: bool, system: block.block.Block, system_dot: block.block.Block, environment: block.block.Block, dot_with_sys: bool, warm_up: bool, sweep_iter: int, current_root: int, lower_states: block.operator.VectorWavefunction) → float
restore(self: block.block.Block, forward: bool, sites: block.VectorInt, left: int, right: int) → None

Read a Block from disk.

Args:
forward : bool
The direction of sweep.
sites : block.VectorInt
List of indices of sites contained in the block. left : int Bra state (-1 for normal case).
right : int
Ket state (-1 for normal case).
right_block

If this is a sum block, return right sub-block for building it.

sites

List of indices of sites contained in the block.

store(self: block.block.Block, forward: bool, sites: block.VectorInt, left: int, right: int) → None

Store a Block into disk.

Args:
forward : bool
The direction of sweep.
sites : block.VectorInt
List of indices of sites contained in the block. This is kind of redundant and can be obtained from Block.sites.
left : int
Bra state (-1 for normal case).
right : int
Ket state (-1 for normal case).
transform_operators(self: block.block.Block, arg0: block.VectorMatrix) → None
transform_operators_2(self: block.block.Block, left_rotate_matrix: block.VectorMatrix, right_rotate_matrix: block.VectorMatrix, clear_right_block: bool = True, clear_left_block: bool = True) → None
class block.block.GuessWaveTypes

Bases: enum.Enum

Types of guess wavefunction for initialize Davidson algorithm (enumerator).

Members:

Basic

Transform

Transpose

Basic = 1
Transform = 2
Transpose = 3
class block.block.MapOperators(*args, **kwargs)

Bases: object

items(self: block.block.MapOperators) → iterator
class block.block.StorageTypes

Bases: enum.Enum

Types of storage (enumerator).

Members:

LocalStorage

DistributedStorage

DistributedStorage = 2
LocalStorage = 1
class block.block.VectorBlock(*args, **kwargs)

Bases: object

append(self: block.block.VectorBlock, x: block.block.Block) → None

Add an item to the end of the list

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: block.block.VectorBlock, L: block.block.VectorBlock) -> None

Extend the list by appending all the items in the given list

  1. extend(self: block.block.VectorBlock, L: iterable) -> None

Extend the list by appending all the items in the given list

insert(self: block.block.VectorBlock, i: int, x: block.block.Block) → None

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: block.block.VectorBlock) -> block.block.Block

Remove and return the last item

  1. pop(self: block.block.VectorBlock, i: int) -> block.block.Block

Remove and return the item at index i

block.block.init_big_block(left_block: block.block.Block, right_block: block.block.Block, big_block: block.block.Block, bra_quanta: block.symmetry.VectorSpinQuantum = VectorSpinQuantum[], ket_quanta: block.symmetry.VectorSpinQuantum = VectorSpinQuantum[]) → None

Initialize big (super) block.

block.block.init_new_environment_block(environment: block.block.Block, environment_dot: block.block.Block, new_environment: block.block.Block, system: block.block.Block, system_dot: block.block.Block, left_state: int, right_state: int, sys_add: int, env_add: int, forward: bool, direct: bool, one_dot: bool, use_slater: bool, integral_index: int, have_norm_ops: bool, have_comp_ops: bool, dot_with_sys: bool) → None

Initialize new environment block

block.block.init_new_system_block(system: block.block.Block, system_dot: block.block.Block, new_system: block.block.Block, left_state: int, right_state: int, sys_add: int, direct: bool, integral_index: int, storage: block.block.StorageTypes, have_norm_ops: bool, have_comp_ops: bool) → None

Initialize new system block

block.block.init_starting_block(starting_block: block.block.Block, forward: bool, left_state: int, right_state: int, forward_starting_size: int, backward_starting_size: int, restart_size: int, restart: bool, warm_up: bool, integral_index: int, bra_quanta: block.symmetry.VectorSpinQuantum = VectorSpinQuantum[], ket_quanta: block.symmetry.VectorSpinQuantum = VectorSpinQuantum[]) → None

Initialize starting block