A Novel Hybrid Quantum Framework for Assessing Noise Effects on Performance of Shor’s Algorithm

Abstract

This experimental study introduces a hybrid quantum-classical framework aiming to improve the noise robustness of Shor’s algorithm. By incorporating a novel hybrid logic gate into the modular exponentiation phase, the framework stabilizes qubit interactions and decreases decoherence in a noisy environment simulated by IBM Qiskit. Performance evaluation is accomplished by fidelity and entropy analysis across varied noise levels. Comparative benchmarking with conventional techniques, including Shor’s code, Bacon-Shor code, dynamical decoupling, and zero noise extrapolation, demonstrates that the proposed hybrid gate achieves higher fidelity (0.90) and lower entropy (0.33), while preserving minimal resource overhead. These findings highlight the framework’s effectiveness as a hardware-independent, scalable solution for Noisy Intermediate-Scale Quantum (NISQ) devices. Instead, the study offers an approach toward a scalable, error-resilient model to avoid exaggerating scalability. Despite its promising outcomes, study is presently limited to simulations and a single noise model. Future work will explore implementation on real quantum hardware and extend the framework to incorporate a broader range of noise profiles, contributing to the evolution of fault-tolerant quantum computation.

Share and Cite:

Aktar, M. , Akter, J. , Rahman, K. , Nahar, S. , Mahsin-Ul-Islam, M. , Shipon, S. and Sakib, M. (2025) A Novel Hybrid Quantum Framework for Assessing Noise Effects on Performance of Shor’s Algorithm. Journal of Quantum Information Science, 15, 127-146. doi: 10.4236/jqis.2025.154009.

1. Introduction

In order to increase the dependability of quantum calculations, study explores the use of Shor’s algorithm in a noisy quantum environment. Cosmic rays, magnetic field fluctuations, and qubit interactions are examples of environmental elements that generate noise, which deteriorates quantum information and causes operational mistakes. Despite providing some safety, Shor’s nine-qubit code and other QEC (Quantum Error Correction) techniques are still not very effective at correcting complex faults and come with a high qubit overhead. The study presents improvements to Shor’s algorithm using noise-resilient circuit designs in order to overcome these difficulties. These comprise optimized parts, such as the inverse quantum fourier transform, controlled modular exponentiation, and a new AND logic-based hybrid-controlled gate. An AND logic-based architecture was chosen because of its deterministic control behavior, which improves modular exponentiation’s conditional operations. By lowering error propagation, this structure is hypothesized to increase noise resilience in comparison to other logic structures.

The proposed framework is assessed using fidelity and entropy criteria and incorporates synthetic noise data, noise models, and custom gate objects. The findings show enhanced computational dependability and better noise reduction in quantum systems.

1.1. Related Study

1.1.1. Quantum Noise and Error Correction

Decoherence, gate defects, and environmental interactions are the sources of quantum noise, which causes quantum states to diverge from their intended evolution. Numerous Quantum Error Correction Codes (QECC) have been developed to lessen these impacts. One of the earliest QECCs, Shor’s code, corrects bit-flip and phase-flip mistakes by encoding a single logical qubit into nine physical qubits. However, near-term quantum devices, sometimes referred to as Noisy Intermediate-Scale Quantum (NISQ) systems, have difficulties due to the resource overhead of such schemes [1]. Recent research highlights how important fault-tolerant and noise-aware frameworks are. Theodore J. Yoder’s research on “Universal Fault-Tolerant Quantum Computation with Bacon-Shor Codes” significantly contributes to the field of fault-tolerant quantum computing. By leveraging the subsystem nature of Bacon-Shor codes, Yoder proposes a practical, resource-efficient approach to achieving universal FTQC. The proposed methods of gauge fixing and efficient gate implementation address core challenges in error correction, suggesting a pathway toward scalable quantum computation. While challenges remain, particularly concerning noise thresholds and hardware compatibility, Yoder’s work offers a promising blueprint for the future development of fault-tolerant quantum architectures. This research aligns with the broader goal of developing practical, resilient quantum computers that can perform complex computations with high fidelity [2]. By addressing the urgent need for efficient benchmarking of quantum error correction codes, study “Magic Mirror on the Wall, How to Benchmark Quantum Error Correction Codes” by Avimita Chatterjee and Swaroop Ghosh makes a substantial contribution to the field of quantum computing. Studies suggested that the framework offers scholars and practitioners a useful resource and improves comprehension of QEC performance across a range of operational scenarios. The research work will be crucial in directing the creation of more dependable and scalable quantum computing solutions as quantum technologies progress. Chatterjee and Ghosh set the stage for future developments in QEC and its applications in actual quantum systems by developing a thorough benchmarking technique [3].

