diff --git a/public/images/lre_workflow_steps.png b/public/images/lre_workflow_steps.png new file mode 100644 index 00000000..540fad61 Binary files /dev/null and b/public/images/lre_workflow_steps.png differ diff --git a/src/content/blog/2024_lre.md b/src/content/blog/2024_lre.md new file mode 100644 index 00000000..7c6c24e5 --- /dev/null +++ b/src/content/blog/2024_lre.md @@ -0,0 +1,60 @@ +--- +title: "Adding Layerwise Richardson Extrapolation in Mitiq" +author: +day: 28 +month: 11 +year: 2024 +tags: + - Mitiq + - +--- + +Layerwise Richardson Extrapolation (LRE) [^1] is a multivariate extension of Zero Noise Extrapolation (ZNE) +where the noise of each layer is treated as an independent variable. + +![](/images/lre_workflow_steps.png) + +The general workflow of LRE comprises of creating multiple layerwise noise scaled circuits that are executed on a backend and then +extrapolated independently. ZNE allows a choice of which layer to scale based on the chosen scale factor while the +noise scaled circuits in LRE are created in a specific pattern dependent on factors like the number of layers in the input circuit, +degree of the multivariate extrapolating polynomial and the fold multiplier as the scale factor to control how many layers are inserted +via unitary folding. + +The mitiq module `mitiq.lre` can be used in two ways. + +- [`execute_with_lre`](https://mitiq.readthedocs.io/en/stable/apidoc.html#mitiq.lre.lre.execute_with_lre) can be used directly to get the error-mitigated expectation value. + +```py + +# Get the error mitigated expectation value directly +mitigated = execute_with_lre( + circuit, + execute, + degree=degree, + fold_multiplier=fold_multiplier, +) + +``` + +- To allow more control over the process, use [`multivariate_layer_scaling`](https://mitiq.readthedocs.io/en/stable/apidoc.html#mitiq.lre.multivariate_scaling.layerwise_folding.multivariate_layer_scaling) to create the intermediary noise scaled circuits and [`multivariate_richardson_coefficients`](https://mitiq.readthedocs.io/en/stable/apidoc.html#mitiq.lre.inference.multivariate_richardson.multivariate_richardson_coefficients) to get the coefficients of linear combination used by multivariate extrapolation. The latter are combined with the noise scaled expectation values to estimate the error-mitigated value through LRE. + +```py +# Step by step application +# noise scaled circuits +noise_scaled_circuits = multivariate_layer_scaling(circuit, degree, fold_multiplier) + +# noise scaled expectation values +noise_scaled_exp_values = [execute(circuit) for circuit in noise_scaled_circuits] + +# combine the results +mitigated = sum( + exp_val * coeff + for exp_val, coeff in zip(noise_scaled_exp_values, coefficients) +) + +``` + +Additional information is available in the [LRE User Guide](https://mitiq.readthedocs.io/en/stable/guide/lre.html) in Mitiq's documentation. + +------------------------------------------------------ +[^1]: Russo, Vincent and Mari, Andrea, _Quantum error mitigation by layerwise Richardson extrapolation_ (2024) [arXiv:2402.04000](https://arxiv.org/abs/2402.04000). \ No newline at end of file