Skip to content

Commit

Permalink
Update qiskit_addon_dice_solver/dice_solver.py
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin J. Sung <[email protected]>
  • Loading branch information
caleb-johnson and kevinsung authored Sep 25, 2024
1 parent 986b72c commit af5671c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiskit_addon_dice_solver/dice_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def solve_fermion(
# Convert bitstring matrix to integer determinants for spin-up/down
ci_strs = bitstring_matrix_to_ci_strs(bitstring_matrix)
num_configurations = len(ci_strs[0])
num_up = bin(ci_strs[0][0])[2:].count("1")
num_dn = bin(ci_strs[1][0])[2:].count("1")
num_up = format(ci_strs[0][0], "b").count("1")
num_dn = format(ci_strs[1][0], "b").count("1")

# Set up the temp directory
temp_dir = temp_dir or tempfile.gettempdir()
Expand Down

0 comments on commit af5671c

Please sign in to comment.