Qubit Error Correction in Quantum Computing Simulations: Do Larger Repetition Codes Reduce Logical Errors? | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Qubit Error Correction in Quantum Computing Simulations: Do Larger Repetition Codes Reduce Logical Errors? Sanjeev Tamilselvan, Tanuj Ranjith This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9261358/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Quantum computers are powerful tools for certain computational problems, but their fragile quantum states are easily disrupted by environmental noise, causing errors that degrade computational accuracy. Quantum error correction (QEC) addresses this challenge by encoding one logical qubit across multiple physical qubits, so that individual errors can be identified and reversed through redundancy. We used Qiskit Aer, a free open-source quantum circuit simulator, to test the repetition code, one of the simplest QEC methods, under three types of noise: bit-flip, phase-flip, and depolarizing. We compared an unprotected single-qubit baseline (n = 1) to 3-qubit (n = 3) and 5-qubit (n = 5) repetition codes, sweeping the physical error rate p from 0 to 0.15 with 4,000 simulation shots per data point. We hypothesized that larger codes would achieve higher logical success probabilities at all tested noise levels, with n = 5 outperforming n = 3, which would outperform the unprotected baseline. Our results confirmed this scaling trend across all three noise types. At p = 0.10 under bit-flip noise, the baseline achieved 0.713 logical success, while n = 3 reached 0.791 and n = 5 reached 0.843. At low noise (p = 0.02), the n = 5 code approached 0.994 logical success. Simulation results closely matched exact theoretical predictions derived from the binomial failure probability formula, validating our experimental implementation. These findings confirm that even the simplest QEC methods provide meaningful error reduction and that larger codes offer greater protection, demonstrating a foundational principle of quantum error correction using only free simulation tools. quantum error repetition qubit simulation Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 INTRODUCTION Quantum computers could solve problems that regular computers can't, and they could be used in drug discovery, materials science, optimization, and cryptography ( 1 ). Quantum bits (qubits) can be in superposition states that store combinations of both values at the same time, unlike classical bits, which can only be 0 or 1. This property allows for types of computation that classical machines can't do well, but it also makes qubits very sensitive to changes in their surroundings. Thermal fluctuations, electromagnetic interference, and unwanted connections to nearby systems can change the states of qubits through a process called decoherence. This can cause errors that mess up the results of quantum calculations. This sensitivity to noise is one of the biggest problems that makes it hard to build useful quantum computers. Errors happen even when you do one gate operation, and as circuits get bigger, the errors build up faster than useful computation can happen. To solve this problem, scientists came up with quantum error correction (QEC), which is a group of methods that keep quantum information safe by spreading a single logical qubit across several physical qubits. If one or more physical qubits make mistakes, the logical qubit can still be recovered from the other qubits that are not corrupted, as long as the number of errors at the same time is less than the code's correction capacity. The simplest QEC strategy is the repetition code, in which a logical qubit value is copied across n physical qubits and recovered by majority vote after measurement. For example, a logical 0 encoded in three qubits becomes |000⟩; if one qubit flips to give |010⟩, the majority vote returns the correct value 0. The logical failure probability for an n-qubit repetition code scales as p^(⌈(n + 1)/2⌉), where p is the per-qubit error rate, meaning that larger codes exponentially suppress logical errors when p is small. Google Quantum AI showed on real superconducting hardware in 2023 that larger surface code logical qubits made fewer logical errors than smaller ones ( 2 ). This outcome validated a fundamental prediction of Quantum Error Correction (QEC) theory through empirical devices. But real quantum hardware is still hard to get to, and the best way to learn about these ideas is through simulation. IBM's free, open-source quantum circuit simulator Qiskit Aer makes it possible to do this kind of research on regular computers. We used Qiskit Aer to test the repetition code under three noise models representing distinct physical error mechanisms. Bit-flip noise randomly flips the computational state of a qubit with probability p. Phase-flip noise randomly flips the phase of a superposition state with probability p. Depolarizing noise combines both error types, applying a random Pauli operator (X, Y, or Z) with equal probability p/3, making it the most realistic of the three models. We compared simulation results to exact theoretical predictions from the binomial failure probability formula to verify that the simulator matched the mathematical model. We hypothesized that, under all three noise models, the n = 5 repetition code would achieve higher logical success probabilities than the n = 3 code at all tested error rates, and that both would outperform the unprotected single-qubit baseline. We further hypothesized that simulation results would closely match exact theoretical predictions throughout. RESULTS Bit-flip noise Under bit-flip noise, the Z-basis repetition code consistently improved logical success probability over the unprotected baseline at all tested error rates (Fig. 1 ). At p = 0.02, the baseline achieved 0.924 logical success, while n = 3 reached 0.984 and n = 5 reached 0.996. At p = 0.10, the baseline fell to 0.713, whereas n = 3 achieved 0.791 and n = 5 achieved 0.843 (Table 1 ). At p = 0.15, the baseline achieved 0.630, n = 3 achieved 0.669, and n = 5 achieved 0.718. In all cases, n = 5 outperformed n = 3, and n = 3 outperformed the baseline. Exact theoretical predictions from the binomial failure probability formula matched simulation values closely across the full range of tested error rates, with residuals falling within the expected statistical variation for 4,000 shots (Fig. 1 , dashed lines). Figure 1 . Bit-flip noise: logical success probability vs. physical error rate p. Solid lines show simulation results for n = 1 (gray), n = 3 (blue), and n = 5 (red) with shaded 95% Wilson confidence intervals. Dashed lines show exact theoretical predictions. Larger codes achieved higher logical success at all tested error rates. Table 1 Table 1 Logical success probability under bit-flip noise at selected error rates. Values are the fraction of 4,000 simulation shots decoded correctly. CI = 95% Wilson confidence interval. Baseline = n = 1 (unprotected). Error rate p Baseline (n = 1) n = 3 n = 5 0.00 1.000 1.000 1.000 0.02 0.924 0.984 0.996 0.05 0.824 0.909 0.966 0.10 0.713 0.791 0.843 0.15 0.630 0.669 0.718 Phase-flip noise Under phase-flip noise, the X-basis repetition code corrected Z-type errors using the same majority vote logic applied to X-basis measurements. The scaling trend was identical to the bit-flip experiment: n = 5 consistently outperformed n = 3, which outperformed the baseline at every tested error rate (Fig. 2 , Table 2 ). Numerical results were nearly identical between the bit-flip and phase-flip experiments, consistent with the mathematical symmetry between X and Z error types under a Hadamard transformation. Theoretical predictions again matched simulation closely throughout. Figure 2 . Phase-flip noise: logical success probability vs. p. X-basis repetition codes (encoding |+⟩) were tested against phase-flip noise. The scaling trend (n = 5 > n = 3 > baseline) matched the bit-flip results, consistent with the mathematical equivalence of the two noise types under a Hadamard transformation. Table 2 Table 2 Logical success probability under phase-flip noise at selected error rates. Encoding used X-basis (|+⟩). Same format as Table 1 . Error rate p Baseline (n = 1) n = 3 n = 5 0.00 1.000 1.000 1.000 0.02 0.924 0.984 0.996 0.05 0.824 0.909 0.966 0.10 0.713 0.791 0.843 0.15 0.630 0.669 0.718 Depolarizing noise Depolarizing noise applies X, Y, and Z errors with equal probability and represents the most realistic of the three noise models tested. We tested both Z-basis and X-basis repetition codes against their respective unprotected baselines. At p = 0.10, the Z-basis baseline achieved 0.833 logical success, while n = 3 reached 0.923 and n = 5 reached 0.962, corresponding to a gain of 0.129 logical success probability from baseline to n = 5 (Fig. 3 , Table 3 ). This improvement was larger than observed under single-axis noise alone, because the repetition code partially corrected both the X and Z components of the depolarizing channel. The same scaling trend held across all tested error rates for both code families. Figure 3 . Depolarizing noise: logical success probability vs. p. Both Z-basis (solid) and X-basis (dashed) repetition codes are shown against their respective baselines. The improvement from baseline to n = 5 was larger under depolarizing noise than under single-axis noise, because the repetition code partially corrected both error components. Table 3 Table 3 Logical success probability under depolarizing noise (Z-basis code) at selected error rates. Same format as Table 1 . Error rate p Baseline (n = 1) n = 3 n = 5 0.00 1.000 1.000 1.000 0.02 0.968 0.992 0.998 0.05 0.916 0.969 0.990 0.10 0.833 0.923 0.962 0.15 0.759 0.862 0.916 Scaling trend and theory validation The scaling trend n = 5 > n = 3 > baseline held consistently across all three noise types and all 13 tested error rate values (Fig. 4 ). The differences between code sizes were statistically significant: 95% Wilson confidence intervals for n = 1, n = 3, and n = 5 did not overlap at p ≥ 0.02 for bit-flip and phase-flip noise. Simulation results closely matched theoretical predictions from the exact binomial formula across all conditions (Fig. 5 ), confirming that the Qiskit Aer implementation correctly reproduced the independent-noise model assumed by the formula. Figure 4 . Bar chart of logical success at p = 0.10 for all three noise types. Error bars show 95% Wilson confidence intervals. The n = 5 > n = 3 > baseline ordering held consistently across all noise types, and differences between code sizes were statistically significant (non-overlapping confidence intervals). Figure 5 . Simulation results vs. exact theoretical predictions for all noise types. Solid lines with shaded 95% CI (simulation) are overlaid with dashed theoretical predictions. Close agreement across all code sizes and error rates validated the simulator implementation and confirmed that the repetition code behavior matched the independent-noise model. DISCUSSION The consistent scaling trend observed across all experiments aligned directly with the mathematical basis of the repetition code. The 3-qubit code failed only when two or more of its three qubits were simultaneously flipped, a joint event with probability approximately 3p². The 5-qubit code required three or more simultaneous flip events to fail, with probability approximately 10p³. Because all experiments used p ≤ 0.15, these higher-order terms were substantially smaller than p itself, explaining why larger codes always achieved higher logical success. This power-law suppression is the fundamental reason error correction works: the logical error rate drops faster than the physical error rate as code size increases. The close agreement between simulation and theoretical predictions confirmed that our Qiskit Aer implementation correctly modeled the independent, identically distributed single-qubit noise assumed by the binomial formula. This agreement is meaningful beyond just validating the code: it demonstrated that the theoretical framework used to design error-correcting codes applies accurately to simulated quantum circuits, at least under the idealized noise conditions we tested. Any significant departure from the theoretical curve would have indicated a bug in the simulation or an unmodeled interaction between circuit elements. The nearly identical outcomes of the bit-flip and phase-flip experiments illustrated the intrinsic symmetry between X and Z error types in quantum mechanics. A Hadamard transformation converts X-basis states to Z-basis states and switches X-type errors to Z-type errors and vice versa. This means that a Z-basis repetition code under bit-flip noise is the same as an X-basis code under phase-flip noise. Our findings empirically validated this symmetry. The improvement from baseline to n = 5 was much bigger under depolarizing noise than it was under either type of single-axis noise. This happened because the depolarizing channel makes mistakes in both the X and Z directions. A Z-basis repetition code fixed the X part but not the Z part, and an X-basis code did the opposite. So, either code got rid of some of the total error, which means that the net gain over the unprotected baseline was bigger than a code that only fixes one type of error against one-component noise. One big problem with the repetition code is that each version can only fix one kind of mistake. The Z-basis code doesn't protect against phase-flip errors at all, and the X-basis code doesn't protect against bit-flip errors at all. Neither code got the same relative improvement under depolarizing noise, which has both components at the same time, as it did under the corresponding single-axis noise. To fully protect against random single-qubit errors, code designs need to be more complex. The Shor code ( 3 ) uses nine physical qubits to protect against all single-qubit errors by combining a bit-flip correction code with a phase-flip correction code. The surface code ( 4 ) was used in the Google 2023 demonstration ( 2 ) and is the best practical option for correcting large-scale quantum errors. It protects against all local errors. There were a few more limitations of this study that should be mentioned. We utilized a classical simulator to emulate quantum behavior, deliberately omitting noise sources inherent in actual hardware, such as gate-level errors, crosstalk among adjacent qubits, leakage to elevated energy states, and temporally or spatially correlated errors. Our model assumed that all qubit errors were independent, which is an approximation that doesn't always hold true for real devices. We also used majority vote decoding, which is easy to understand but not the best choice for bigger code sizes. More advanced decoding algorithms, like minimum-weight perfect matching, get more information from the measurement results and fix more mistakes for the same code size. More sophisticated decoding algorithms, such as minimum-weight perfect matching, extract more information from the measurement outcomes and correct more errors for the same code size. Additionally, we only tested code sizes n = 3 and n = 5; extending to n = 7 and n = 9 would confirm whether the scaling trend continues as predicted and at what code size the independent-noise assumption begins to break down. The future work that is to be done for this project is to simulate the Shor code ( 3 ) and the Steane code ( 7 ) to compare their performance with that of the repetition code under the same noisy conditions. Another future work is to compare the prediction of our simulations with the actual performance of quantum hardware that can be accessed via IBM Quantum's cloud services. This will show how well our independent noisy model predicts the performance of real quantum hardware. To summarize, the simulations were conducted to verify the prediction of the repetition code theory that larger repetition codes are more effective at suppressing logical errors than smaller ones. The prediction of the theory is statistically significant under all noisy conditions. The simulations were conducted using freely available software, demonstrating that the basic principles of quantum error correction are accessible without having access to quantum hardware. MATERIALS AND METHODS Simulation environment All quantum circuit simulations were carried out using the Qiskit Aer package ( 5 ), which is a free open-source quantum circuit simulator provided by IBM. The programming environment used is Python 3.11. The library used for numerical computation is NumPy, and Matplotlib is the library used for figure generation. There is no quantum hardware involved at any point of the experiment. All the code is provided in the GitHub repository given in the reference list ( 5 ) and in the Appendix. Circuit construction For each code size n ∈ {1, 3, 5} and each noise model, a quantum circuit was constructed as follows. The logical qubit was initialized in state |0⟩ for Z-basis experiments (bit-flip noise and depolarizing Z-basis) or in state |+⟩ for X-basis experiments (phase-flip noise and depolarizing X-basis), the latter achieved by applying a Hadamard gate to |0⟩. For n > 1, the logical qubit was encoded by applying CNOT gates from qubit 0 to qubits 1 through n − 1, producing an n-fold copy of the initial state. Four idle time steps were then applied, during which noise was injected according to the selected noise model. All n qubits were measured in the computational basis. For X-basis experiments, a Hadamard gate was applied to each qubit immediately before measurement to rotate back to the computational basis prior to readout. Noise models Three noise models were constructed using Qiskit Aer's noise module. For bit-flip noise, a single-qubit bit-flip channel with error parameter p was applied to each qubit at each of the four idle steps, randomly flipping the qubit state from |0⟩ to |1⟩ (or |1⟩ to |0⟩) with probability p. For phase-flip noise, a single-qubit phase-flip channel with parameter p was applied identically, randomly flipping the phase of the superposition with probability p. For depolarizing noise, a single-qubit depolarizing channel with parameter p was applied, which applies the X, Y, or Z Pauli operator with equal probability p/3 each, or leaves the qubit state unchanged with probability 1 − p. Decoding The n-bit measurement string was then decoded by majority vote to obtain the logical output, which was 0 if more than n/2 qubits output 0, and 1 otherwise. Logical success was defined as the output being equal to the logical value initially. The probability of logical success was calculated as the number of successful decoding results divided by 4,000 for each data point. A constant random number generator seed value of 12345 was used for all simulations. Error rate sweep The physical error rate p was swept across 13 values: 0.00, 0.01, 0.02, 0.04, 0.06, 0.08, 0.10, 0.11, 0.12, 0.13, 0.14, and 0.15. Each combination of code size, noise type, and error rate was run as a separate simulation job in Qiskit Aer using the AerSimulator backend. Theoretical predictions Because noise was applied over four idle steps per qubit, the effective per-qubit flip probability was calculated as p_eff = (1/2)[1 − (1 − 2p)^4]. The exact logical failure probability was then computed from the binomial formula: P_fail(p_eff, n) = Σ C(n,k) × p_eff^k × (1−p_eff)^(n − k), where the sum runs from k = ⌈(n + 1)/2⌉ to k = n. Logical success probability was defined as 1 − P_fail. These theoretical values were computed using NumPy and overlaid on all simulation result figures as dashed lines. Statistical analysis To compute the ninety-five percent confidence intervals of each logical success probability estimate, the Wilson score interval method ( 6 ) was employed, which has been proven to give accurate coverage for binomial proportions over the entire range of probability values, including those close to 0 or 1, for which the normal distribution method has been known to fail. Each computation of the logical success probability estimate was done with 4,000 independent Bernoulli trials, or simulation shots. Non-overlapping confidence intervals between code sizes were considered as evidence of statistically significant difference. Declarations CONFLICTS OF INTEREST The authors declare they have no conflicts of interest. ACKNOWLEDGMENTS The authors thank their families and mentors for their encouragement and guidance throughout this project. All simulations were performed using free, open-source software including Python, Qiskit, NumPy, and Matplotlib. DATA AND CODE AVAILABILITY All Python source code used to run simulations and generate figures is available at the GitHub repository https://github.com/VBerri/qiskit-qec-noise-sim provided as supplementary material. The repository contains: src/qc1ec/circuits.py (circuit construction), src/qc1ec/noise.py (noise model definitions), src/qc1ec/decode.py (majority vote decoder), src/qc1ec/experiments.py (experiment runner). References Nielsen MA (2000) and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press Google Quantum AI (2023) Suppressing Quantum Errors by Scaling a Surface Code Logical Qubit. Nature, vol. 614, pp. 676–681. https://doi.org/10.1038/s41586-022-05434-1 Shor PW (1995) Scheme for Reducing Decoherence in Quantum Computer Memory. Phys Rev A 52:R2493–R2496. https://doi.org/10.1103/PhysRevA.52.R2493 Fowler AG et al (2012) Phys Rev A 86:032324. https://doi.org/10.1103/PhysRevA.86.032324 . Surface Codes: Towards Practical Large-Scale Quantum Computation. Qiskit contributors (2023) Zenodo. https://doi.org/10.5281/zenodo.2573505 . Qiskit: An Open-Source Framework for Quantum Computing. Wilson EB (1927) Probable Inference, the Law of Succession, and Statistical Inference. J Am Stat Assoc 22:209–212. https://doi.org/10.2307/2276774 Steane AM (1996) Error Correcting Codes in Quantum Theory. Phys Rev Lett 77:793–797. https://doi.org/10.1103/PhysRevLett.77.793 Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9261358","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":614221191,"identity":"0b1f7918-cef2-4172-91fc-85baa35a053d","order_by":0,"name":"Sanjeev Tamilselvan","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA00lEQVRIiWNgGAWjYFAD9gYgYWBBihaeAyAtEqRokUgAk4QVyrefPfyZt80uT37m86sbfhRIMPC3dyfg1WJwJi9Nmrctudjgdk7ZzR6gwyTOnN2AXwtDjhkzzxnmxA3SOWk3eIBaDCRy8WuR739j/JnnTH3i/Jln0m7+IUYLw40cA2meisOJDTfYj90myhaDG2/MJOdUHE/ccCaH7baMgQQPQb/I9+cYf3hjUJ04v/34s5tv/tjI8bf3EnAYAvAYgElilYMA+wNSVI+CUTAKRsEIAgCUfUZB3xYr7wAAAABJRU5ErkJggg==","orcid":"","institution":"Northview High School","correspondingAuthor":true,"prefix":"","firstName":"Sanjeev","middleName":"","lastName":"Tamilselvan","suffix":""},{"id":614221192,"identity":"628f9581-ee7d-444f-bfd1-4e707c27e402","order_by":1,"name":"Tanuj Ranjith","email":"","orcid":"","institution":"B. Reed Henderson High School","correspondingAuthor":false,"prefix":"","firstName":"Tanuj","middleName":"","lastName":"Ranjith","suffix":""}],"badges":[],"createdAt":"2026-03-30 00:52:45","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-9261358/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9261358/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":105780753,"identity":"0c4839cd-54e0-4358-bfb0-a8b6b4656e89","added_by":"auto","created_at":"2026-03-31 04:55:52","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":109191,"visible":true,"origin":"","legend":"\u003cp\u003eBit-flip noise: logical success probability vs. physical error rate p. Solid lines show simulation results for n=1 (gray), n=3 (blue), and n=5 (red) with shaded 95% Wilson confidence intervals. Dashed lines show exact theoretical predictions. Larger codes achieved higher logical success at all tested error rates.\u003c/p\u003e","description":"","filename":"image1.png","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/7366e1290f10533ad21a804f.png"},{"id":105780828,"identity":"91ef800c-6f72-4b15-ab9b-bc5d9cd721b8","added_by":"auto","created_at":"2026-03-31 04:56:11","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":110773,"visible":true,"origin":"","legend":"\u003cp\u003ePhase-flip noise: logical success probability vs. p. X-basis repetition codes (encoding |+⟩) were tested against phase-flip noise. The scaling trend (n=5 \u0026gt; n=3 \u0026gt; baseline) matched the bit-flip results, consistent with the mathematical equivalence of the two noise types under a Hadamard transformation.\u003c/p\u003e","description":"","filename":"image2.png","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/b1ff0bbe7bcc270edba93937.png"},{"id":105780735,"identity":"b189fe45-7843-48fe-a13e-47d204216f85","added_by":"auto","created_at":"2026-03-31 04:55:44","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":138514,"visible":true,"origin":"","legend":"\u003cp\u003eDepolarizing noise: logical success probability vs. p. Both Z-basis (solid) and X-basis (dashed) repetition codes are shown against their respective baselines. The improvement from baseline to n=5 was larger under depolarizing noise than under single-axis noise, because the repetition code partially corrected both error components.\u003c/p\u003e","description":"","filename":"image3.png","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/43edc7229b0bbd1ec72d08a9.png"},{"id":105780733,"identity":"6aa784c1-d8fb-407c-b448-e5baca734f18","added_by":"auto","created_at":"2026-03-31 04:55:44","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":57989,"visible":true,"origin":"","legend":"\u003cp\u003eBar chart of logical success at p=0.10 for all three noise types. Error bars show 95% Wilson confidence intervals. The n=5 \u0026gt; n=3 \u0026gt; baseline ordering held consistently across all noise types, and differences between code sizes were statistically significant (non-overlapping confidence intervals).\u003c/p\u003e","description":"","filename":"image4.png","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/919fce24ec3bcf174e7e8ea6.png"},{"id":105780752,"identity":"764ec7e1-6357-4230-9b0f-a6f5c0fed9ff","added_by":"auto","created_at":"2026-03-31 04:55:52","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":304083,"visible":true,"origin":"","legend":"\u003cp\u003eSimulation results vs. exact theoretical predictions for all noise types. Solid lines with shaded 95% CI (simulation) are overlaid with dashed theoretical predictions. Close agreement across all code sizes and error rates validated the simulator implementation and confirmed that the repetition code behavior matched the independent-noise model.\u003c/p\u003e","description":"","filename":"image5.png","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/95856c6923007ab18418d587.png"},{"id":105904378,"identity":"49cf9a7d-b4b4-401b-8423-e9c112642c2e","added_by":"auto","created_at":"2026-04-01 10:07:51","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1157840,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9261358/v1/82050234-e67f-4961-a72d-2337fae66dbd.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eQubit Error Correction in Quantum Computing Simulations: Do Larger Repetition Codes Reduce Logical Errors?\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"INTRODUCTION","content":"\u003cp\u003eQuantum computers could solve problems that regular computers can't, and they could be used in drug discovery, materials science, optimization, and cryptography (\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e). Quantum bits (qubits) can be in superposition states that store combinations of both values at the same time, unlike classical bits, which can only be 0 or 1. This property allows for types of computation that classical machines can't do well, but it also makes qubits very sensitive to changes in their surroundings. Thermal fluctuations, electromagnetic interference, and unwanted connections to nearby systems can change the states of qubits through a process called decoherence. This can cause errors that mess up the results of quantum calculations.\u003c/p\u003e \u003cp\u003eThis sensitivity to noise is one of the biggest problems that makes it hard to build useful quantum computers. Errors happen even when you do one gate operation, and as circuits get bigger, the errors build up faster than useful computation can happen. To solve this problem, scientists came up with quantum error correction (QEC), which is a group of methods that keep quantum information safe by spreading a single logical qubit across several physical qubits. If one or more physical qubits make mistakes, the logical qubit can still be recovered from the other qubits that are not corrupted, as long as the number of errors at the same time is less than the code's correction capacity.\u003c/p\u003e \u003cp\u003eThe simplest QEC strategy is the repetition code, in which a logical qubit value is copied across n physical qubits and recovered by majority vote after measurement. For example, a logical 0 encoded in three qubits becomes |000⟩; if one qubit flips to give |010⟩, the majority vote returns the correct value 0. The logical failure probability for an n-qubit repetition code scales as p^(\u0026lceil;(n\u0026thinsp;+\u0026thinsp;1)/2\u0026rceil;), where p is the per-qubit error rate, meaning that larger codes exponentially suppress logical errors when p is small.\u003c/p\u003e \u003cp\u003eGoogle Quantum AI showed on real superconducting hardware in 2023 that larger surface code logical qubits made fewer logical errors than smaller ones (\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e). This outcome validated a fundamental prediction of Quantum Error Correction (QEC) theory through empirical devices. But real quantum hardware is still hard to get to, and the best way to learn about these ideas is through simulation. IBM's free, open-source quantum circuit simulator Qiskit Aer makes it possible to do this kind of research on regular computers.\u003c/p\u003e \u003cp\u003eWe used Qiskit Aer to test the repetition code under three noise models representing distinct physical error mechanisms. Bit-flip noise randomly flips the computational state of a qubit with probability p. Phase-flip noise randomly flips the phase of a superposition state with probability p. Depolarizing noise combines both error types, applying a random Pauli operator (X, Y, or Z) with equal probability p/3, making it the most realistic of the three models. We compared simulation results to exact theoretical predictions from the binomial failure probability formula to verify that the simulator matched the mathematical model.\u003c/p\u003e \u003cp\u003eWe hypothesized that, under all three noise models, the n\u0026thinsp;=\u0026thinsp;5 repetition code would achieve higher logical success probabilities than the n\u0026thinsp;=\u0026thinsp;3 code at all tested error rates, and that both would outperform the unprotected single-qubit baseline. We further hypothesized that simulation results would closely match exact theoretical predictions throughout.\u003c/p\u003e"},{"header":"RESULTS","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003eBit-flip noise\u003c/h2\u003e \u003cp\u003eUnder bit-flip noise, the Z-basis repetition code consistently improved logical success probability over the unprotected baseline at all tested error rates (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). At p\u0026thinsp;=\u0026thinsp;0.02, the baseline achieved 0.924 logical success, while n\u0026thinsp;=\u0026thinsp;3 reached 0.984 and n\u0026thinsp;=\u0026thinsp;5 reached 0.996. At p\u0026thinsp;=\u0026thinsp;0.10, the baseline fell to 0.713, whereas n\u0026thinsp;=\u0026thinsp;3 achieved 0.791 and n\u0026thinsp;=\u0026thinsp;5 achieved 0.843 (Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). At p\u0026thinsp;=\u0026thinsp;0.15, the baseline achieved 0.630, n\u0026thinsp;=\u0026thinsp;3 achieved 0.669, and n\u0026thinsp;=\u0026thinsp;5 achieved 0.718. In all cases, n\u0026thinsp;=\u0026thinsp;5 outperformed n\u0026thinsp;=\u0026thinsp;3, and n\u0026thinsp;=\u0026thinsp;3 outperformed the baseline. Exact theoretical predictions from the binomial failure probability formula matched simulation values closely across the full range of tested error rates, with residuals falling within the expected statistical variation for 4,000 shots (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e, dashed lines).\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure \u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e. Bit-flip noise: logical success probability vs. physical error rate p. Solid lines show simulation results for n\u0026thinsp;=\u0026thinsp;1 (gray), n\u0026thinsp;=\u0026thinsp;3 (blue), and n\u0026thinsp;=\u0026thinsp;5 (red) with shaded 95% Wilson confidence intervals. Dashed lines show exact theoretical predictions. Larger codes achieved higher logical success at all tested error rates.\u003c/p\u003e \u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eLogical success probability under bit-flip noise at selected error rates. Values are the fraction of 4,000 simulation shots decoded correctly. CI\u0026thinsp;=\u0026thinsp;95% Wilson confidence interval. Baseline\u0026thinsp;=\u0026thinsp;n\u0026thinsp;=\u0026thinsp;1 (unprotected).\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eError rate p\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eBaseline (n\u0026thinsp;=\u0026thinsp;1)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;3\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;5\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.02\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.924\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.984\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.996\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.05\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.824\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.909\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.966\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.713\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.791\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.843\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.630\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.669\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.718\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003c/div\u003e\n\u003ch3\u003ePhase-flip noise\u003c/h3\u003e\n\u003cp\u003eUnder phase-flip noise, the X-basis repetition code corrected Z-type errors using the same majority vote logic applied to X-basis measurements. The scaling trend was identical to the bit-flip experiment: n\u0026thinsp;=\u0026thinsp;5 consistently outperformed n\u0026thinsp;=\u0026thinsp;3, which outperformed the baseline at every tested error rate (Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e, Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e). Numerical results were nearly identical between the bit-flip and phase-flip experiments, consistent with the mathematical symmetry between X and Z error types under a Hadamard transformation. Theoretical predictions again matched simulation closely throughout.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e. Phase-flip noise: logical success probability vs. p. X-basis repetition codes (encoding |+⟩) were tested against phase-flip noise. The scaling trend (n\u0026thinsp;=\u0026thinsp;5\u0026thinsp;\u0026gt;\u0026thinsp;n\u0026thinsp;=\u0026thinsp;3\u0026thinsp;\u0026gt;\u0026thinsp;baseline) matched the bit-flip results, consistent with the mathematical equivalence of the two noise types under a Hadamard transformation.\u003c/p\u003e \u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eLogical success probability under phase-flip noise at selected error rates. Encoding used X-basis (|+⟩). Same format as Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e.\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eError rate p\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eBaseline (n\u0026thinsp;=\u0026thinsp;1)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;3\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;5\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.02\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.924\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.984\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.996\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.05\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.824\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.909\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.966\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.713\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.791\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.843\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.630\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.669\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.718\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e\n\u003ch3\u003eDepolarizing noise\u003c/h3\u003e\n\u003cp\u003eDepolarizing noise applies X, Y, and Z errors with equal probability and represents the most realistic of the three noise models tested. We tested both Z-basis and X-basis repetition codes against their respective unprotected baselines. At p\u0026thinsp;=\u0026thinsp;0.10, the Z-basis baseline achieved 0.833 logical success, while n\u0026thinsp;=\u0026thinsp;3 reached 0.923 and n\u0026thinsp;=\u0026thinsp;5 reached 0.962, corresponding to a gain of 0.129 logical success probability from baseline to n\u0026thinsp;=\u0026thinsp;5 (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e, Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e). This improvement was larger than observed under single-axis noise alone, because the repetition code partially corrected both the X and Z components of the depolarizing channel. The same scaling trend held across all tested error rates for both code families.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e. Depolarizing noise: logical success probability vs. p. Both Z-basis (solid) and X-basis (dashed) repetition codes are shown against their respective baselines. The improvement from baseline to n\u0026thinsp;=\u0026thinsp;5 was larger under depolarizing noise than under single-axis noise, because the repetition code partially corrected both error components.\u003c/p\u003e \u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab3\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eLogical success probability under depolarizing noise (Z-basis code) at selected error rates. Same format as Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e.\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eError rate p\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eBaseline (n\u0026thinsp;=\u0026thinsp;1)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;3\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003en\u0026thinsp;=\u0026thinsp;5\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.000\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.02\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.968\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.992\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.998\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.05\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.916\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.969\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.990\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.833\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.923\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.962\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e0.15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.759\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.862\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.916\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e\n\u003ch3\u003eScaling trend and theory validation\u003c/h3\u003e\n\u003cp\u003eThe scaling trend n\u0026thinsp;=\u0026thinsp;5\u0026thinsp;\u0026gt;\u0026thinsp;n\u0026thinsp;=\u0026thinsp;3\u0026thinsp;\u0026gt;\u0026thinsp;baseline held consistently across all three noise types and all 13 tested error rate values (Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e). The differences between code sizes were statistically significant: 95% Wilson confidence intervals for n\u0026thinsp;=\u0026thinsp;1, n\u0026thinsp;=\u0026thinsp;3, and n\u0026thinsp;=\u0026thinsp;5 did not overlap at p\u0026thinsp;\u0026ge;\u0026thinsp;0.02 for bit-flip and phase-flip noise. Simulation results closely matched theoretical predictions from the exact binomial formula across all conditions (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e), confirming that the Qiskit Aer implementation correctly reproduced the independent-noise model assumed by the formula.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure \u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e. Bar chart of logical success at p\u0026thinsp;=\u0026thinsp;0.10 for all three noise types. Error bars show 95% Wilson confidence intervals. The n\u0026thinsp;=\u0026thinsp;5\u0026thinsp;\u0026gt;\u0026thinsp;n\u0026thinsp;=\u0026thinsp;3\u0026thinsp;\u0026gt;\u0026thinsp;baseline ordering held consistently across all noise types, and differences between code sizes were statistically significant (non-overlapping confidence intervals).\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure \u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e. Simulation results vs. exact theoretical predictions for all noise types. Solid lines with shaded 95% CI (simulation) are overlaid with dashed theoretical predictions. Close agreement across all code sizes and error rates validated the simulator implementation and confirmed that the repetition code behavior matched the independent-noise model.\u003c/p\u003e"},{"header":"DISCUSSION","content":"\u003cp\u003eThe consistent scaling trend observed across all experiments aligned directly with the mathematical basis of the repetition code. The 3-qubit code failed only when two or more of its three qubits were simultaneously flipped, a joint event with probability approximately 3p\u0026sup2;. The 5-qubit code required three or more simultaneous flip events to fail, with probability approximately 10p\u0026sup3;. Because all experiments used p\u0026thinsp;\u0026le;\u0026thinsp;0.15, these higher-order terms were substantially smaller than p itself, explaining why larger codes always achieved higher logical success. This power-law suppression is the fundamental reason error correction works: the logical error rate drops faster than the physical error rate as code size increases.\u003c/p\u003e \u003cp\u003eThe close agreement between simulation and theoretical predictions confirmed that our Qiskit Aer implementation correctly modeled the independent, identically distributed single-qubit noise assumed by the binomial formula. This agreement is meaningful beyond just validating the code: it demonstrated that the theoretical framework used to design error-correcting codes applies accurately to simulated quantum circuits, at least under the idealized noise conditions we tested. Any significant departure from the theoretical curve would have indicated a bug in the simulation or an unmodeled interaction between circuit elements.\u003c/p\u003e \u003cp\u003eThe nearly identical outcomes of the bit-flip and phase-flip experiments illustrated the intrinsic symmetry between X and Z error types in quantum mechanics. A Hadamard transformation converts X-basis states to Z-basis states and switches X-type errors to Z-type errors and vice versa. This means that a Z-basis repetition code under bit-flip noise is the same as an X-basis code under phase-flip noise. Our findings empirically validated this symmetry.\u003c/p\u003e \u003cp\u003eThe improvement from baseline to n\u0026thinsp;=\u0026thinsp;5 was much bigger under depolarizing noise than it was under either type of single-axis noise. This happened because the depolarizing channel makes mistakes in both the X and Z directions. A Z-basis repetition code fixed the X part but not the Z part, and an X-basis code did the opposite. So, either code got rid of some of the total error, which means that the net gain over the unprotected baseline was bigger than a code that only fixes one type of error against one-component noise.\u003c/p\u003e \u003cp\u003eOne big problem with the repetition code is that each version can only fix one kind of mistake. The Z-basis code doesn't protect against phase-flip errors at all, and the X-basis code doesn't protect against bit-flip errors at all. Neither code got the same relative improvement under depolarizing noise, which has both components at the same time, as it did under the corresponding single-axis noise. To fully protect against random single-qubit errors, code designs need to be more complex. The Shor code (\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e) uses nine physical qubits to protect against all single-qubit errors by combining a bit-flip correction code with a phase-flip correction code. The surface code (\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e) was used in the Google 2023 demonstration (\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e) and is the best practical option for correcting large-scale quantum errors. It protects against all local errors.\u003c/p\u003e \u003cp\u003eThere were a few more limitations of this study that should be mentioned. We utilized a classical simulator to emulate quantum behavior, deliberately omitting noise sources inherent in actual hardware, such as gate-level errors, crosstalk among adjacent qubits, leakage to elevated energy states, and temporally or spatially correlated errors. Our model assumed that all qubit errors were independent, which is an approximation that doesn't always hold true for real devices. We also used majority vote decoding, which is easy to understand but not the best choice for bigger code sizes. More advanced decoding algorithms, like minimum-weight perfect matching, get more information from the measurement results and fix more mistakes for the same code size. More sophisticated decoding algorithms, such as minimum-weight perfect matching, extract more information from the measurement outcomes and correct more errors for the same code size. Additionally, we only tested code sizes n\u0026thinsp;=\u0026thinsp;3 and n\u0026thinsp;=\u0026thinsp;5; extending to n\u0026thinsp;=\u0026thinsp;7 and n\u0026thinsp;=\u0026thinsp;9 would confirm whether the scaling trend continues as predicted and at what code size the independent-noise assumption begins to break down.\u003c/p\u003e \u003cp\u003eThe future work that is to be done for this project is to simulate the Shor code (\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e) and the Steane code (\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e) to compare their performance with that of the repetition code under the same noisy conditions. Another future work is to compare the prediction of our simulations with the actual performance of quantum hardware that can be accessed via IBM Quantum's cloud services. This will show how well our independent noisy model predicts the performance of real quantum hardware. To summarize, the simulations were conducted to verify the prediction of the repetition code theory that larger repetition codes are more effective at suppressing logical errors than smaller ones. The prediction of the theory is statistically significant under all noisy conditions. The simulations were conducted using freely available software, demonstrating that the basic principles of quantum error correction are accessible without having access to quantum hardware.\u003c/p\u003e"},{"header":"MATERIALS AND METHODS","content":"\u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003eSimulation environment\u003c/h2\u003e \u003cp\u003eAll quantum circuit simulations were carried out using the Qiskit Aer package (\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e), which is a free open-source quantum circuit simulator provided by IBM. The programming environment used is Python 3.11. The library used for numerical computation is NumPy, and Matplotlib is the library used for figure generation. There is no quantum hardware involved at any point of the experiment. All the code is provided in the GitHub repository given in the reference list (\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e) and in the Appendix.\u003c/p\u003e \u003c/div\u003e\n\u003ch3\u003eCircuit construction\u003c/h3\u003e\n\u003cp\u003eFor each code size n \u0026isin; {1, 3, 5} and each noise model, a quantum circuit was constructed as follows. The logical qubit was initialized in state |0⟩ for Z-basis experiments (bit-flip noise and depolarizing Z-basis) or in state |+⟩ for X-basis experiments (phase-flip noise and depolarizing X-basis), the latter achieved by applying a Hadamard gate to |0⟩. For n\u0026thinsp;\u0026gt;\u0026thinsp;1, the logical qubit was encoded by applying CNOT gates from qubit 0 to qubits 1 through n\u0026thinsp;\u0026minus;\u0026thinsp;1, producing an n-fold copy of the initial state. Four idle time steps were then applied, during which noise was injected according to the selected noise model. All n qubits were measured in the computational basis. For X-basis experiments, a Hadamard gate was applied to each qubit immediately before measurement to rotate back to the computational basis prior to readout.\u003c/p\u003e \u003cdiv id=\"Sec11\" class=\"Section2\"\u003e \u003ch2\u003eNoise models\u003c/h2\u003e \u003cp\u003eThree noise models were constructed using Qiskit Aer's noise module. For bit-flip noise, a single-qubit bit-flip channel with error parameter p was applied to each qubit at each of the four idle steps, randomly flipping the qubit state from |0⟩ to |1⟩ (or |1⟩ to |0⟩) with probability p. For phase-flip noise, a single-qubit phase-flip channel with parameter p was applied identically, randomly flipping the phase of the superposition with probability p. For depolarizing noise, a single-qubit depolarizing channel with parameter p was applied, which applies the X, Y, or Z Pauli operator with equal probability p/3 each, or leaves the qubit state unchanged with probability 1\u0026thinsp;\u0026minus;\u0026thinsp;p.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec12\" class=\"Section2\"\u003e \u003ch2\u003eDecoding\u003c/h2\u003e \u003cp\u003eThe n-bit measurement string was then decoded by majority vote to obtain the logical output, which was 0 if more than n/2 qubits output 0, and 1 otherwise. Logical success was defined as the output being equal to the logical value initially. The probability of logical success was calculated as the number of successful decoding results divided by 4,000 for each data point. A constant random number generator seed value of 12345 was used for all simulations.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec13\" class=\"Section2\"\u003e \u003ch2\u003eError rate sweep\u003c/h2\u003e \u003cp\u003eThe physical error rate p was swept across 13 values: 0.00, 0.01, 0.02, 0.04, 0.06, 0.08, 0.10, 0.11, 0.12, 0.13, 0.14, and 0.15. Each combination of code size, noise type, and error rate was run as a separate simulation job in Qiskit Aer using the AerSimulator backend.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec14\" class=\"Section2\"\u003e \u003ch2\u003eTheoretical predictions\u003c/h2\u003e \u003cp\u003eBecause noise was applied over four idle steps per qubit, the effective per-qubit flip probability was calculated as p_eff = (1/2)[1 \u0026minus; (1\u0026thinsp;\u0026minus;\u0026thinsp;2p)^4]. The exact logical failure probability was then computed from the binomial formula: P_fail(p_eff, n) = Σ C(n,k) \u0026times; p_eff^k \u0026times; (1\u0026minus;p_eff)^(n\u0026thinsp;\u0026minus;\u0026thinsp;k), where the sum runs from k = \u0026lceil;(n\u0026thinsp;+\u0026thinsp;1)/2\u0026rceil; to k\u0026thinsp;=\u0026thinsp;n. Logical success probability was defined as 1\u0026thinsp;\u0026minus;\u0026thinsp;P_fail. These theoretical values were computed using NumPy and overlaid on all simulation result figures as dashed lines.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec15\" class=\"Section2\"\u003e \u003ch2\u003eStatistical analysis\u003c/h2\u003e \u003cp\u003eTo compute the ninety-five percent confidence intervals of each logical success probability estimate, the Wilson score interval method (\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e) was employed, which has been proven to give accurate coverage for binomial proportions over the entire range of probability values, including those close to 0 or 1, for which the normal distribution method has been known to fail. Each computation of the logical success probability estimate was done with 4,000 independent Bernoulli trials, or simulation shots. Non-overlapping confidence intervals between code sizes were considered as evidence of statistically significant difference.\u003c/p\u003e \u003c/div\u003e"},{"header":"Declarations","content":"\u003ch2\u003eCONFLICTS OF INTEREST\u003c/h2\u003e \u003cp\u003eThe authors declare they have no conflicts of interest.\u003c/p\u003e\u003ch2\u003eACKNOWLEDGMENTS\u003c/h2\u003e \u003cp\u003eThe authors thank their families and mentors for their encouragement and guidance throughout this project. All simulations were performed using free, open-source software including Python, Qiskit, NumPy, and Matplotlib.\u003c/p\u003e\u003ch2\u003eDATA AND CODE AVAILABILITY\u003c/h2\u003e \u003cp\u003eAll Python source code used to run simulations and generate figures is available at the GitHub repository \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://github.com/VBerri/qiskit-qec-noise-sim\u003c/span\u003e\u003cspan address=\"https://github.com/VBerri/qiskit-qec-noise-sim\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e provided as supplementary material. The repository contains: src/qc1ec/circuits.py (circuit construction), src/qc1ec/noise.py (noise model definitions), src/qc1ec/decode.py (majority vote decoder), src/qc1ec/experiments.py (experiment runner).\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eNielsen MA (2000) and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGoogle Quantum AI (2023) Suppressing Quantum Errors by Scaling a Surface Code Logical Qubit. Nature, vol. 614, pp. 676\u0026ndash;681. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41586-022-05434-1\u003c/span\u003e\u003cspan address=\"10.1038/s41586-022-05434-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eShor PW (1995) Scheme for Reducing Decoherence in Quantum Computer Memory. Phys Rev A 52:R2493\u0026ndash;R2496. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1103/PhysRevA.52.R2493\u003c/span\u003e\u003cspan address=\"10.1103/PhysRevA.52.R2493\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eFowler AG et al (2012) Phys Rev A 86:032324. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1103/PhysRevA.86.032324\u003c/span\u003e\u003cspan address=\"10.1103/PhysRevA.86.032324\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e. Surface Codes: Towards Practical Large-Scale Quantum Computation.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eQiskit contributors (2023) Zenodo. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.5281/zenodo.2573505\u003c/span\u003e\u003cspan address=\"10.5281/zenodo.2573505\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e. Qiskit: An Open-Source Framework for Quantum Computing.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWilson EB (1927) Probable Inference, the Law of Succession, and Statistical Inference. J Am Stat Assoc 22:209\u0026ndash;212. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.2307/2276774\u003c/span\u003e\u003cspan address=\"10.2307/2276774\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSteane AM (1996) Error Correcting Codes in Quantum Theory. Phys Rev Lett 77:793\u0026ndash;797. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1103/PhysRevLett.77.793\u003c/span\u003e\u003cspan address=\"10.1103/PhysRevLett.77.793\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Northview High School","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"quantum, error, repetition, qubit, simulation","lastPublishedDoi":"10.21203/rs.3.rs-9261358/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9261358/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eQuantum computers are powerful tools for certain computational problems, but their fragile quantum states are easily disrupted by environmental noise, causing errors that degrade computational accuracy. Quantum error correction (QEC) addresses this challenge by encoding one logical qubit across multiple physical qubits, so that individual errors can be identified and reversed through redundancy. We used Qiskit Aer, a free open-source quantum circuit simulator, to test the repetition code, one of the simplest QEC methods, under three types of noise: bit-flip, phase-flip, and depolarizing. We compared an unprotected single-qubit baseline (n\u0026thinsp;=\u0026thinsp;1) to 3-qubit (n\u0026thinsp;=\u0026thinsp;3) and 5-qubit (n\u0026thinsp;=\u0026thinsp;5) repetition codes, sweeping the physical error rate p from 0 to 0.15 with 4,000 simulation shots per data point. We hypothesized that larger codes would achieve higher logical success probabilities at all tested noise levels, with n\u0026thinsp;=\u0026thinsp;5 outperforming n\u0026thinsp;=\u0026thinsp;3, which would outperform the unprotected baseline. Our results confirmed this scaling trend across all three noise types. At p\u0026thinsp;=\u0026thinsp;0.10 under bit-flip noise, the baseline achieved 0.713 logical success, while n\u0026thinsp;=\u0026thinsp;3 reached 0.791 and n\u0026thinsp;=\u0026thinsp;5 reached 0.843. At low noise (p\u0026thinsp;=\u0026thinsp;0.02), the n\u0026thinsp;=\u0026thinsp;5 code approached 0.994 logical success. Simulation results closely matched exact theoretical predictions derived from the binomial failure probability formula, validating our experimental implementation. These findings confirm that even the simplest QEC methods provide meaningful error reduction and that larger codes offer greater protection, demonstrating a foundational principle of quantum error correction using only free simulation tools.\u003c/p\u003e","manuscriptTitle":"Qubit Error Correction in Quantum Computing Simulations: Do Larger Repetition Codes Reduce Logical Errors?","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-31 04:55:11","doi":"10.21203/rs.3.rs-9261358/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"7a03bdac-a1ea-4964-a256-ff72c0cf8e93","owner":[],"postedDate":"March 31st, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-03-31T04:55:11+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-31 04:55:11","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9261358","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9261358","identity":"rs-9261358","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.