qiskit_trebugger.model.transpilation_step
Implements a transpiler pass as a common data structure called TranspilationStep.
1"""Implements a transpiler pass as a common data structure called TranspilationStep. 2""" 3from .circuit_stats import CircuitStats 4 5 6class TranspilationStep: 7 """Models a transpilation pass as a step 8 with different types of properties and 9 statistics 10 """ 11 12 def __init__(self, name, pass_type) -> None: 13 self.index = None 14 self.name = name 15 self.pass_type = pass_type 16 self.docs = "" 17 self.run_method_docs = "" 18 self.duration = 0 19 self.circuit_stats = CircuitStats() 20 self.property_set = {} 21 self.property_set_index = None 22 self.logs = [] 23 self.dag = None 24 25 def __repr__(self) -> str: 26 return f"(name={self.name}, pass_type={self.pass_type})" 27 28 def get_docs(self): 29 """Return doc string of the pass 30 31 Returns: 32 str: docstring of the step 33 """ 34 return self.docs
class
TranspilationStep:
7class TranspilationStep: 8 """Models a transpilation pass as a step 9 with different types of properties and 10 statistics 11 """ 12 13 def __init__(self, name, pass_type) -> None: 14 self.index = None 15 self.name = name 16 self.pass_type = pass_type 17 self.docs = "" 18 self.run_method_docs = "" 19 self.duration = 0 20 self.circuit_stats = CircuitStats() 21 self.property_set = {} 22 self.property_set_index = None 23 self.logs = [] 24 self.dag = None 25 26 def __repr__(self) -> str: 27 return f"(name={self.name}, pass_type={self.pass_type})" 28 29 def get_docs(self): 30 """Return doc string of the pass 31 32 Returns: 33 str: docstring of the step 34 """ 35 return self.docs
Models a transpilation pass as a step with different types of properties and statistics
TranspilationStep(name, pass_type)
13 def __init__(self, name, pass_type) -> None: 14 self.index = None 15 self.name = name 16 self.pass_type = pass_type 17 self.docs = "" 18 self.run_method_docs = "" 19 self.duration = 0 20 self.circuit_stats = CircuitStats() 21 self.property_set = {} 22 self.property_set_index = None 23 self.logs = [] 24 self.dag = None