spheres.spin_circuits.pytket.postselect_shots

spheres.spin_circuits.pytket.postselect_shots(postselection_indices, postselection_values, original_shots)[source]

Given an array of shots data, postselects on certain bits having certain values.

Parameters
  • postselection_indices (list) – Indices to postselect on.

  • postselection_values (list) – Desired values for each index.

  • original_shots (list) – Shots data.

Returns

postselected_shots

Return type

list