#include #include #include #include #include #include #include using namespace std; // Function returns the index of a stabilizer with coordinates (x,y) int GetStab(int x, int y, int StabXPos[], int StabYPos[], int NoV); // Function to measure star operator about vertex 'Vertex' bool StabilizerMeasurement(bool Qubits[], int Site, int L, int xPos[], int yPos[]); void GetSurrQubitLocs(bool Errors[], int Site, int L, int xPos[], int yPos[], int QubXPos[], int QubYPos); //Function indicates whether site1 and site 2 are in two different restricted lattices (and which ones) or not (returns 0) int CreaseCross(int site1, int site2, int NoOfVertices, int prev); // Function to measure the parity of qubits in the one state along the vertical logical measurement int LogicalMeasurement(bool QubitsX[], int L); //Function to identify qubits in case decoder failed // string PrintFail(bool QubitsX[], int NoOfQubits); int CountFail(bool QubitsX[], int NoOfQubits); //Function to print X matrix of mobius strip (RB GB RG) - (X can be adjacency, shortest path or parity matrix) void MobiusPrinter(vector WrappedMobius, int V); //Function to fill Stabilizer and Qubit locations on triangular lattice void XYPosFiller(int StabXPos[], int StabYPos[], int QubXPos[], int QubYPos[], int L, int NoOfVertices); //Function to copy stabilizer measurements on triangular lattice over to RLs on Mobius Strip void ExpandToMobius(bool MobiusStabs[], int StabXPos[], int StabYPos[], bool StabilizersZ[], int NoOfVertices); bool next_combination(vector& a, int n);