diff --git a/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py b/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py index 13ed3a1d3..0fb4bb5cc 100644 --- a/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py +++ b/circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py @@ -139,21 +139,37 @@ def copy(self): return copy.copy(self) def print(self, simple=False): - """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) + """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) 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]], - ) + { + "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], + } ) if simple: # print only a subset of properties.