FlowController#
- class qiskit.transpiler.FlowController(passes, options, **partial_controller)[Quellcode]#
Bases:
object
Base class for multiple types of working list.
This class is a base class for multiple types of working list. When you iterate on it, it returns the next pass to run.
Attributes
- registered_controllers = {'condition': <class 'qiskit.transpiler.runningpassmanager.ConditionalController'>, 'do_while': <class 'qiskit.transpiler.runningpassmanager.DoWhileController'>}#
Methods
- classmethod add_flow_controller(name, controller)[Quellcode]#
Adds a flow controller.
- Parameter:
name (string) – Name of the controller to add.
controller (type(FlowController)) – The class implementing a flow controller.
- classmethod controller_factory(passes, options, **partial_controller)[Quellcode]#
Constructs a flow controller based on the partially evaluated controller arguments.
- Parameter:
- Verursacht:
TranspilerError – When partial_controller is not well-formed.
- Rückgabe:
A FlowController instance.
- Rückgabetyp:
- dump_passes()[Quellcode]#
Fetches the passes added to this flow controller.
- Rückgabe:
{‚options‘: self.options, ‚passes‘: [passes], ‚type‘: type(self)}
- Rückgabetyp:
- classmethod remove_flow_controller(name)[Quellcode]#
Removes a flow controller.
- Parameter:
name (string) – Name of the controller to remove.
- Verursacht:
KeyError – If the controller to remove was not registered.