Skip to main contentIBM Quantum Documentation

MinimumPoint

qiskit.transpiler.passes.MinimumPoint(*args, **kwargs) GitHub(opens in a new tab)

Bases: TransformationPass

Check if the DAG has reached a relative semi-stable point over previous runs

This pass is similar to the FixedPoint transpiler pass and is intended primarily to be used to set a loop break condition in the property set. However, unlike the FixedPoint class which only sets the condition if 2 consecutive runs have the same value property set value this pass is designed to find a local minimum and use that instead. This pass is designed for an optimization loop where a fixed point may never get reached (for example if synthesis is used and there are multiple equivalent outputs for some cases).

This pass will track the state of fields in the property set over its past executions and set a boolean field when either a fixed point is reached over the backtracking depth or selecting the minimum value found if the backtracking depth is reached. To do this it stores a deep copy of the current minimum DAG in the property set and when backtrack_depth number of executions is reached since the last minimum the output dag is set to that copy of the earlier minimum.

Fields used by this pass in the property set are (all relative to the prefix argument):

  • {prefix}_minimum_point_state - Used to track the state of the minimum point search

  • {prefix}_minimum_point - This value gets set to True when either a fixed point

    is reached over the backtrack_depth executions, or backtrack_depth was exceeded and an earlier minimum is restored.

Initialize an instance of this pass

Parameters

  • property_set_list (list(opens in a new tab)) – A list of property set keys that will be used to evaluate the local minimum. The values of these property set keys will be used as a tuple for comparison
  • prefix (str(opens in a new tab)) – The prefix to use for the property set key that is used for tracking previous evaluations
  • backtrack_depth (int(opens in a new tab)) – The maximum number of entries to store. If this number is reached and the next iteration doesn’t have a decrease in the number of values the minimum of the previous n will be set as the output dag and minimum_point will be set to True in the property set

Attributes

is_analysis_pass

Check if the pass is an analysis pass.

If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.

is_transformation_pass

Check if the pass is a transformation pass.

If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).


Methods

execute

execute(passmanager_ir, state, callback=None)

Execute optimization task for input Qiskit IR.

Parameters

Returns

Optimized Qiskit IR and state of the workflow.

Return type

tuple(opens in a new tab)[Any(opens in a new tab), qiskit.passmanager.compilation_status.PassManagerState]

name

name()

Name of the pass.

Return type

str(opens in a new tab)

run

run(dag)

Run the MinimumPoint pass on dag.

update_status

update_status(state, run_state)

Update workflow status.

Parameters

  • state (PassManagerState) – Pass manager state to update.
  • run_state (RunState) – Completion status of current task.

Returns

Updated pass manager state.

Return type

PassManagerState

Was this page helpful?