Surface code simulation
Current report
Progress log
May 2007:
- practiced coding simple circuits in qubit formalism.
- started writing surface code in stabilizer formalism.
- implemented and debugged Pauli operation subroutine [applyPauli].
- implemented and debugged Pauli measurement subroutine [measurePauli].
- implemented and debugged Bell-pair encoding subroutine [encode].
- implemented and debugged code-splitting subroutine [splitcode].
June 2007:
- understood surface code recovery strategy.
- implemented and debugged error generating subroutine [evolve]:
- independent, probabilistic phase-flip errors
with probability p
(added other channels in August).
- studied Edmonds' algorithm for maximum matching without weights.
- studied Horodecki's proof of positivity of partial transpose as necessary and sufficient criterion for separability in 2x2 or 2x3 systems.
- created M.Sc. report outline.
July 2007:
- implemented and debugged perfect syndrome measurement subroutine [measuresyndrome]:
- collected only primal syndrome
(processed dual syndrome in August).
- incorporated and checked Cook's software for minimum-weight perfect matching.
- achieved major (10x) speedup in [applyPauli] and [measurePauli]:
- modified stabilizer data structure (5x);
- made use of operator type information in [symprod] (2x);
- affecting [splitcode] and [evolve].
August 2007:
- designed final logical state measurement for Pauli channels.
- understood Edmonds' algorithm for maximum matching without weights.
- understood code splitting measurements and dependence of measurement
outcomes.
- rewrote (encode + splitcode) =: [encode] subroutine:
- redefined logicalZZ in [logicalop];
- achieved speedup.
- achieved additional (2x) speedup in [applyPauli] and [measurePauli]:
- used information about the type of each generator (2x);
- rearranged the order of generators so that
all X-type generators and logicalXX are grouped together
before the Z-type generators and logicalZZ.
- added other Pauli channels in [evolve]:
- justX - independent, probabilistic bit-flip errors only with probability p;
- indXZ - independent, probabilistic X and Z errors with probability p each;
- depol - depolarizing channel with probability p/3 for each type of errors.
- processed dual syndrome in subroutine [measuresyndrome].
- implemented and debugged primal recovery subroutine in case of perfect measurements [recover]:
- added and debugged 2d [shortestpath], [weight], [obstacle] and [whichside].
- implemented and debugged Monte Carlo loops.
- implemented and debugged logical Bell state distinction function [distinctBell]:
- by looking at the phases of the final stabilizer elements
logicalXX and logicalZZ;
- compared with Bell state obtained from (recorded) generated errors
and recovery operations (for debugging).
- implemented and debugged logical '2-qubit Pauli state' distinction function [distinctPauli]:
- obtained from (recorded) generated errors and recovery operations
(for debuggin).
- implemented and debugged imperfect syndrome measurements in [measuresyndrome]:
- measurement errors are independent, probabilistic classical bit flips with probability q.
- implemented and debugged primal recovery subroutine in case of imperfect measurements with q=p [recover]:
- implemented relative matching with respect to t=tf;
- broke up the 2 code blocks for matching;
- revised to 3d [weight] and 1d [whichside], corrected [shortestpath];
- introduced meaningful variables lelh (= left-edge-of-left-hole) etc.
September 2007:
- finished M.Sc. report.
- converted from simulating 2 code blocks to simulating 1 code block:
- introduced recursion in a few subroutines.
- implemented and debugged dual recovery (dealt with all possible rough boundary selections):
- added and debugged subroutines [path2rough] and [weight2rough].
- implemented and debugged 2D QEC at final time for q=p.
- implemented and debugged final analysis subroutines [Pauliprob] and [Bellstats].
- compute Bellstats probabilities.
- remove redundancies/debugging.
- production runs.
Future:
- q.ne.p (rational edge weights).**
- think about correlated errors.**
- think about general unitary errors.**
- understand the proof of partial transpose and separability.
- fault-tolerant measurements of logical XX and ZZ at tf boundary;
use entanglement witness.**
- understand Edmonds' blossom algorithm.
Subroutines
1st level subroutines:
- encode(l,minh,maxh,nlh,nSt,nStX,St)
- recursive evolve(channeltyp,p,l,minh,maxh,nlh,nSt,nStX,St,occurred)
- recursive measuresyndrome(channeltyp,pq,t,tf,l,minh,maxh,nlh,nSt,St,Syndrome)
- recursive recover(channeltyp,pq,t,tf,l,minh,maxh,nlh,nSt,nStX,Syndrome,St,corrected)
- checkstabilizer(l,minh,maxh,nlh,nSt,nStX,St)
- checkindex(l,m,minh,maxh,nlh,nSt,nStX)
2nd level subroutines:
- shortestpath(c1,c2,typ,l,minh,maxh,nlh,S)
- path2rough(etyp,c1,typ,l,minh,maxh,nlh,S)
- weight2rough(roughbdy,cc1,ttf,typ,l,minh,maxh,eelen,eetyp)
- applyPauli(typS,nlh,nSt,nStX,S,St)
- recursive logicalop(op,l,minh,maxh,nlh,S)
- physicalop(op,i,j,dir,l,minh,maxh,nlh,S)
Functions:
- character(1) :: whichPauli(l,nlh,nSt,nStX,St,occurred,corrected)
- integer :: weight(dimen,cc1,cc2,typ,l,minh,maxh)
- character(2) :: obstacle(c1,c2,typ,minh,maxh)
- integer :: index1d(i,j,dir,l,minh,maxh,nlh)
- integer :: opindex1d(i,j,typ,l,minh,maxh,nStX)
- logical(1) :: inbound(i,j,dir,l)
- logical(1) :: opinbound(i,j,typ,l)
- logical(1) :: inhole(i,j,dir,minh,maxh)
- logical(1) :: opinhole(i,j,typ,minh,maxh)
- integer :: symprod(typS2,nlh,S1,S2)