Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Nov 6, 2024
1 parent 22a62cc commit 769da4f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions qiskit_addon_dice_solver/dice_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def solve_hci(
mpirun_options: Sequence[str] | str | None = None,
temp_dir: str | Path | None = None,
clean_temp_dir: bool = True,
) -> tuple[
float, SCIState, tuple[np.ndarray, np.ndarray]
]:
) -> tuple[float, SCIState, tuple[np.ndarray, np.ndarray]]:
"""
Approximate the ground state of a molecular Hamiltonian using the heat bath configuration interaction method.
Expand Down Expand Up @@ -157,9 +155,7 @@ def solve_hci(
_call_dice(dice_dir, mpirun_options)

# Read and convert outputs
e_dice, sci_state, avg_occupancies = _read_dice_outputs(
dice_dir, norb
)
e_dice, sci_state, avg_occupancies = _read_dice_outputs(dice_dir, norb)

# Clean up the temp directory of intermediate files, if desired
if clean_temp_dir:
Expand Down Expand Up @@ -389,7 +385,9 @@ def _read_dice_outputs(
sci_coefficients, addresses_a, addresses_b = (
_construct_ci_vec_from_addresses_amplitudes(amps, addresses)
)
sci_state = SCIState(amplitudes=sci_coefficients, ci_strs_a=addresses_a, ci_strs_b=addresses_b)
sci_state = SCIState(
amplitudes=sci_coefficients, ci_strs_a=addresses_a, ci_strs_b=addresses_b
)

return energy_dice, sci_state, avg_occupancies

Expand Down

0 comments on commit 769da4f

Please sign in to comment.