Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect note from CR docstring (backport #118) #120

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading