SimiLie
Loading...
Searching...
No Matches
generate_cpp_hamiltonian Namespace Reference

Classes

class  HamiltonianDefinition
 
class  SymbolicFunctionDefinition
 

Functions

list[object] _flatten_variable_entries (list[object] entries)
 
list[object] _entry_symbols (object entry)
 
str _entry_name (object entry)
 
str _replace_symbols (str expression, dict[str, str] replacements)
 
str _render_cxx_expression (expression, dict[str, str] replacements, dict[str, SymbolicFunctionDefinition]|None symbolic_functions=None, dict[object, str]|None expression_replacements=None)
 
str _render_members (list[tuple[str, str, bool, str]] parameters)
 
str _render_constructor_signature (str struct_name, list[tuple[str, str, bool, str]] parameters)
 
str _render_constructor_initializers (list[tuple[str, str, bool, str]] parameters)
 
str _generalize_component_expression (str symbol_name, expression, dict[str, str] replacements, str component_argument_name, dict[str, SymbolicFunctionDefinition]|None symbolic_functions=None, dict[object, str]|None expression_replacements=None)
 
bool _all_same (list[str] expressions)
 
bool _has_temporal_index (list[str]|None template_parameters)
 
str _render_indexed_method (str method_name, str argument_prefix, list[str] symbols_, list expressions, dict[str, str] replacements, list[str]|None template_parameters, dict[str, SymbolicFunctionDefinition]|None symbolic_functions=None, dict[object, str]|None expression_replacements=None)
 
str _render_indexed_elem_method (str method_name, str argument_prefix, list[str] symbols_, list expressions, dict[str, str] replacements, list[str]|None template_parameters, dict[str, SymbolicFunctionDefinition]|None symbolic_functions=None, dict[object, str]|None expression_replacements=None)
 
str _render_indexed_nonlocal_value_method (str method_name, list[str] symbols_, list expressions, dict[str, str] replacements, dict[str, SymbolicFunctionDefinition]|None symbolic_functions=None)
 
str _render_moments_object_method (list[str] symbols_, list expressions, dict[str, str] replacements, dict[str, SymbolicFunctionDefinition] symbolic_functions, dict[object, str] expression_replacements, str component_expression)
 
str _render_moments_object_jacobian_method (list[str] symbols_, hamiltonian, dict[str, str] replacements, dict[str, SymbolicFunctionDefinition] symbolic_functions, dict[object, str] expression_replacements, str component_expression)
 
None write_cpp_hamiltonian_header (Path output_path, str namespace, str struct_name, list[tuple[str, str, bool, str]] parameters, hamiltonian, list[dict[str, object]] variable_entries, list[str]|None includes=None, str|None moments_computer=None, list[str]|None inverse_symbols=None, list|None inverse_expressions=None, list[str]|None template_parameters=None, dict[str, str]|None parameter_value_expressions=None, HamiltonianDefinition|None definition=None)
 
None generate_cpp_hamiltonian (functor_class, Path output_path, *args, **kwargs)
 

Function Documentation

◆ _flatten_variable_entries()

list[object] generate_cpp_hamiltonian._flatten_variable_entries ( list[object] entries)
protected

Definition at line 41 of file generate_cpp_hamiltonian.py.

◆ _entry_symbols()

list[object] generate_cpp_hamiltonian._entry_symbols ( object entry)
protected

Definition at line 51 of file generate_cpp_hamiltonian.py.

◆ _entry_name()

str generate_cpp_hamiltonian._entry_name ( object entry)
protected

Definition at line 57 of file generate_cpp_hamiltonian.py.

◆ _replace_symbols()

str generate_cpp_hamiltonian._replace_symbols ( str expression,
dict[str, str] replacements )
protected

Definition at line 66 of file generate_cpp_hamiltonian.py.

◆ _render_cxx_expression()

str generate_cpp_hamiltonian._render_cxx_expression ( expression,
dict[str, str] replacements,
dict[str, SymbolicFunctionDefinition] | None symbolic_functions = None,
dict[object, str] | None expression_replacements = None )
protected

Definition at line 74 of file generate_cpp_hamiltonian.py.

◆ _render_members()

str generate_cpp_hamiltonian._render_members ( list[tuple[str, str, bool, str]] parameters)
protected