1.1.2. Deterioration in Shor’s Algorithm Performance

The modular exponentiation and Quantum Fourier Transform (QFT) phases in Shor’s algorithm are particularly susceptible to cumulative noise effects since they depend on multi-qubit controlled gates like CNOT and Toffoli. Shor’s algorithm has been simulated under various noise models in studies like Willsch et al. (2023) to measure fidelity loss [4]. Study found that, particularly in the presence of depolarizing and amplitude-damping noise channels, accuracy sharply decreased as gate depth and noise rates increased.

Kim et al. (2024) and other experimental studies showed that the success probability of Shor ’s method drops significantly with circuit size, even with very low circuit noise. By stabilizing noise in superconducting quantum computers, Kim et al. (2024) present a novel error mitigation methodology that differs from conventional methods that only address noise reduction. Their results show that a steady noise profile improves overall error mitigation, calibration accuracy, and computational fidelity. This strategy lays the groundwork for more dependable quantum computing and speeds up the shift from experimental to practical applications for near-term quantum systems [5].

1.1.3. Simulation and Mitigation Techniques for Quantum Noise

In order to assess algorithm resilience in simulation, recent work has concentrated on modeling quantum noise utilizing synthetic noise channels, such as depolarizing, phase damping, and thermal relaxation noise. Researchers can evaluate algorithm performance under controlled error situations and recreate the behavior of actual quantum systems using these models. Seif et al. (2024) use context-aware compilation to tackle the crucial problem of correlated noise in quantum systems. The dependability of quantum processes is improved by the proposed framework, which combines customized compilation with noise characterisation. This strategy represents a major advancement in the field of practical quantum computing, allowing for the creation of more reliable algorithms and practical implementation [6].

Study on “Improving Zero-noise Extrapolation for Quantum-gate Error Mitigation using a Noise-aware Folding Method” by Leanghok Hour, Myeongseong Go, and Young-Sun Han makes a substantial contribution to the subject of quantum error mitigation. By using a noise-aware framework to solve the inherent constraints of conventional approaches, the novel methodology improves the accuracy of zero-noise extrapolation. Its practical usefulness is supported by experimental validation, which implies that the study’s approach may be essential to enhancing the fidelity of quantum computations on existing and upcoming quantum hardware. The knowledge gained from study will be crucial in creating more dependable quantum systems that can fully utilize the potential of quantum computing as the area develops [7].

In order to increase the fidelity of quantum operations, recent research has focused on characterizing and mitigating noise. By enhancing knowledge of correlated noise in silicon spin qubits, study on “Noise Correlations in a 1D Silicon Spin Qubit Array” by M. B. Donnelly and colleagues significantly advances this field. The authors offer fundamental information that will guide the creation of error mitigation and correction techniques specific to silicon quantum processors by describing noise correlations in a 1D qubit array. Study opens the door for further research on error correction in intricate silicon-based quantum structures and emphasizes how crucial it is to handle correlated noise for scalability. The knowledge gained from this study will be essential in creating more robust and scalable quantum systems as the technology of quantum computing advances, advancing us closer to real-world applications [8].

1.1.4. Conceptual Views of Shor’s Algorithm

An overview of quantum cryptography and the influence of Shor’s algorithm on traditional encryption systems was presented by Ugwuishiwu et al. (2020). The significance of quantum key distribution and the danger that quantum computing presents to RSA-based systems were underlined in the study. Study’s investigation is useful, however, it is theoretical in nature and does not provide an experimental explanation or validation of the noise restrictions in actual quantum systems [9].

1.1.5. Machine Learning-Based Noise Mitigation in Quantum Optimization

By incorporating machine learning methods into noise reduction plans, Sack and Egger (2024) tackled the problems of noise and non-planar graphs in quantum optimization. Method shows promise for developing scalable, practical quantum algorithms. To apply the results to more extensive computing tasks, more research on hybrid machine learning-quantum systems is necessary [10].

Understanding and reducing noise in quantum computing has advanced significantly, according to the examined literature, especially when it comes to Shor’s algorithm. Several methods have been investigated, including machine learning-based optimization, hybrid classical-quantum frameworks, hardware-specific noise reduction strategies, and quantum error correction codes. Although conventional techniques such as Shor’s code offer fundamental error correction, research shows that they are ineffective when dealing with complicated or correlated noise in scalable quantum systems. Recent developments emphasize modeling, gate-level optimization, and system-level integration to improve algorithm reliability. Despite these developments, attaining noise-resilient execution in actual quantum computing remains a significant issue. This emphasizes how crucial it is to create hybrid methods that integrate machine learning, quantum circuits, and classical logic in order to more accurately evaluate and lessen the effects of noise. The framework put out in this study is based on these observations.

