ContractedOperator

Provides support for terms that look like pGp or p(dG/dQ)Qp by expanding them out as the pure operator component that depends on the basis states (i.e. pp or pQp) and doing the appropriate tensor contractions with the expansion coefficients (i.e. G or dG/dQ)

 

__init__(self, coeffs, funcs, quanta, prod_dim=None, axes=None, symmetries=None, selection_rules=None, selection_rule_steps=None, zero_threshold=1e-14, skipped_indices=None, skipped_coefficient_threshold=None, chunk_size=None, parallelizer=None, logger=None): 
  • coeffs: np.ndarray | int

    The tensor of coefficients contract with the operator representation (0 means no term)

  • funcs: callable | Iterable[callable]

    The functions use to calculate representation

  • quanta: int | Iterable[int]

    The number of quanta to do the deepest-level calculations up to

  • axes: Iterable[int] | None

    The axes to use when doing the contractions

  • symmetries: Iterable[int] | None

    The symmetries to pass through to Operator

  • prod_dim: Any
  • selection_rules: Any
  • parallelizer: Any
  • logger: Any
  • zero_threshold: Any
  • chunk_size: int | None

    number of elements that can be evaluated at once (for memory reasons)

 

@property
is_zero(self): 

 

get_elements(self, idx, parallelizer=None, check_orthogonality=True, memory_constrained=False): 

Computes the operator values over the specified indices

  • idx: Iterable[int]

    which elements of H0 to compute

  • :returns: _

 

apply_reduced(self, base_space, parallelizer=None, logger=None): 

 

__repr__(self): 

Feedback

Examples

Templates

Documentation