Basic Info
- Time and Place: 08-12 January 2023 @ IEEE 2023 36th International Conference on VLSI Design
- Paper Title and Link: Automatic Implementation and Evaluation of Error-Correcting Codes for Quantum Computing: An Open-Source Framework for Quantum Error Correction
- Github Repository: MQT QECC
Motivation and Problem Definition
Problem Definition
Noise and Errors in Quantum Computing
In real quantum computers are effected by noise, also called errors, which resulting from two type noises, operational errors and coherence errors
Operational Errors
In quantum computing, operational errors arise when applying operations to qubits due to the inherent susceptibility of quantum computers to small errors. These errors can result in operations not being executed as intended or being slightly altered. To address operational errors, they are often simulated using depolarization errors, which mimic the scenario where a qubit is set to a completely random state, highlighting the challenges in maintaining the integrity of quantum operations in the presence of noise.
Coherence Errors
Arise due to the delicate nature of qubits, leading to limitations in information retention over time. Two main types of coherence errors are identified:amplitude damping, where qubits transition between high and low-energy states, and phase-flip errors, occurring when qubits interact with the environment causing a change in the phase.
These errors pose challenges in maintaining the integrity of quantum information and are crucial considerations in quantum error correction strategies to mitigate the impact of noise and errors in quantum computing systems.
Error Correction
Classical Error Correction
In the classical world, error correction involves encoding information redundantly to detect and correct errors. For instance, using the three-bit repetition code, a sender can protect a single bit ‘0’ by encoding it as ‘000’ (or ‘1’ -> ‘111’) before transmission. In case of a bit-flip error during transmission (distorting the message, e.g., to 001), the receiver can use techniques like a majority vote to infer the original message and correct the error, showcasing the principles of classical error correction through redundancy.
Quantum Error Correction
In quantum error correction, the complexity arises from the fact that measurements in the quantum world impact the system being observed, unlike in classical systems. This necessitates careful handling to prevent the destruction of encoded information during error correction procedures, especially due to the no-cloning theorem which prohibits exact copying of arbitrary quantum states. To introduce redundancy and protect against errors, quantum systems expand the Hilbert space by distributing information across multiple qubits, as demonstrated by encoding a single qubit into a three-qubit state using entanglement operations. For instance, a single qubit is encoded by entangling it with two ancillary qubits, which can be achieved by two CX operations.
$|\psi\rangle=\alpha_0\cdot|0\rangle+\alpha_1\cdot|1\rangle=|\psi_L\rangle=\alpha_0\cdot|000\rangle+\alpha_1\cdot|111\rangle $
The information of $|\psi\rangle (span {|0\rangle,|1\rangle})$ will be encoded state $|\psi_L\rangle$ which is represented in an 8-dimensional Hilbert space($span{|000\rangle,|001\rangle,…,|111\rangle}$).
And this 8-dimensional Hilbert space can be divided to four subspace:
- $C = \text{span}{|000\rangle , |111\rangle}$ (valid state subspace)
- $F1 = \text{span}{|001\rangle , |110\rangle}$ (bit-flip error at the first qubit)
- $F2 = \text{span}{|010\rangle , |101\rangle}$ (bit-flip error at the second qubit)
- $F3 = \text{span}{|100\rangle , |011\rangle}$ (bit-flip error at the third qubit)
By performing a specialized measurement, it is possible to determine which qubits have experienced errors and in which error subspace the encoded quantum state resides, without revealing the original information of the qubit being 0 or 1. This measurement process aids in identifying and correcting errors in quantum information processing systems Besides the above bit-flip errors correction, there are several quantum error correction schemes such as:
CSS Codes (Calderbank-Shor-Steane Codes):
CSS codes are quantum error-correcting codes that consist of two classical error-correcting codes, typically one for bit-flip errors and another for phase-flip errors. By combining these two types of classical codes, CSS codes can correct both types of errors in quantum systems efficiently.
Stabilizer Codes:
Stabilizer codes are a class of quantum error-correcting codes that rely on the concept of stabilizer groups to detect and correct errors in qubits. These stabilizers define sets of operators that commute with the encoded logical operations, allowing for fault-tolerant computation by detecting and correcting errors without disturbing the encoded information.
Surface Code:
The surface code is a specific type of stabilizer code designed to be implemented on 2D lattices or surfaces where physical qubits reside at lattice points and interactions between neighboring qubits enable error detection through syndrome measurements performed on plaquettes or vertices within the lattice structure. Surface code has gained significant attention due to its potential scalability and fault-tolerance properties.
Adaptive Error-Correcting Codes:
These are designed to be optimized for specific types of quantum hardware, tailoring the error correction process to the characteristics of a particular system.
Braiding-based Codes:
These utilize braiding operations on anyons (quasiparticles that emerge in certain topological phases) for fault-tolerant quantum computation.
Topological Quantum Codes:
Based on topological properties of physical systems like anyons or qubits arranged in a specific topology that allows errors to be detected and corrected efficiently.
Note
The no-cloning theorem
states that it is impossible to create an exact copy of an arbitrary unknown quantum state. This fundamental principle in quantum mechanics prevents the perfect replication of quantum information.
Hilbert space
named after David Hilbert, is a mathematical concept used to describe the state space in which quantum systems exist. It provides a framework for representing all possible states of a system and allows for calculations involving these states using vectors and operators. In the context of quantum error correction, expanding the Hilbert space involves distributing information across multiple qubits to introduce redundancy and protect against errors effectively.
Motivation
Quantum error correction is a crucial aspect of quantum computing that aims to mitigate errors that can occur during quantum computations. While there are various error correction schemes available, implementing them effectively is not as straightforward as suggested by a simple example. The presence of noise in quantum systems impacts all operations, including those required for error correction, highlighting the complexity and challenges involved in maintaining the fidelity of quantum states in the presence of errors.
This figure describes how noise affects the fidelity of a quantum state, specifically in the presence of bit-flip errors. It illustrates the impact of error protection schemes on fidelity, showing that while ideal bit-flip error protection can increase fidelity as long as error probability is low, a more realistic scenario with noise affecting error correction operations can lead to a severe drop in fidelity.
This highlights the importance of considering noise in quantum error correction schemes and the need for tailored approaches to maintain fidelity in quantum computations.
- Challenges of applying error correction schemes
- The complexity of applying error correction schemes to quantum circuits
- The need for tailored solutions based on circuit properties and specific quantum computer characteristics.
The proposed framework aims to automate the application of error correction to circuits and enable noise-aware quantum circuit simulation, streamlining the evaluation process.
Note
Fidelity refers to how well a quantum state or operation preserves its original information or characteristics. It is a measure of how closely the output state matches the input state, indicating the accuracy and reliability of a quantum computation process.
Solution Proposal and Result
Solution Proposal
The proposed framework includes the following key features:
- Automates circuit compilation flow, including error-correcting code application.
- Provides quantum circuit simulation with noise-aware capabilities.
- Is flexible and easily extensible for new use cases in quantum computing research and development.
It also integrated other available framework such as Qiskit, Stim, Cirq and Intel Quantum Simulator
This framework is presented to two part:
Compiler
During the compilation process in quantum computing, the quantum circuit is prepared for simulation or execution on a real quantum computer. The main focus lies on automatically applying error-correcting codes to the quantum circuit. Despite the variety of error correction schemes available, they all follow a common set of steps when implemented in a quantum circuit, including
Qubit Encoding
Encode information to enable the detection and correction of errors.
This encoding process involves distributing information across multiple qubits, resulting in logical qubits composed of several physical qubits within the quantum circuit.
The fundamental principle shared by all error-correcting schemes is to enhance fault tolerance by transforming individual qubits into more robust logical units, facilitating error detection and correction
Operation Encoding
After encoding qubits in a quantum circuit, the next step involves adjusting the operations to account for the error correction scheme used.
This adjustment maps the originally intended operations to logical operations that are functionally equivalent but consider the specific qubit encoding applied. The mapping process can be complex and varies depending on the error correction code utilized, leading to support for only certain quantum operations tailored to each error-correcting code.
Error Correction
This process in quantum circuits involves extracting syndromes to identify errors and then applying corrective operations to the logical qubits based on the detected syndromes. The frequency of executing this error correction routine depends on various factors such as the hardware specifications of the quantum computer and the error susceptibility of the application, allowing for flexible adjustment to optimize error correction efficiency.
This adaptive approach ensures that error detection and correction are tailored to the specific characteristics of the quantum system being utilized.
Qubit Decoding
Finally, the logical qubit, which has been encoded across multiple physical qubits, is decoded back to a single physical qubit for measurement. This decoding process ensures that the output qubits are arranged in the same order as the qubits in the original quantum circuit, facilitating measurement and analysis. This step is crucial in the error correction process to ensure accurate and meaningful results in quantum computing applications.
Here is a simple example to explain the process using the bit-flip code and consider the decoding process in detail:
Initial Encoding(Step 1):
In above picture’s, each qubit from the original circuit is transformed into a logical qubit by entangling it with two ancillary qubits. This process creates redundancy that allows for error detection and correction.
Suppose we have a Logical Qubit : $|\psi\rangle=\alpha\cdot|0\rangle+\beta\cdot|1\rangle$,
then Encode $|\psi\rangle$ into 3 physical qubits: $|\psi\rangle=\alpha\cdot|000\rangle+\beta\cdot|111\rangle$,
For state $|0\rangle$: $\alpha\cdot|000\rangle$ and $|1\rangle$: $\beta\cdot|111\rangle$
Quantum Operation Mapping(Step 2)
After encoding, each quantum operation in the original circuit is replicated for every qubit within the logical qubit in. For example, if there was an X (bit-flip) operation in the initial circuit, it will be applied to each individual physical qubit making up the corresponding logical qubit.
Error Detection and Error Correction(Step 3):
To detect errors during computation, projective measurements are performed using additional ancillary (helper) qubits along with controlled Z operations in Step 3. These measurements help determine whether any bit-flip errors have occurred during processing.
If an error is detected through these measurements indicating a bit-flip has happened on one of the physical bits within a logical group of bits (qubits), corrective actions are taken by applying X operations to rectify these errors before proceeding further with decoding and measurement steps.
Suppose an error occurs on the second qubit during computation, leading to:
$|\psi\rangle=\alpha’\cdot|010\rangle+\beta’\cdot|101\rangle$
Decoding Process(Step 4):
To decode back to a single physical qubit for measurement, we need to reverse the encoding steps.
- Apply operations that undo entanglement and consolidate information.
- For each pair of entangled qubits (e.g., first with second, then second with third):
- Perform CNOT gates between pairs of qubits.
- Apply appropriate Pauli-X gate if necessary based on error correction results.
After these steps are completed correctly in reverse order from encoding.
The state should be consolidated back onto one physical qubit as follows.
Final Logical Qubit: $|\psi\rangle=\alpha’’\cdot|0\rangle+\beta’’\cdot|1\rangle$
Measure this final state after decoding for analysis or further processing. The framework provides templates for implementing necessary steps across various error-correcting codes, allowing for easy extension by modifying existing codes or adding new ones. Currently, the framework supports four error-correcting codes:
- Shor Code: for correcting arbitrary single-qubit errors.
- Laflamme Code: for protecting against single-qubit errors.
- Steane Code: for well-studied applications.
- Surface Code: facilitates flexibility and scalability in implementing error correction strategies in quantum computing systems.
Simulator
The framework enables the direct simulation of quantum circuits either w/ or w/o error correction, utilizing various simulation approaches available. This allows for the integration of multiple simulation styles with different hardware models, providing flexibility to select the most suitable simulator based on the specific requirements of each use case within the quantum computing framework.
The author simulated the entanglement circuits (which construct the GHZ state over all qubits) with an increasing number of qubits in multiple simulation styles, which come with their advantages/drawbacks and the most appropriate simulator can be selected for each use case. They we applied depolarization noise with 0.001 % probability to the qubit whenever it has been used. We ran this experiment with Qiskit using three different simulation styles:
- density matrix simulator
- stochastic array-based simulator (with 2000 shots)
- stabilizer-based simulator (with 2000 shots)
The above figure discusses the runtime performance of these simulation styles based on the number of simulated qubits in quantum circuit simulation.
- The density matrix simulator and stochastic array-based simulator show exponential growth in runtime with increasing qubits, while the stabilizer-based simulator exhibits a polynomial runtime.
- Despite longer runtimes, the density matrix simulator allows for simulating arbitrary quantum operations and provides a detailed final state description.
- In contrast, the stochastic array-based simulator only approximates the final quantum state. The author also mentioned that Qiskit is preferred due to its diverse noise-aware quantum circuit simulators and access to real quantum hardware options.
Result
Use-Cases
The author discuss the evaluation of error correction effectiveness using the Steane code in quantum circuits to explores how error correction impacts circuit reliability based on below use-cases:
Use-case 1. Circuit Size
Whether error correction improves the reliability of a circuit substantially depends on its size. For this situation, the author simulated entanglement circuits with varying numbers of dummy operations.
Use-case 2. Frequency of Error Correction
Detecting and correcting errors is a costly operation. The proper frequency with which this routine is performed is critical when applying an error-correcting code. For this, the author simulated entanglement circuits with a decreasing rate of error correction steps.
Use-case 3. The Assumed Hardware Mode
The hardware model, including error types and probabilities, significantly impacts the effectiveness of error correction techniques. When the error probability is high, the additional computational overhead introduced by error correction procedures may actually diminish the quality of the computational results For this, the author simulated the benchmark with increasing error probability with depolarization noise (mimicking gate errors) and amplitude damping errors (mimicking coherence errors).
Benchmarks
They using a benchmark that generates the GHZ state among all qubits as a test case for evaluating the Steane error-correcting code. This benchmark is chosen for its simplicity, scalability, and ability to highlight errors without needing to consider data fragments. The default parameters used in the evaluation include
- depolarization noise with a 0.001% error probability
- error correction applied after 500 uses
- the creation of strongly correlated states for error detection purposes, where entanglement benchmark is used with five qubits and 10,000 dummy operations added to the end of the circuit (the dummy operations do not change the result but are affected by noise).
Beside the above, the author used the entanglement benchmark with two qubits (instead of five), because of they had to use a stochastic array-based simulator for simulating the amplitude damping noise.
As for types of simulators and errors, they use of different simulators to handle specific types of errors in quantum computations.
- The stabilizer-based simulator for depolarization errors.
- The state vector simulator for amplitude damping errors.
Analysis and Aims
The process of conducting stochastic experiments with 2000 shots to generate a probability distribution for measuring specific quantum states, which is used to calculate the “classical” fidelity(Hellinger coefficient) so that can quantifies the similarity between the expected probability distribution in error-free conditions and the actual distribution obtained from the noise-aware quantum circuit simulation.
They choose this measurement instead of the fidelity between the quantum states or the average fidelity because they want to evaluate how a noisy quantum computer affects the “correctness” of the measured final states for specific quantum algorithms.
For these evaluations, they conducted 285 simulations and applied error correction to the quantum circuits 137 times.
Experiments for Use-Cases
Use-case 1. Circuit Size
The figure describes the similarity between expected and actual outcomes as the depth of entanglement circuits increases.
It highlights that error correction becomes more beneficial as the gate depth of the circuit grows, indicating that error correction is most advantageous for complex circuits with a significant number of operations.
This suggests that applying error correction selectively to sufficiently deep circuits can optimize the trade-off between correction effectiveness and computational overhead.
Use-case 2. Frequency of Error Correction
The figure explains that decreasing the frequency of error correction during quantum computation may not always be beneficial. This is because error correction is a resource-intensive process that adds extra operations to the computation. Therefore, finding the right balance between applying error correction and managing the resulting overhead is crucial for optimizing the performance of quantum circuits, as highlighted by the proposed framework in the context of quantum error correction strategies.
Use-case 3. The Assumed Hardware Mode
The figure shows the impact of different error types and probabilities on the effectiveness of error correction schemes in quantum circuits. It highlights that error correction is most beneficial when error probabilities are low, and certain types of errors, such as depolarization errors, can be more effectively mitigated compared to others like amplitude damping errors.
This analysis underscores the importance of understanding and addressing specific error characteristics to optimize error correction strategies in quantum computing applications.
Key Takeaways
Automated Error Correction:
The framework automates the application of error-correcting codes, facilitating efficient implementation without extensive manual effort.
Noise-Aware Simulations:
By incorporating noise models in simulations, the framework provides realistic evaluations of error-correcting codes’ effectiveness.
Case Study Insights:
- Error correction is beneficial for larger circuits with sufficient depth.
- Optimal frequency of error correction steps is critical—too frequent corrections can introduce overhead that outweighs benefits.
- Effectiveness of error correction is dependent on the type and probability of errors, with depolarization errors being more manageable than amplitude damping errors.