e3j.utils.config.config

class e3j.utils.config.config(**kwargs)

Singleton config class for e3j.

This class manages a global Config instance. The global configuration can be read with e3j.config() and overriden permanently with e3j.config(**kwargs).

To override with context manager scope, use:

# context manager:
with e3j.use(**kwargs):
    ...

Get/set the global configuration object.

Methods

fields()

from_yaml(path)

options()

snapshot([config])

config, or a frozen copy of the global state if None or global.

state()

Return a frozen copy of current state.

to_dict()

to_yaml([path])

use(**kwargs)

Override configuration within context scope.

Attributes

aggregation

convolution

debug_level

layout

symmetric_contraction

tensor_product

classmethod snapshot(config: Config | None = None) → Config

config, or a frozen copy of the global state if None or global.

classmethod state() → Config

Return a frozen copy of current state.

classmethod use(**kwargs)

Override configuration within context scope.