Table 1 outlines the drawbacks of the current methods for mitigating noise and highlights the potential solutions offered by the hybrid framework.

Table 1. Comparison of existing techniques and the proposed hybrid quantum framework.

Aspect

Existing Techniques

Identified Gap

Proposed Solution

Quantum Error Correction

Shor’s Code, Bacon-Shor Code, QEC benchmarking frameworks

Limited correction capabilities for complex error types; resource-intensive implementation

Introduce a hybrid classical-quantum logic gate to improve error resilience and reduce qubit decoherence

Noise Mitigation

Zero-noise extrapolation, noise-aware folding, noise stabilization in superconducting qubits

Hardware-specific assumptions; limited scalability across platforms

Use a custom hybrid gate and integrate depolarizing noise model for generalizable noise mitigation

Correlated Noise Handling

Context-aware compilation, experimental noise characterization in silicon qubits

Requires detailed hardware profiling; limited algorithm-specific adaptation

Apply structured noise models (dephasing, amplitude damping, depolarizing) within Shor’s algorithm context

Simulation and Benchmarking

GPU-based simulation (e.g., shorgpu), QEC code performance metrics

No integration of hybrid gates; simulations lack real-world noise fidelity

Simulate Shor’s algorithm in Qiskit with synthetic noise and analyze fidelity/entropy under hybrid gate logic

Optimization with ML

ML-based noise mitigation in QAOA and nonplanar graphs

Applied mainly to optimization problems; not extended to modular exponentiation tasks

Combine classical GCD computation and quantum QFT with hybrid logic for noise-resilient factorization

Cryptographic Relevance

Reviews of Shor’s impact on RSA and post-quantum security

Lacks practical implementation under noise; mostly theoretical synthesis

Provide a noise-aware Shor’s algorithm implementation for assessing quantum threats to cryptography

A comprehensive gap analysis using a grouped bar chart is presented in Figure 1 to better show the relative advantages and disadvantages of our suggested hybrid quantum framework in comparison to other noise mitigation strategies. This graphic emphasizes the seriousness of the holes that have been found and the effectiveness of the suggested fix in all significant technical areas.

Figure 1. Gap analysis of quantum error resilience techniques. Scores range from 0 (poor) to 5 (excellent) across existing methods, gap severity, and the proposed solution.

1.2. Expanded Comparative Analysis

In order to thoroughly assess the efficacy of the suggested hybrid quantum-classical logic gate, a study carried out a quantitative benchmarking analysis against a number of cutting-edge noise mitigation strategies. For accountability, the comparison used the same Qiskit and Aer simulation environment with identical noise models (depolarizing, phase damping, amplitude damping), dynamical decoupling, and Zero-Noise Extrapolation (ZNE), as well as standard quantum error correction codes (Shor’s code, Bacon-Shor code).

These findings show that the hybrid gate uses the fewest resources while achieving the highest fidelity and lowest entropy. The hybrid gate is useful for NISQ (Noisy Intermediate-Scale Quantum)-era devices with constrained qubit counts, in contrast to conventional QEC codes that demand substantial qubit and gate resources. Although ZNE (Zero-Noise Extrapolation)and dynamical decoupling work well, their effectiveness is frequently hardware-dependent and less generalizable. On the other hand, the hybrid gate offers a versatile, hardware-independent approach by combining quantum control and classical logic.

Table 2 [11]-[14] compares different noise-resilient quantum procedures in terms of fidelity, entropy, and resource overhead. Among these crucial performance parameters, the suggested Hybrid Gate stands out for having the best balance.

2. Materials and Methods

Study proposes a hybrid quantum framework aimed at analyzing the impact of noise on Shor’s algorithm. The study approach is divided into five main stages: algorithmic framework construction, hybrid quantum-classical logic gate design, quantum circuit implementation, noise model simulation, and thorough performance assessment.

Table 2. Comparison of noise-resilient quantum methods according to resource overhead, entropy, and fidelity. Across all measures, the suggested Hybrid Gate exhibits the optimum trade-off.

Technique

Fidelity

Entropy

Qubit Overhead

Gate Overhead

Shor’s Code (QEC)

0.82

0.41

High (×9)

High

