Skip to content

Commit

Permalink
Revert "fix merge conflict"
Browse files Browse the repository at this point in the history
This reverts commit 65cb19e, reversing
changes made to 5488244.
  • Loading branch information
caleb-johnson committed Jan 9, 2024
1 parent 65cb19e commit 4e73f2a
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions circuit_knitting/cutting/cut_finding/disjoint_subcircuits_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4e73f2a

Please sign in to comment.