FlowController#

class qiskit.transpiler.FlowController(passes, options, **partial_controller)[소스]#

기반 클래스: 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)[소스]#

Adds a flow controller.

매개변수:
  • name (string) – Name of the controller to add.

  • controller (type(FlowController)) – The class implementing a flow controller.

classmethod controller_factory(passes, options, **partial_controller)[소스]#

Constructs a flow controller based on the partially evaluated controller arguments.

매개변수:
  • passes (list[TBasePass]) – passes to add to the flow controller.

  • options (dict) – PassManager options.

  • **partial_controller (dict) – Partially evaluated controller arguments in the form {name:partial}

예외 발생:

TranspilerError – When partial_controller is not well-formed.

반환:

A FlowController instance.

반환 형식:

FlowController

dump_passes()[소스]#

Fetches the passes added to this flow controller.

반환:

{‘options’: self.options, ‘passes’: [passes], ‘type’: type(self)}

반환 형식:

dict

classmethod remove_flow_controller(name)[소스]#

Removes a flow controller.

매개변수:

name (string) – Name of the controller to remove.

예외 발생:

KeyError – If the controller to remove was not registered.