Definition at line 134 of file generate_cpp_hamiltonian.py.

◆ _render_constructor_signature()

str generate_cpp_hamiltonian._render_constructor_signature ( str struct_name,
list[tuple[str, str, bool, str]] parameters )
protected

Definition at line 141 of file generate_cpp_hamiltonian.py.

◆ _render_constructor_initializers()

str generate_cpp_hamiltonian._render_constructor_initializers ( list[tuple[str, str, bool, str]] parameters)
protected

Definition at line 151 of file generate_cpp_hamiltonian.py.

◆ _generalize_component_expression()

str generate_cpp_hamiltonian._generalize_component_expression ( str symbol_name,
expression,
dict[str, str] replacements,
str component_argument_name,
dict[str, SymbolicFunctionDefinition] | None symbolic_functions = None,
dict[object, str] | None expression_replacements = None )
protected

Definition at line 159 of file generate_cpp_hamiltonian.py.

◆ _all_same()

bool generate_cpp_hamiltonian._all_same ( list[str] expressions)
protected

Definition at line 175 of file generate_cpp_hamiltonian.py.

◆ _has_temporal_index()

bool generate_cpp_hamiltonian._has_temporal_index ( list[str] | None template_parameters)
protected

Definition at line 179 of file generate_cpp_hamiltonian.py.

◆ _render_indexed_method()

str generate_cpp_hamiltonian._render_indexed_method ( str method_name,
str argument_prefix,
list[str] symbols_,
list expressions,
dict[str, str] replacements,
list[str] | None template_parameters,
dict[str, SymbolicFunctionDefinition] | None symbolic_functions = None,
dict[object, str] | None expression_replacements = None )
protected

Definition at line 185 of file generate_cpp_hamiltonian.py.

◆ _render_indexed_elem_method()

str generate_cpp_hamiltonian._render_indexed_elem_method ( str method_name,
str argument_prefix,
list[str] symbols_,
list expressions,
dict[str, str] replacements,
list[str] | None template_parameters,
dict[str, SymbolicFunctionDefinition] | None symbolic_functions = None,
dict[object, str] | None expression_replacements = None )
protected

Definition at line 229 of file generate_cpp_hamiltonian.py.

◆ _render_indexed_nonlocal_value_method()

str generate_cpp_hamiltonian._render_indexed_nonlocal_value_method ( str method_name,
list[str] symbols_,
list expressions,
dict[str, str] replacements,
dict[str, SymbolicFunctionDefinition] | None symbolic_functions = None )
protected

Definition at line 273 of file generate_cpp_hamiltonian.py.

◆ _render_moments_object_method()

str generate_cpp_hamiltonian._render_moments_object_method ( list[str] symbols_,
list expressions,
dict[str, str] replacements,
dict[str, SymbolicFunctionDefinition] symbolic_functions,
dict[object, str] expression_replacements,
str component_expression )
protected

Definition at line 306 of file generate_cpp_hamiltonian.py.

◆ _render_moments_object_jacobian_method()

str generate_cpp_hamiltonian._render_moments_object_jacobian_method ( list[str] symbols_,
hamiltonian,
dict[str, str] replacements,
dict[str, SymbolicFunctionDefinition] symbolic_functions,
dict[object, str] expression_replacements,
str component_expression )
protected

Definition at line 347 of file generate_cpp_hamiltonian.py.

◆ write_cpp_hamiltonian_header()

None generate_cpp_hamiltonian.write_cpp_hamiltonian_header ( Path output_path,
str namespace,
str struct_name,
list[tuple[str, str, bool, str]] parameters,
hamiltonian,
list[dict[str, object]] variable_entries,
list[str] | None includes = None,
str | None moments_computer = None,
list[str] | None inverse_symbols = None,
list | None inverse_expressions = None,
list[str] | None template_parameters = None,
dict[str, str] | None parameter_value_expressions = None,
HamiltonianDefinition | None definition = None )

Definition at line 400 of file generate_cpp_hamiltonian.py.

◆ generate_cpp_hamiltonian()

None generate_cpp_hamiltonian.generate_cpp_hamiltonian ( functor_class,
Path output_path,
* args,
** kwargs )

Definition at line 654 of file generate_cpp_hamiltonian.py.