Skip to content

Speed up configuration recovery #278

@kevinsung

Description

@kevinsung

What should we add?

The following loop can take a long time when there are many bitstrings to process. It might be worth implementing in Rust.

for bitstring, freq in zip(bitstring_matrix, probabilities):
bs_corrected = _bipartite_bitstring_correcting(
bitstring,
occs_array,
num_elec_a,
num_elec_b,
rng=rng,
)
bs_str = "".join("1" if bit else "0" for bit in bs_corrected)
corrected_dict[bs_str] += freq

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions