pygsti.circuits.subcircuit_selection.greedy_growth_subcirc_selection

pygsti.circuits.subcircuit_selection.greedy_growth_subcirc_selection#

greedy_growth_subcirc_selection(full_circ, width, depth, num_subcircs=1, num_test_subcircs=10, rand_state=None, verbosity=1, return_depth_info=False)#

Selects subcircuits using a greedy growth strategy, starting with one gate in one layer and adding gates with overlapping support in subsequent layers.

Parameters:
  • full_circ (pygsti.circuits.Circuit) – The full circuit from which to select subcircuits.

  • width (int) – The target width of the subcircuits to be selected.

  • depth (int) – The target depth of the subcircuits to be selected.

  • num_subcircs (int, optional) – The number of subcircuits to select. Default is 1.

  • num_test_subcircs (int, optional) – The number of test subcircuits to generate. Default is 10.

  • rand_state (Optional[_np.random.RandomState], optional) – A random state for reproducibility. Default is None.

  • verbosity (int, optional) – Level of verbosity for logging. Default is 1.

  • return_depth_info (bool, optional) – Whether to include compiled depths and the start and end layer for each subcircuit. Default is False.

Returns:

Optional[List[int]], Optional[List[Tuple[int,int]]]] A tuple containing the selected subcircuits and the counts of dropped gates. If return_depth_info is set to True, then the returns are extended to include the compiled depth of each subcircuit and the start and end layers of each subcircuit.

Return type:

Tuple[List[_Circuit], List[int],