extract_param_set_idx¶
- extract_param_set_idx(key, default=None)[source]¶
Extract the param_set index from a pipeline result KEY.
keymust be a NodeKey — a tuple of(axis_name, value)pairs, as found on the keys of a rawPipelineResult(e.g. frompipeline.run(...)). It is NOT meant for the output ofevaluate(), which is already collapsed to a{param_set_idx: value}mapping whose int keys are the indices.Raises
KeyErrorwhen noparam_setaxis is present, unlessdefaultis given — a parameter-free body (e.g. an empty Fubini-Study prefix on the|0>state) carries no such axis and is the sole set, so callers passdefault=0.- Return type: