qrunch.quantum.algorithms.second_quantization.quantum_selected_configuration_interaction.reference_circuit_providers.reference_state_preparation

Shared normalization and compression of sparse reference wavefunctions.

Functions

compressed_wavefunction(determinants, ...)

Compress and normalize a reference, fixing its dominant coefficient to be positive.

compressed_wavefunction(determinants: list[int], coefficients: NDArray[float64], minimum_coefficient: float) → dict[int, float]

Compress and normalize a reference, fixing its dominant coefficient to be positive.

The beam search starts from the dominant determinant with positive amplitude. Always retain that determinant, even if the compression threshold would remove every coefficient.

Parameters:
  • determinants (list[int]) – Determinants spanning the reference.

  • coefficients (NDArray[float64]) – Coefficients in determinant order.

  • minimum_coefficient (float) – Drop coefficients at most this in absolute value.

Return type:

dict[int, float]