diff --git a/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py b/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py index 0fb4bb5cc..13ed3a1d3 100644 --- a/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py +++ b/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py @@ -139,37 +139,21 @@ def copy(self): return copy.copy(self) def print(self, simple=False): - """Print the various properties of a DisjointSubcircuitState.""" - - # cut_actions = PrintActionListWithNames(self.actions) - # cut_actions_sublist = [] - # Cut = namedtuple("Cut", ["Action", "Gate"]) - - # for i in range(len(cut_actions)): - # if cut_actions[i][0] == "CutTwoQubitGate": - # cut_actions_sublist.append( - # Cut( - # Action=cut_actions[i][0], - # Gate=[cut_actions[i][1][0], cut_actions[i][1][1]], - # ) - # ) - # elif (cut_actions[i][0] == "CutLeftWire") or (cut_actions[i][0] == ("CutRightWire")): - - - cut_actions = PrintActionListWithNames(self.actions) + """Print the various properties of a DisjointSubcircuitState. + In its current state, this function only works for 2 qubit LO gate cuts. + It will be updated as more functionalities are added in the future. + """ + cut_actions = debugActionListWithNames(self.actions) cut_actions_sublist = [] Cut = namedtuple("Cut", ["Action", "Gate"]) for i in range(len(cut_actions)): if cut_actions[i][0] == "CutTwoQubitGate": cut_actions_sublist.append( - { - "Cut action": cut_actions[i][0], - "Cut location": { - "Gate": [cut_actions[i][1][0], cut_actions[i][1][1]] - }, - "Input wire": cut_actions[i][2][0][0], - } + Cut( + Action=cut_actions[i][0], + Gate=[cut_actions[i][1][0], cut_actions[i][1][1]], + ) ) if simple: # print only a subset of properties.