Exemplo n.º 1
0
def run2D(size=4, p=0.1):

    L = toric_lattice.PlanarLattice(size)

    L.applyRandomErrors(p, p)
    L.measureStars()
    L.measurePlaquettes()

    #L.showArray("errors","Z")
    #L.showArray("stabilizers","X")

    L.findAnyons()
    #print L.positions_anyons_P

    matchingX = perfect_matching.match_toric_2D(size, L.positions_anyons_P)
    matchingZ = perfect_matching.match_toric_2D(size, L.positions_anyons_S)

    #print matching

    L.apply_matching("X", matchingX)
    L.apply_matching("Z", matchingZ)

    #L.showArray("errors","Z")
    #L.showArray("errors","Z")

    return L.measure_logical()
Exemplo n.º 2
0
def run2D(size=4,p=0.1):

   L=toric_lattice.PlanarLattice(size)

   L.applyRandomErrors(p,p)
   L.measureStars()
   L.measurePlaquettes()

   

   #L.showArray("errors","Z")
   #L.showArray("stabilizers","X")

   L.findAnyons()
   #print L.positions_anyons_P

   matchingX=perfect_matching.match_toric_2D(size,L.positions_anyons_P)
   matchingZ=perfect_matching.match_toric_2D(size,L.positions_anyons_S)

   #print matching

   L.apply_matching("X",matchingX)
   L.apply_matching("Z",matchingZ)

   #L.showArray("errors","Z")
   #L.showArray("errors","Z")

   return L.measure_logical()
def run2D(size=4,p=0.1):

   L=toric_lattice.PlanarLattice(size)

   L.applyRandomErrors(p,p)
   L.measureStars()
   L.measurePlaquettes()
   
   #Uncomment display function for debugging
   #L.showArrayText("errors","Z")

   L.findAnyons()

   matchingX=perfect_matching.match_toric_2D(size,L.positions_anyons_P)
   matchingZ=perfect_matching.match_toric_2D(size,L.positions_anyons_S)

   L.apply_matching("X",matchingX)
   L.apply_matching("Z",matchingZ)

   return L.measure_logical()
def run2D(size=4, p=0.1):

    L = toric_lattice.PlanarLattice(size)

    L.applyRandomErrors(p, p)
    L.measureStars()
    L.measurePlaquettes()

    # Uncomment display function for debugging
    # L.showArrayText("errors","Z")

    L.findAnyons()

    matchingX = perfect_matching.match_toric_2D(size, L.positions_anyons_P)
    matchingZ = perfect_matching.match_toric_2D(size, L.positions_anyons_S)

    L.apply_matching("X", matchingX)
    L.apply_matching("Z", matchingZ)

    return L.measure_logical()