Skip to content

Commit

Permalink
Remove incorrect note from CR docstring (#118)
Browse files Browse the repository at this point in the history
* Remove incorrect note from CR docstring

* Update tutorial 1
  • Loading branch information
caleb-johnson authored Dec 10, 2024
1 parent 9a33611 commit 14e088b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions docs/tutorials/01_chemistry_hamiltonian.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"for i in range(iterations):\n",
" print(f\"Starting configuration recovery iteration {i}\")\n",
" # On the first iteration, we have no orbital occupancy information from the\n",
" # solver, so we just post-select from the full bitstring set based on hamming weight.\n",
" # solver, so we begin with the full set of noisy configurations.\n",
" if occupancies_bitwise is None:\n",
" bs_mat_tmp = bitstring_matrix_full\n",
" probs_arr_tmp = probs_arr_full\n",
Expand All @@ -425,7 +425,8 @@
" rand_seed=rng,\n",
" )\n",
"\n",
" # Throw out configurations with incorrect particle number in either the spin-up or spin-down systems\n",
" # Create batches of subsamples. We post-select here to remove configurations\n",
" # with incorrect hamming weight during iteration 0, since no config recovery was performed.\n",
" batches = postselect_and_subsample(\n",
" bs_mat_tmp,\n",
" probs_arr_tmp,\n",
Expand Down
5 changes: 0 additions & 5 deletions qiskit_addon_sqd/configuration_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ def recover_configurations(
corresponding to the spin-up orbital in bit ``i + N`` where ``N`` is the number of
spatial orbitals and ``i < N``.
.. note::
The output configurations may not necessarily have correct hamming weight, as each bit
is flipped in isolation from the other bits in the bitstring.
Args:
bitstring_matrix: A 2D array of ``bool`` representations of bit
values such that each row represents a single bitstring
Expand Down

0 comments on commit 14e088b

Please sign in to comment.