diff --git a/docs/tutorials/01_chemistry_hamiltonian.ipynb b/docs/tutorials/01_chemistry_hamiltonian.ipynb index 7c18e9f..3ee40c6 100644 --- a/docs/tutorials/01_chemistry_hamiltonian.ipynb +++ b/docs/tutorials/01_chemistry_hamiltonian.ipynb @@ -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", @@ -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", diff --git a/qiskit_addon_sqd/configuration_recovery.py b/qiskit_addon_sqd/configuration_recovery.py index 4056013..7b34a82 100644 --- a/qiskit_addon_sqd/configuration_recovery.py +++ b/qiskit_addon_sqd/configuration_recovery.py @@ -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