Skip to content

Commit

Permalink
stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed May 3, 2021
1 parent c87815f commit 5bc5a4d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions pyzx/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class BaseGraph(Generic[VT, ET], metaclass=DocstringMeta):

def __init__(self) -> None:
self.scalar: Scalar = Scalar()
self.inputs: List[VT] = []
self.outputs: List[VT] = []
# self.inputs: List[VT] = []
# self.outputs: List[VT] = []
#Data necessary for phase tracking for phase teleportation
self.track_phases: bool = False
self.phase_index : Dict[VT,int] = dict() # {vertex:index tracking its phase for phase teleportation}
Expand Down Expand Up @@ -593,6 +593,22 @@ def translate(self, x:FloatInt, y:FloatInt) -> 'BaseGraph':
g.set_qubit(v,g.qubit(v)+y)
return g

def inputs(self) -> Tuple[VT]:
"""Gets the inputs of the graph."""
raise NotImplementedError("Not implemented on backend " + type(self).backend)

def set_inputs(self, inputs: Tuple[VT]):
"""Sets the inputs of the graph."""
raise NotImplementedError("Not implemented on backend " + type(self).backend)

def outputs(self) -> Tuple[VT]:
"""Gets the outputs of the graph."""
raise NotImplementedError("Not implemented on backend " + type(self).backend)

def set_outputs(self, outputs: Tuple[VT]):
"""Sets the outputs of the graph."""
raise NotImplementedError("Not implemented on backend " + type(self).backend)

def add_vertices(self, amount: int) -> List[VT]:
"""Add the given amount of vertices, and return the indices of the
new vertices added to the graph, namely: range(g.vindex() - amount, g.vindex())"""
Expand Down

0 comments on commit 5bc5a4d

Please sign in to comment.