Skip to content

Commit

Permalink
MBQCTensornet becomes subclass of
Browse files Browse the repository at this point in the history
  • Loading branch information
jemappellesami committed Aug 19, 2024
1 parent 2c973c5 commit fbdaea2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion graphix/sim/base_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __init__(
node_index : NodeIndex
mapping between node numbers and qubit indices in the internal state of the backend.
state : State
internal state of the backend.
internal state of the backend: instance of Statevec, DensityMatrix, or MBQCTensorNet.
"""
self.__state = state
Expand Down
4 changes: 2 additions & 2 deletions graphix/sim/tensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


from graphix.ops import Ops
from graphix.sim.base_backend import Backend, MeasurementDescription
from graphix.sim.base_backend import Backend, MeasurementDescription, State
from graphix.states import BasicStates


Expand Down Expand Up @@ -190,7 +190,7 @@ def finalize(self, output_nodes) -> None:
pass


class MBQCTensorNet(TensorNetwork):
class MBQCTensorNet(State, TensorNetwork):
"""Tensor Network Simulator interface for MBQC patterns, using quimb.tensor.core.TensorNetwork."""

def __init__(
Expand Down
1 change: 1 addition & 0 deletions graphix/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class DefaultMeasureMethod(MeasureMethod):
Default measurement method implementing standard measurement plane/angle update for MBQC.
To be overwritten by custom measurement methods in the case of delegated QC protocols.
"""

def __init__(self, results=None):
if results is None:
results = dict()
Expand Down

0 comments on commit fbdaea2

Please sign in to comment.