qiskit_addon_sqd.configuration_recovery.post_select_by_hamming_weight¶ post_select_by_hamming_weight(bitstring_matrix, *, hamming_right, hamming_left)[source]¶ Post-select bitstrings based on the hamming weight of each half. Parameters: bitstring_matrix (ndarray) – A 2D array of bool representations of bit values such that each row represents a single bitstring hamming_right (int) – The target hamming weight of the right half of bitstrings hamming_left (int) – The target hamming weight of the left half of bitstrings Returns: A mask signifying which samples (rows) were selected from the input matrix. Return type: ndarray