Bacon-Shor Code

0.84

0.39

Moderate

Moderate

Dynamical Decoupling

0.80

0.44

Low

Moderate

Zero-Noise Extrapolation

0.85

0.38

None

Moderate

Hybrid Gate (Proposed)

0.90

0.33

Low

Low

2.1. Algorithm Formulation

In order to mimic the factorization of a composite number (N = 15) using a selected base (a = 7), Shor’s algorithm is implemented using IBM’s Qiskit framework. A quantum modular exponentiation stage, an inverse Quantum Fourier Transform (QFT), and a classical pre-processing step comprise the procedure. The Euclidean method, a classical post-processing technique, is used to extract the factors from the periodic output.

2.2. Procedural Flow of the Proposed Hybrid Framework

Figure 2 illustrates the overall procedural flow.

2.3. Hybrid Logic Gate Design

2.3.1. Gate Description

The main novelty of this study is the development and implementation of a hybrid logic gate, which combines quantum control mechanisms with classical AND logic. The Gate and Quantum Circuit classes in Qiskit were used to create this gate, which uses several control qubits to carry out conditional actions. It is incorporated into the modular exponentiation subroutine to decrease noise-induced decoherence during entanglement and stabilize qubit interactions.

2.3.2. Mathematical Formalism

Study introduces a hybrid gate that combines classical AND logic with quantum control to enable conditional operations that improve multi-qubit interactions to noise. The gate functions as a controlled operation, similar to a multi-controlled Toffoli (AND) gate, in which the target qubit is only flipped if all control qubits are in the 1 state.

The quantum state is represented by c 1 , c 2 ,, c n ,t , where t is the target qubit and c i are the control qubits. The hybrid gate H AND does the following:

The action of the hybrid gate H AND on the quantum state c 1 , c 2 ,, c n ,t is defined as:

