Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Module helpers

CallReturns
paulistrings.p(label)a PauliString from its IXYZ label, shorthand for PauliString.from_label
paulistrings.numa_nodes()list[list[int]], the NUMA nodes this process may run on, one CPU-index list per node, ascending node order; intersected with the process’s CPU affinity mask
paulistrings.mpi_available()bool, whether this build can run PauliSum.propagate(comm=...) (compiled with the mpi feature)
paulistrings.cuda_available()bool, whether this build can run PauliSum.propagate(device=...): compiled with the cuda feature, libcuda and libnvrtc loadable, and a device visible
paulistrings.GpuPauliSumthe device-resident sum PauliSum.to_device returns, present only in a build with the cuda feature; see GpuPauliSum
paulistrings.reset_log_cache()drops pyo3-log’s cached per-logger effective level

Logging gotcha

pyo3-log caches each logger’s effective level the first time it is consulted. Call paulistrings.reset_log_cache() after changing a Python log level mid-process (e.g. logging.getLogger("paulistrings.propagate").setLevel(logging.DEBUG)), or the new level is not picked up.

See Stats, memory and logging for the full recipe.