Logging and results¶
Types produced by a propagation run, and the structured event logger.
Results¶
PropagationResult
¶
Attributes:
| Name | Type | Description |
|---|---|---|
expectation_value |
float
|
|
n_terms |
list[int]
|
|
sparse_key_bytes |
int
|
Bytes of resident sparse term keys held by the evolved term sum at the |
terms_below_cutoff |
int
|
Live terms whose magnitude is below the coefficient cutoff. |
Logger¶
Logger
¶
Structured event logger for propagator runs, writing JSON Lines to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
Path to write the JSON Lines event log. |
required | |
log_every
|
Emit a gate-event record every N gate applications (default 1). |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
filename |
str
|
|
log_every |
int
|
|
See logging and profiling for how to read the log back,
and propaq.log_parser for the parsed event types.