Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Relative Fluctuation

A standalone RF calculation package for precomputed energy expectation values. It calculates the normalized standard deviation, RF, and their error bars using Python 3.9+ and NumPy.

Installation

From the repository root, run:

python -m pip install ./rf_calculations

Usage

from rfcalc import rf_from_npy

result = rf_from_npy(
    "energies.npy",
    num_parameters=10,
    normalization=8.0,
    n_groups=20,
)
print(result.rf, result.rf_error)

Set the parameter count and normalization denominator according to your circuit, Hamiltonian, and calculation convention. Group counts such as 5, 10, and 20 are supported. The sample count must be divisible by the group count, with at least two samples per group.

Standalone example and tests

cd rf_calculations
python example.py
python -m unittest discover -s tests -v

The package includes statistics, normalization, parameter counting, and numeric file loading for existing energy samples. It excludes training, plotting, and complete circuit-sampling workflows. The calculation routines were extracted from the relevant density_state notebooks; see the detailed instructions for their sources and conventions.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages