{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "dbf7d732", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:08.822088Z", "iopub.status.busy": "2024-04-26T18:19:08.821801Z", "iopub.status.idle": "2024-04-26T18:19:08.825444Z", "shell.execute_reply": "2024-04-26T18:19:08.825021Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2024 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "bfddab19", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Example: Comparing Infidelities with SRB and XRB\n", "================================================\n", "\n", "This example demonstrates how to estimate the process infidelities of specified\n", "systems using :tqdoc:`SRB`\\, and how this quantity can be divided into coherent and\n", "stochastic infidelity by the addition of :tqdoc:`XRB` circuits. While this example\n", "uses the built-in :py:class:`~trueq.Simulator` to execute the circuits, the same\n", "procedure can be followed for hardware applications." ] }, { "cell_type": "code", "execution_count": 2, "id": "dbaac773", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:08.827394Z", "iopub.status.busy": "2024-04-26T18:19:08.827069Z", "iopub.status.idle": "2024-04-26T18:19:13.006244Z", "shell.execute_reply": "2024-04-26T18:19:13.005750Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "
\n",
" SRB \n",
" Streamlined Randomized Benchmarking \n",
" | \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (0,) \n",
" \n",
" \n",
"
| \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (1, 2) \n",
" \n",
" \n",
"
| \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (3,) \n",
" \n",
" \n",
"
| \n",
"
\n",
" \n",
" ${e}_{F}$\n",
" \n",
" \n",
" The probability of an error acting on the targeted systems during a random gate.\n",
" \n",
" | \n",
" \n",
" \n",
" 2.3e-02 (9.2e-04)\n",
" 0.022546702265275387, 0.0009215562372938647 \n",
" | \n",
" \n",
" \n",
" 3.9e-02 (1.4e-03)\n",
" 0.039390934498134654, 0.0013605019056547535 \n",
" | \n",
" \n",
" \n",
" 2.3e-02 (1.3e-03)\n",
" 0.02257337747897606, 0.001311001388838058 \n",
" | \n",
"
\n",
" \n",
" ${p}$\n",
" \n",
" \n",
" Decay parameter of the exponential decay $Ap^m$.\n",
" \n",
" | \n",
" \n",
" \n",
" 9.7e-01 (1.2e-03)\n",
" 0.9699377303129662, 0.0012287416497251528 \n",
" | \n",
" \n",
" \n",
" 9.6e-01 (1.5e-03)\n",
" 0.9579830032019897, 0.0014512020326984038 \n",
" | \n",
" \n",
" \n",
" 9.7e-01 (1.7e-03)\n",
" 0.9699021633613653, 0.0017480018517840772 \n",
" | \n",
"
\n",
" \n",
" ${A}$\n",
" \n",
" \n",
" SPAM parameter of the exponential decay $Ap^m$.\n",
" \n",
" | \n",
" \n",
" \n",
" 9.5e-01 (5.7e-03)\n",
" 0.9513819667382615, 0.00571052829124158 \n",
" | \n",
" \n",
" \n",
" 9.2e-01 (8.7e-03)\n",
" 0.9156933658449761, 0.008666118251208018 \n",
" | \n",
" \n",
" \n",
" 9.5e-01 (8.1e-03)\n",
" 0.9527285904401025, 0.008105648773833228 \n",
" | \n",
"
\n",
" XRB \n",
" Extended Randomized Benchmarking \n",
" | \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (0,) \n",
" \n",
" \n",
"
| \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (1, 2) \n",
" \n",
" \n",
"
| \n",
" \n",
" \n",
" Cliffords\n",
"\n",
" (3,) \n",
" \n",
" \n",
"
| \n",
"
\n",
" \n",
" ${e}_{U}$\n",
" \n",
" \n",
" The process infidelity of the coherent error acting on the specifed systems during a random gate.\n",
" \n",
" | \n",
" \n",
" \n",
" 2.8e-03 (1.2e-03)\n",
" 0.0027961748426389987, 0.0011867621820910682 \n",
" | \n",
" \n",
" \n",
" 7.4e-04 (1.8e-03)\n",
" 0.0007413755541452946, 0.0018499766276306052 \n",
" | \n",
" \n",
" \n",
" 2.5e-03 (1.5e-03)\n",
" 0.002496651227054364, 0.001516924281228677 \n",
" | \n",
"
\n",
" \n",
" ${e}_{S}$\n",
" \n",
" \n",
" The probability of a stochastic error acting on the specified systems during a random gate.\n",
" \n",
" | \n",
" \n",
" \n",
" 2.0e-02 (7.5e-04)\n",
" 0.019750527422636388, 0.000747755694292145 \n",
" | \n",
" \n",
" \n",
" 3.9e-02 (1.3e-03)\n",
" 0.03864955894398936, 0.0012535741252472032 \n",
" | \n",
" \n",
" \n",
" 2.0e-02 (7.6e-04)\n",
" 0.020076726251921695, 0.0007631085332020745 \n",
" | \n",
"
\n",
" \n",
" ${u}$\n",
" \n",
" \n",
" The unitarity of the noise, that is, the average decrease in the purity of an initial state.\n",
" \n",
" | \n",
" \n",
" \n",
" 9.5e-01 (2.0e-03)\n",
" 0.947852037984266, 0.001954632333190921 \n",
" | \n",
" \n",
" \n",
" 9.2e-01 (2.6e-03)\n",
" 0.9191409818864918, 0.00257093128149931 \n",
" | \n",
" \n",
" \n",
" 9.5e-01 (2.0e-03)\n",
" 0.9469994965775348, 0.0019941008322145893 \n",
" | \n",
"
\n",
" \n",
" ${A}$\n",
" \n",
" \n",
" SPAM parameter of the exponential decay $Au^m$.\n",
" \n",
" | \n",
" \n",
" \n",
" 9.6e-01 (1.0e-02)\n",
" 0.9612316434977186, 0.010011585936591313 \n",
" | \n",
" \n",
" \n",
" 9.8e-01 (1.1e-02)\n",
" 0.9826515503622386, 0.01089700175280817 \n",
" | \n",
" \n",
" \n",
" 9.7e-01 (1.1e-02)\n",
" 0.9650706917040588, 0.010815743551143037 \n",
" | \n",
"