H AND c 1 , c 2 ,, c n ,t={ c 1 , c 2 ,, c n ,t1 if c 1 = c 2 == c n =1 c 1 , c 2 ,, c n ,t otherwise

Figure 2. Procedural flow of the proposed hybrid classical-quantum framework for Shor’s algorithm, including circuit preparation, hybrid gate integration, noise simulation, and performance evaluation.

The hybrid gate is equal to the conventional Toffoli gate in matrix form for the 3-qubit scenario (2 controls, 1 target):

The Toffoli gate (also known as the CCNOT gate) is represented by the following 8 × 8 unitary matrix:

Toffoli=[ 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 ]

A multi-controlled X gate is the generalization for n controls.

2.3.3. Circuit Diagram

For one target (q2) and two controls (q0, q1): Figure 3 shows the hybrid (multi-controlled AND) gate’s circuit diagram, which has two controls and one target.

Figure 3. The hybrid (multi-controlled AND) gate’s circuit schematic shows how it affects the qubits q0, q1 (controls), and q2 (target).

2.3.4. Truth Table of the Hybrid Gate

Table 3 illustrates the logical behavior of the hybrid gate. The flipping of the target qubit occurs only when both control qubits are in the |1 state. For all other input combinations, the target qubit remains unchanged.

Table 3. Truth table of the hybrid logic gate for two control qubits and one target.

Control A

Control B

Target Qubit

Output

0

0

0

1

0

0

0

0

0

1

0

1

This behavior is equivalent to traditional AND logic and is achieved using the QuantumCircuit and Gate modules from Qiskit.

2.3.5. Extended Hybrid Gate Truth Table

The proposed hybrid gate is scalable, regardless of the main goal of this study, which is to improve modular exponentiation stability using a 2-control, 1-target configuration. It can be expanded to accommodate larger quantum systems with more intricate gate behavior. A conceptual design with one control and three data qubits is presented below to illustrate the generalizability of the gate (Table 4).

Table 4. Truth table of the hybrid gate showing control-dependent input-output behavior across three qubits.

No.

C (Control)

T1 (Input)

T2 (Input)

T3 (Input)

T1 (Output)

T2 (Output)

T3 (Output)

1

0

0

0

0

0

0

0

0

0

0

1

0

0

1

0

0

1

0

0

1

0

0

0

1

1

0

1

1

0

1

0

0

1

0

0

0

1

0

1

1

0

1

0

1

1

0

1

1

0

0

1

1

1

1

1

1

1

0

0

0

1

0

0

1

0

0

1

1

0

1

1

0

1

0

1

1

0

1

0

1

1

1

1

1

1

1

0

0

0

0

0

1

1

0

1

0

0

1

1

1

1

0

0

1

0

1

1

1

1

0

1

1

2.4. CNOT-Based Control Logic

The CNOT gate serves as a fundamental building block for implementing this logic in the quantum domain. It flips the target qubit only when its control qubit is in the state |1 . Toffoli (CCNOT) gates extend this principle by enabling a three-qubit controlled AND operation, where the target qubit is flipped only if both control qubits are in the |1 state. Figure 4 shows a CNOT gate’s circuit diagram. The target qubit is conditionally flipped by this two-qubit gate when the control qubit is in the |1 condition. The hybrid AND gate architecture relies heavily on the CNOT gate to enable controlled quantum processes that are vital to the suggested framework.

Figure 4. Circuit diagram for a CNOT gate. When the control qubit is in the |1 state, this two-qubit gate conditionally flips the target qubit. It is an essential part of the hybrid AND gate’s architecture.

Circuit Integration

Figure 5 illustrates a quantum circuit with multiple qubits and quantum gates. Each horizontal line represents a qubit, showing its state throughout the computation. The white circles serve as control points, commonly used in gates like the Controlled-NOT (CNOT) or controlled phase gates. The large circle signifies an operation on a target qubit, such as a NOT gate (X gate) or another single-qubit operation. Dashed lines indicate interactions or dependencies between qubits, such as those found in multi-qubit gates.

Figure 5. Hybrid AND gate implemented with multi-controlled logic in a quantum circuit.

The dots connected to a target gate (like the large circle) suggest a controlled operation. For example, in a CNOT gate, the target qubit is flipped only if the control qubit is in the |1 state. A more general controlled operation, such as a controlled unitary CU, applies the unitary transformation U to the target qubit when the control qubit is in state |1 . When multiple control qubits are connected to a single target, the circuit may represent a multi-controlled gate, such as a Toffoli gate (CCNOT), where the target qubit is flipped only if all control qubits are in the |1 state. If the target operation involves a phase shift, the circuit could represent a controlled phase gate, where a phase factor ei is applied based on the control qubit states. The specific purpose of the circuit depends on its context—it could form part of a quantum algorithm, such as Shor’s algorithm or Grover’s search, where each gate contributes to the overall quantum computation.

This circuit diagram shows the layout of the quantum circuit intended to use a hybrid classical-quantum logic gate to implement Shor’s algorithm. The evolution of the quantum state during the algorithm is represented by the horizontal lines, each of which represents a qubit and to which operations are applied from left to right.

The control qubits, represented by white circles, are commonly seen in gates such as the Controlled-NOT (CNOT) gate and controlled phase gates. Solid circles or X-symbols are used to represent target qubits, and a conditional operation, such as a NOT gate, is applied to them. Dashed lines or vertical connectors between multiple control and target qubits indicate multi-controlled gates, such as the Toffoli gate (CCNOT), which flips the target qubit only when all control qubits are in the state |1 .

This visual framework is used to create the hybrid AND gate in the context of this investigation. It serves as a multi-controlled unitary gate and is incorporated into the modular exponentiation step of Shors algorithm. The objective of this gate is to enhance noise robustness in the quantum algorithm by integrating classical logical control.

Thus, the circuit diagram illustrates the construction of Shor’s algorithm and the integration of classical logic through custom gate design. Hadamard gates are used to generate superposition, followed by controlled modular exponentiation, the inverse Quantum Fourier Transform (QFT), and the final measurement.

2.5. Quantum Circuit Implementation

In order to improve qubit stability and lessen sensitivity to noise in quantum computing systems, the suggested architecture incorporates a novel hybrid quantum logic gate into Shor’s algorithm. By addressing significant shortcomings in existing quantum computational models, this improvement aids in the creation of quantum algorithms that are more reliable and effective. n count +4 qubits are initialized at the start of the quantum circuit. The phase estimation register uses the first n count qubits, and modular arithmetic operations employ the remaining four. The phase estimation qubits are subjected to Hadamard gates in order to produce superposition. Figure 6 illustrates how the inverse Quantum Fourier Transform (QFT), a crucial step in the phase estimation procedure, is implemented. After that, the customized hybrid gate and conventional quantum gates are used to carry out controlled modular exponentiation. The problem’s periodic structure is encoded into the quantum state in this step. The state is then converted into the frequency domain using the inverse Quantum Fourier Transform (QFT), which makes periodicity detection possible.

Figure 6. The structure of the QFT operation employed in this implementation is shown by the Inverse Quantum Fourier Transform Circuit.

2.6. Noise Modeling and Simulation

A depolarizing noise model is used to represent the circuit in order to replicate realistic quantum circumstances. This model mimics flaws in real quantum hardware by introducing random perturbations into the quantum states at the gate level. The noisy quantum circuit is executed using the Qiskit Aer simulator, which supports noise-aware simulation and circuit sampling. Statistical robustness is ensured by running each circuit several times (shots = 1024).

The primary testbed for this study was the depolarizing noise model, which provides an isotropic, hardware-agnostic model of Pauli-type errors and is commonly used as a baseline in quantum-noise benchmarking. Methodically comparing mitigation approaches is made easier by the depolarizing channel, which allows for a simple, flexible parameterization of noise strength. To assess device-dependent behavior and validate the generality of the present results, future research will investigate the different error signatures that can be generated by models representing device-specific processes (e.g., phase-damping for pure dephasing or amplitude-damping for energy relaxation).

2.7. Data Collection and Metric Evaluation

Measurement counts, which indicate the probability distribution over observed quantum states, are compiled from the simulation outputs. Synthetic noise data is also produced at various noise levels to investigate their impact on algorithm performance. Two important performance indicators are assessed:

  • Fidelity: The degree to which the simulated noisy state and the ideal (noise-free) state are similar.

  • Entropy: A measurement of the output distribution’s degree of unpredictability and uncertainty.

The fidelity and entropy of both observable (simulated) and genuine (theoretical) data are calculated. These are employed to examine how algorithmic accuracy gets compromised by noise.

Performance Visualization

Fidelity and entropy are plotted against varying noise levels to visualize how increasing noise affects the algorithm’s performance, offering a clear comparison between ideal and noisy conditions. To quantify these effects, residuals analysis are performed by comparing the observed metrics with the true values, and these deviations are also plotted to highlight the impact of noise. Finally, all generated data—including noise levels, true and observed metrics—is saved to a CSV file, ensuring it is preserved for further analysis and reporting.

2.8. Flow Diagram of the Proposed Framework

Figure 7 shows how the suggested hybrid classical-quantum framework, intended to improve Shor’s algorithm in noisy environments, has an organized flow. With a focus on the function of hybrid logic and noise reduction techniques, the graphic describes every phase of the implementation, from initialization to the final performance analysis.

2.8.1. Start: Initialization Phase

The process starts by setting up the quantum framework to examine Shor’s algorithm in a noisy environment. This involves preparing the computational setup, which includes defining quantum and classical registers and initializing qubits.

Figure 7. Flow diagram illustrating the structured implementation of the proposed hybrid classical-quantum framework for Shor’s algorithm under noise conditions.

2.8.2. Controlled Modular Exponentiation

The initial computational step in Shor’s algorithm is Controlled Modular Exponentiation, a fundamental subroutine. This process performs modular exponentiation using quantum parallelism, playing a vital role in detecting periodicity in factorization problems. It is essential as it sets up the quantum state for subsequent transformations, optimizing the algorithm’s efficiency by harnessing quantum mechanics.

2.8.3. Quantum Fourier Transform (QFT)

The Quantum Fourier Transform (QFT) is then applied to identify periodic patterns within the quantum state. As a fundamental quantum operation, QFT converts the computational basis into the Fourier basis, enabling efficient factorization. This transformation enhances the detection of periodicity, a crucial step in Shor’s algorithm for accurately determining prime factors.

2.8.4. Hybrid Logic Gate

A significant innovation of this framework is the incorporation of a hybrid logic gate, aimed at enhancing computational accuracy and assessing noise effects. This gate functions as a controlled AND operation, utilizing a Toffoli gate and implemented as a custom HybridGate in Qiskit. The integration is achieved through the addhybridgate() function and evaluated QASM to verify its accuracy and resilience to noise. This step is crucial as it introduces a hybrid quantum-classical approach, ensuring the system’s robustness even in noisy quantum environments.

2.8.5. Implement Shor’s Algorithm with Synthetic Data

To test Shor’s algorithm’s performance under several quantum noise models, such as depolarizing, amplitude damping, and dephasing noise, it is applied to synthetic data. This controlled simulation method makes it possible to conduct repeatable tests to evaluate the hybrid framework’s efficacy.

2.8.6. Compression: Fidelity and Entropy

Once the algorithm is executed, the outcomes are evaluated through fidelity and entropy measurements. Fidelity serves as an indicator of how accurately the resulting quantum state aligns with the expected theoretical state, reflecting the precision of the computation. Meanwhile, entropy analysis assesses the extent of information loss caused by noise, providing insights into the effects of quantum state decoherence. These metrics are essential for determining the robustness and efficiency of quantum computations in the presence of noise.

2.8.7. Threshold Evaluation (Fidelity > 0.9)

At this stage, the fidelity of the quantum state is evaluated against a 0.9 threshold. If the fidelity surpasses 0.9, it signifies that the hybrid quantum framework effectively reduces noise while preserving computational accuracy. However, if the fidelity falls below this limit, further enhancements—such as advanced error correction methods or refinements in hybrid gate design—may be necessary to improve performance.

2.8.8. End

The process wraps up with the finalization of noise analysis in Shor’s algorithm. The findings offer crucial insights into the impact of noise on quantum computations and demonstrate how hybrid techniques can improve fault tolerance. This framework provides a structured approach to assessing noise resilience in quantum computing, contributing to the development of more robust and reliable implementations of Shor’s algorithm on noisy quantum systems.

3. Main Results

The study proposes a hybrid quantum framework for assessing how noise affects Shor’s algorithm. The approach combines inverse Quantum Fourier Transform (QFT), quantum modular exponentiation, classical preprocessing, and a novel hybrid logic gate to improve noise robustness. With the use of synthetic datasets and a depolarizing noise model, the analysis concentrates on fidelity and entropy measures, bolstered by residual analyses and visual aids. As well as offering insights for improving quantum computing in realistic noisy environments, the results clarify how well the framework models noise effects.

3.1. Fidelity Analysis

The relationship between fidelity and noise levels in the depolarizing noise model is depicted in Figure 8. From values around unity at low noise levels (0.025) to roughly 0.6 at higher noise intensity (0.200), fidelity drops dramatically. The model’s strong ability to capture fidelity degradation is demonstrated by the tight alignment of the predicted fidelity curve (shown as a smooth blue line) with the observed fidelity data points (cyan scatter). This close match demonstrates that the noise model is accurate and that, despite intrinsic quantum stochastic fluctuations, fidelity decays predictably with increasing noise. Building upon the fidelity analysis, we next examine the residuals to evaluate model accuracy.

Figure 8. Variation in the depolarizing model’s output entropy with increasing noise levels.

3.2. Residual Analysis of Fidelity

Figure 9 displays residuals, which are the variations between observed and expected fidelity, to further evaluate the prediction accuracy of the model. This indicates a strong agreement between the model predictions and the observed data with no significant bias. In general, the results validate the robustness of the implemented noise-resilient Shor algorithm and the effectiveness of the noise model in capturing the impact of noise on fidelity.

Figure 9. Fidelity residuals.

3.3. Entropy Variation with Noise

The analysis of entropy about noise levels illustrated in Figure 10 reveals a strong linear relationship, as illustrated in the “Entropy vs. Noise Levels” graph. The entropy increases consistently with noise, starting near 0.0 at minimal noise levels and reaching approximately 0.35 at maximum noise levels. The true entropy curve, shown by the red line, aligns closely with the observed entropy values, represented as yellow dots, confirming the reliability and accuracy of the entropy model. This proportional increase in entropy with rising noise levels underscores the significant impact of noise on the system’s disorder.

Figure 10. Entropy vs. noise levels.

Figure 11 “Entropy Residuals” graph further validates the model, with residuals scattered around zero and exhibiting no discernible bias or trend. The consistent variance in residuals indicates the robustness and stability of entropy predictions across various noise levels. Overall, the findings highlight the critical influence of noise on entropy and stress the importance of effective noise management to preserve the performance and reliability of quantum systems.

Figure 11. Entropy residuals.

The proposed hybrid quantum framework successfully mimics the impact of noise on Shor’s algorithm, as shown by the fidelity and entropy evaluations. The correctness and resilience of the noise model and hybrid gate design are confirmed by the high agreement between the expected and observed data over a range of noise levels. These findings demonstrate how this approach may be used to increase the noise resilience of quantum calculations, opening the door for more dependable and scalable quantum algorithms in real-world noisy settings.

4. Conclusions and Suggestions

This study introduces a hybrid classical-quantum logic circuit to Shor’s algorithm to make it more resilient in noisy settings. Through fidelity and entropy investigation across a range of depolarizing noise levels, the suggested hybrid approach demonstrates a considerable reduction in noise impacts while maintaining computational accuracy. The method shows promise for NISQ-era devices since it accomplishes these improvements with less resource overhead than traditional error repair and mitigation techniques.

Although the results reported here were a tractable demonstration using N=15 , there are major resource and engineering problems when using the suggested hybrid framework to cryptographically significant integers. While the number of logical qubits increases with the bit-length of N , the depth of modular-exponentiation circuits increases quickly with the cost of arithmetic operations. Significant physical-qubit overhead and more intricate classical-quantum management result from these considerations, which also increase error accumulation and probably call for fault-tolerant encodings or sophisticated error-mitigation strategies. To lower overhead and improve scalability, future studies will measure these resource needs for more complex issues and investigate optimizations such as approximate arithmetic, hierarchical hybridization, and better arithmetic circuits.

In addition to Shor’s algorithm, the hybrid gate approach may be used in other noise-sensitive quantum algorithms where error propagation reduction is crucial, such as simulation routines, quantum phase estimation, and hybrid variational methods. Lastly, as our study depends on simulation, the most important next phase is to validate the framework on actual quantum hardware. These tests will shed light on calibration limitations, device-specific noise procedures, and hardware-aware improvements to the hybrid architecture.

All things considered, this study lays the groundwork for hybrid gate architectures that improve noise resilience by fusing quantum logic and classical control, providing a route toward scalable and error-resistant quantum computing.

Acknowledgements

The authors gratefully acknowledge the support and resources provided by the Department of Computer Science and Engineering, World University of Bangladesh. We appreciate the constructive feedback from reviewers and editors, which helped improve the quality of this work.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Shor, P.W. (1995) Scheme for Reducing Decoherence in Quantum Computer Memory. Physical Review A, 52, R2493-R2496.[CrossRef] [PubMed]
[2] Yoder, T.J. (2017) Universal Fault-Tolerant Quantum Computation with Bacon-Shor Codes.
https://arxiv.org/abs/1705.01686
[3] Chatterjee, A. and Ghosh, S. (2024) Magic Mirror on the Wall, How to Benchmark Quantum Error Correction Codes, Overall? 2024 IEEE International Conference on Quantum Computing and Engineering (QCE), Montréal, 15-20 September 2024, 356-367.
[4] Willsch, D., Willsch, M., Jin, F., De Raedt, H. and Michielsen, K. (2023) Large-Scale Simulation of Shor’s Quantum Factoring Algorithm. Mathematics, 11, Article 4222.[CrossRef]
[5] Kim, Y., Govia, L.C.G., Dane, A., van den Berg, E., Zajac, D.M., Mitchell, B., et al. (2025) Error Mitigation with Stabilized Noise in Superconducting Quantum Processors. Nature Communications, 16, Article No. 8439.[CrossRef]
[6] Seif, A., Liao, H., Tripathi, V., Krsulich, K., Malekakhlagh, M., Amico, M., et al. (2024) Suppressing Correlated Noise in Quantum Computers via Context-Aware Compiling. 2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA), Buenos Aires, 29 June-3 July 2024.
[7] Hour, L., Go, M. and Han, Y. (2024) Improving Zero-Noise Extrapolation for Quantum-Gate Error Mitigation Using a Noise-Aware Folding Method.
[8] Donnelly, M., Rowlands, J., Kranz, L., Hsueh, Y., et al. (2024) Noise Correlations in a 1d Silicon Spin Qubit Array.
[9] Ugwuishiwu, C.H., Orji, U.E., Ugwu, C.I. and Asogwa, C.N. (2020) An Overview of Quantum Cryptography and Shor’s Algorithm. International Journal of Advanced Trends in Computer Science and Engineering, 9, 7487-7495.
[10] Sack, S.H. and Egger, D.J. (2024) Large-Scale Quantum Approximate Optimization on Nonplanar Graphs with Machine Learning Noise Mitigation. Physical Review Research, 6, Article 013223.[CrossRef]
[11] Steffen, M. (2022) Differences in Error Suppression, Mitigation, and Correction.
https://www.ibm.com/quantum/blog/quantum-error-suppression-mitigation-correction
[12] Xiong, Y., Chandra, D., Ng, S.X. and Hanzo, L. (2020) Sampling Overhead Analysis of Quantum Error Mitigation: Uncoded vs. Coded Systems. IEEE Access, 8, 228967-228991.[CrossRef]
[13] Cai, Z., Babbush, R., Benjamin, S.C., Endo, S., et al. (2022) Quantum Error Mitigation.
https://arxiv.org/abs/2210.00921
[14] Cirstoiu, C., Dilkes, S., Mills, D., Sivarajah, S. and Duncan, R. (2023) Volumetric Benchmarking of Error Mitigation with Qermit. Quantum, 7, 1059.[CrossRef]

Copyright © 2026 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.