def executeEvent( self, inputs ): circ = circuit() res = adding_lines( circ, inputs[0], additional_lines = int( self.additional_lines ) ) if type( res ) == dict: self.widget.runtime.setText( "%.2f s" % res['runtime'] ) circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent(self, inputs): circ = circuit() filename = str(self.filename) ret = read_realization(circ, filename) if isinstance(ret, str): return ret circ.circuit_name = filename[filename.rfind('/') + 1:filename.rfind('.')] return [circ]
def executeEvent( self, inputs ): circ = circuit() res = transposition_based_synthesis( circ, inputs[0] ) if type( res ) == dict: try: circ.circuit_name = inputs[0].name except: pass circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent(self, inputs): circ = circuit() res = adding_lines(circ, inputs[0], additional_lines=int(self.additional_lines)) if type(res) == dict: self.widget.runtime.setText("%.2f s" % res['runtime']) circuit_add_runtime(circ, res['runtime']) else: return res return [circ]
def executeEvent( self, inputs ): circ = circuit() res = line_reduction( circ, inputs[0], max_window_lines = int( self.max_window_lines ), max_grow_up_window_lines = int( self.max_grow_up_window_lines ), window_variables_threshold = int( self.window_variables_threshold ) ) if type( res ) == dict: self.widget.runtime.setText( "%.2f s" % res['runtime'] ) circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent(self, inputs): circ = circuit() res = transposition_based_synthesis(circ, inputs[0]) if type(res) == dict: try: circ.circuit_name = inputs[0].name except: pass circuit_add_runtime(circ, res['runtime']) else: return res return [circ]
def executeEvent( self, inputs ): circ = circuit() res = exact_synthesis( circ, inputs[0], max_depth = int( self.max_depth ), spec_incremental = bool( int( self.spec_incremental ) ) ) if type( res ) == dict: try: circ.circuit_name = inputs[0].name except: pass self.widget.runtime.setText( "%.2f s" % res['runtime'] ) circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent(self, inputs): circ = circuit() res = line_reduction( circ, inputs[0], max_window_lines=int(self.max_window_lines), max_grow_up_window_lines=int(self.max_grow_up_window_lines), window_variables_threshold=int(self.window_variables_threshold)) if type(res) == dict: self.widget.runtime.setText("%.2f s" % res['runtime']) circuit_add_runtime(circ, res['runtime']) else: return res return [circ]
def executeEvent( self, inputs ): circ = circuit() res = esop_synthesis( circ, inputs[0], separate_polarities = bool( int( self.separate_polarities ) ), reordering = weighted_reordering( float( self.alpha ), float( self.beta ) ), garbage_name = str( self.garbage_name ) ) if type( res ) == dict: circuit_set_name( circ, inputs[0] ) self.widget.runtime.setText( "%.2f s" % res['runtime'] ) circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent( self, inputs ): index = int( self.filetype ) filename = self.controller.filenames[self.currentIndex] self.currentIndex += 1 if index == 0: # Functions return [ filename ] elif index == 1: # Circuit circ = circuit() read_realization( circ, filename ) circ.circuit_name = filename[filename.rfind('/') + 1:filename.rfind('.')] return [ circ ] elif index == 2: # Specification spec = binary_truth_table() read_specification( spec, filename ) return [ spec ]
def executeEvent(self, inputs): circ = circuit() res = exact_synthesis(circ, inputs[0], max_depth=int(self.max_depth), spec_incremental=bool(int( self.spec_incremental))) if type(res) == dict: try: circ.circuit_name = inputs[0].name except: pass self.widget.runtime.setText("%.2f s" % res['runtime']) circuit_add_runtime(circ, res['runtime']) else: return res return [circ]
def executeEvent( self, inputs ): circ = circuit() cf = [ gate_costs, quantum_costs, transistor_costs ][int( self.cost_function )]() synthesis = [ transformation_based_synthesis_func, reed_muller_synthesis_func ][int( self.variant )] res = swop( circ, inputs[0], enable = int( self.swop ) > 0, exhaustive = int( self.swop ) == 1, synthesis = synthesis( bidirectional = bool( int( self.bidi_synthesis ) ) ), cf = cf ) if type( res ) == dict: try: circ.circuit_name = inputs[0].name except: pass self.widget.runtime.setText( "%.2f s" % res['runtime'] ) circuit_add_runtime( circ, res['runtime'] ) else: return res return [ circ ]
def executeEvent(self, inputs): circ = circuit() cf = [gate_costs, quantum_costs, transistor_costs][int(self.cost_function)]() synthesis = [ transformation_based_synthesis_func, reed_muller_synthesis_func ][int(self.variant)] res = swop( circ, inputs[0], enable=int(self.swop) > 0, exhaustive=int(self.swop) == 1, synthesis=synthesis(bidirectional=bool(int(self.bidi_synthesis))), cf=cf) if type(res) == dict: try: circ.circuit_name = inputs[0].name except: pass self.widget.runtime.setText("%.2f s" % res['runtime']) circuit_add_runtime(circ, res['runtime']) else: return res return [circ]