GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — qpp/examples/qecc.cpp at main · softwareQinc/qpp Expand file tree/ Copy pathqecc.cppMore file actions 35 lines (26 loc) · 1.11 KB / Copy pathqecc.cppFile metadata and controls35 lines (26 loc) · 1.11 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 // Source: ./examples/qecc.cpp // // Quantum error correcting codes #include <iostream> #include <qpp/qpp.hpp> int main() { using namespace qpp; ket a0 = Codes::codeword(Codes::Type::FIVE_QUBIT, 0); ket a1 = Codes::codeword(Codes::Type::FIVE_QUBIT, 1); ket b0 = Codes::codeword(Codes::Type::STEANE_SEVEN_QUBIT, 0); ket b1 = Codes::codeword(Codes::Type::STEANE_SEVEN_QUBIT, 1); ket c0 = Codes::codeword(Codes::Type::SHOR_NINE_QUBIT, 0); ket c1 = Codes::codeword(Codes::Type::SHOR_NINE_QUBIT, 1); std::cout << ">> [[5, 1, 3]] Five qubit code.\n"; std::cout << ">> Checking codeword orthogonality.\n"; std::cout << ">> |<0L|1L>| = "; std::cout << disp(adjoint(a0) * a1) << '\n'; std::cout << ">> [[7, 1, 3]] Seven qubit Steane code.\n"; std::cout << ">> Checking codeword orthogonality.\n"; std::cout << ">> |<0L|1L>| = "; std::cout << disp(adjoint(b0) * b1) << '\n'; std::cout << ">> [[9, 1, 3]] Nine qubit Shor code.\n"; std::cout << ">> Checking codeword orthogonality.\n"; std::cout << ">> |<0L|1L>| = "; std::cout << disp(adjoint(c0) * c1) << '\n'; } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |