Error mitigation on Amazon Braket with program sets and Mitiq

Summarize this article with:
To get the most out of today’s noisy quantum computers, quantum computational experiments commonly utilize quantum error mitigation (QEM) techniques. These methods include discarding known noisy results (post selection), modifying underlying pulse sequences, amplifying noise within a quantum circuit, and many more. QEM does not offer fault tolerant or error-free means of computation but can generally be used to improve the quality of a result, for example increasing signal from noise via repeated observations.post, you will learn how Amazon Braket’s program sets can be used for error mitigation with toolkits such as Mitiq to improve quantum computational accuracy while substantially reducing task-related costs. Using program sets, we performed a 30-qubit error mitigation experiment on Rigetti’s Ankaa-3 processor that achieved more than 12x reduction in error with an 86x reduction in task costs. Here, we highlight some common error mitigation techniques, detailed in new notebooks in the Amazon Braket Examples repository.Amazon Braket’s program sets are well suited for common error mitigation tasks on today’s quantum devices, as many variations of a single quantum circuit are required. With program sets, you can submit multiple circuits in a single task, which speeds up execution times and decreases the total cost for task submissions.Figure 1. Depicts how an error mitigated workflow can generate multiple copies – here from an observable, a set of noise amplified circuits for use in zero-noise extrapolation, and variations from Pauli twirling. These can all be executed in a single program set on Amazon Braket.In addition to increasing the number of circuits, error mitigation has a theoretical worst-case exponential scaling in the number of additional shots, leading to increased cost and execution time. The examples below and in the Example Notebooks, provide resources to help understand these overheads while using program sets for different error mitigation techniques.Mitiq is an open-source library that provides tools for implementing and researching error mitigation approaches. Mitiq natively supports most Braket circuit features and enables design-your-own executors, allowing Braket users to easily explore error mitigation primitives.The Amazon Braket Examples repository includes examples demonstrating program sets with Mitiq, along with a collection of pre-built program-set-compatible executors.Below, we look at three common error mitigation techniques, further detailed in example notebooks. Mitiq supports additional approaches such as probabilistic error cancellation, Clifford data regression, quantum subspace expansion, dynamical decoupling, etc. Some of these methods require more detailed noise characterization but can benefit significantly from program sets.Readout error mitigation involves correcting the output distribution according to known state preparation and measurement errors. Full characterization of the confusion matrix, which is then inverted, scales exponentially with the number of qubits. This overhead can be reduced substantially by considering only local errors or by applying Pauli twirling for measurement channels.Figure 2. Readout mitigated GHZ state for a 6-qubit system, using an inverse confusion matrix approach as well as a post-selection based approach, both supported with Mitiq.A full characterization or the characterization of the randomized measurement channel shown above can be easily carried out in a single program set. Generally, readout error mitigation provides a constant overhead increase in the standard error, proportional to the system size. This size dependence can be removed when looking at observables that depend only on local observables, such as 1- or 2-local Pauli observables.Zero-noise extrapolation is an additional error mitigation technique which models the density matrix or expectation value as a function of a tunable noise parameter. ZNE measures results at several points and extrapolates to the zero-noise limit. A single program set can be used to easily submit all noise-amplified points. Mitiq includes multiple folding strategies or gate insertion techniques (to increase noise), and extrapolating functions that you can test, visualize, and apply to your system.Figure 3. Expectation values from noisy data and extrapolations to the zero-noise limit with different extrapolation methods, for a variety of simulated noisy circuits.The precision of the zero-noise limit depends on the extrapolation method used, which can vary from traditional least squares approaches to more complex logarithmic regressions or exact polynomial fitting. In Figure 4, we compare different extrapolation methods that are available with Mitiq.Pauli twirling is a technique used in error mitigation to transform a noisy quantum channel to a standard form. Randomized Pauli twirling inserts specific gates around noisy operators that do not affect the ideal unitary behavior. When taken over many iterations, the effect is to normalize the noise channel with respect to many input states.We can twirl a circuit many times and combine all the twirled variants into a single program set. This approach standardizes the fidelity and is especially useful for biased noise.Figure 4. Equivalent CNOT gates representing different twirls from the Pauli group.Combining error mitigation approaches also can lead to substantial complexity, as error mitigation procedures are applied at different points throughout a computational workflow. In the examples we dive into how a composite workflow with REM, PT, and ZNE can be built using program sets.Running error mitigated workflows on quantum hardware requires additional steps because device noise is non-uniform, and each device has native gates sets and device-specific characteristics. A final notebook demonstrates how to build, test, and run one such workflow using Amazon Braket.We executed a 30-qubit linearly entangled circuit with Rigetti’s native iSWAP gates, using an error mitigated workflow consisting of readout error mitigation, Pauli twirling, and exponential zero-noise extrapolation. This approach reduced the expectation value error by 12-30x compared to the noisy result. The workload consists of 100 readout circuits and 320 circuit variations, requiring 4 program sets, which reduces the associated task costs by 86x. The circuit utilizes an 11x shot overhead: 4x from ZNE and ~2.5x from readout error mitigationThe first step optimizes the measurement basis distribution of our target observable to reduce variance. Next, we select a suitable circuit layout. Using the qiskit-braket-provider, we select qubits with low iSWAP, gate, and readout infidelities.Figure 5. Laying out a 30Q circuit onto Ankaa-3. The colors (red worst, blue best) for nodes and edges are proportional to readout and iSWAP infidelities, respectively.We incorporate additional optimizations including native Pauli twirling, sparse readout error mitigation with readout twirling, and distributing shots proportionally to the extrapolation method. The entire workflow can be verified on a smaller qubit system using the Ankaa-3 emulator, which validates nativization and can simulate smaller system to predict performance.The resulting distribution in Figure 6, shows where the observable norm is normalized to 1. The error bounds and standard deviations fall within the expected precision (), showing how error mitigation improves our result.Figure 6. Error mitigated result (EM) for a 30-qubit circuit with normalized error bars, against the ideal and noisy result from Ankaa-3.Error mitigation is an important tool to maximize performance on today’s noisy quantum systems. In this post, you learned how common error mitigation techniques such as readout error mitigation, zero-noise extrapolation, and Pauli twirling, can be carried out using Amazon Braket’s program sets. Our 30-qubit example on Rigetti’s Ankaa-3 achieved a 12-30x error reduction with an 86-fold reduction in associated task cost using error mitigation with program sets.To get started with error mitigation on Amazon Braket:Scott Smart is an Applied Scientist with Amazon Braket. His past research was at the intersection of quantum computing and quantum chemistry, looking to improve the quality and efficiency of quantum simulations. He received his Ph.D. in Chemistry from the University of Chicago, and was a postdoctoral scholar at UCLA. Outside of work, he enjoys running and reading whenever he has time.Ishaan Lyngdoh Pakrasi is a Senior Product Manager on the Amazon Braket team. He holds a B.S. and M.S. in Mechanical Engineering from the University of Illinois at Urbana-Champaign, where his work on dancing robots combined engineering, art, and human-robot interaction. A graduate of the National Science Foundation’s I-CORPS program, Ishaan received grant funding to commercialize a robotics startup. His career spans robotics research, startup entrepreneurship, deep-tech commercialization, and product management across multiple industries. Outside of work, he enjoys soccer, travel, and creative technology projects that blend design, code, and motion.Peter Komar is an Applied Scientist in the Amazon Braket team where he works on integration of new quantum devices to the Braket service and researches their applications. He holds a PhD in physics from Harvard University where he conducted theoretical research in the field of quantum metrology, searching for practical ways to achieve ultimate measurement accuracy, set by the Heisenberg limit. Peter is passionate about all means of extracting maximal information from limited data.Yi-Ting (Tim) Chen is a scientist at Amazon Braket. He works on quantum verification, programming experience, and compilers. His past research focused on applying atom manipulation to study atomic physics and condensed matter physics, and on simulating quantum systems. He studied at Stanford University where he received his PhD in Applied Physics, and at National Taiwan University where he received his BS in Physics.
