-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force hamming_left and hamming_right to be kwargs throughout API
- Loading branch information
1 parent
10a7332
commit 50aab79
Showing
11 changed files
with
104 additions
and
48 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
upgrade: | ||
- | | ||
The :func:`qiskit_addon_sqd.counts.generate_counts_bipartite_hamming`, :func:`qiskit_addon_sqd.subsampling.postselect_and_subsample`, and :func:`qiskit_addon_sqd.configuration_recovery.post_select_by_hamming_weight` now require the ``hamming_right`` and ``hamming_left`` arguments to be specified as keyword arguments. | ||
To upgrade | ||
.. code-block:: python | ||
from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight | ||
from qiskit_addon_sqd.subsampling import postselect_and_subsample | ||
from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming | ||
counts = generate_counts_bipartite_hamming(num_samples, num_bits, num_elec_a, num_elec_b) | ||
... | ||
bs_mat = post_select_by_hamming_weight(bs_mat_full, num_elec_a, num_elec_b) | ||
... | ||
batches = postselect_and_subsample( | ||
bs_mat, | ||
probs_arr, | ||
num_elec_a, | ||
num_elec_b, | ||
samples_per_batch, | ||
n_batches, | ||
) | ||
should be changed to | ||
.. code-block:: python | ||
from qiskit_addon_sqd.configuration_recovery import post_select_by_hamming_weight | ||
from qiskit_addon_sqd.subsampling import postselect_and_subsample | ||
from qiskit_addon_sqd.counts import generate_counts_bipartite_hamming | ||
counts = generate_counts_bipartite_hamming(num_samples, num_bits, hamming_right=num_elec_a, hamming_left=num_elec_b) | ||
... | ||
bs_mat = post_select_by_hamming_weight(bs_mat_full, hamming_right=num_elec_a, hamming_left=num_elec_b) | ||
... | ||
batches = postselect_and_subsample( | ||
bs_mat, | ||
probs_arr, | ||
samples_per_batch, | ||
n_batches, | ||
hamming_right=num_elec_a, | ||
hamming_left=num_elec_b, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters