{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "65235269", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:43.793892Z", "iopub.status.busy": "2024-04-26T18:19:43.793615Z", "iopub.status.idle": "2024-04-26T18:19:43.797264Z", "shell.execute_reply": "2024-04-26T18:19:43.796831Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2024 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "48a1fa4d", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Example: Running Randomized Compiling\n", "=====================================\n", "\n", "This example provides a short demonstration of |True-Q|'s\n", ":py:meth:`~trueq.randomly_compile` function and how it can be used to generate a set\n", "of randomly compiled circuits from a single input circuit, while implementing the same\n", "unitary as the original circuit. For more background information, check out our\n", "Randomized Compiling (:tqdoc:`RC`\\) user guide page.\n", "\n", ".. note::\n", " Randomized compiling produces a new circuit collection after each call, so the\n", " output of this example will be different if it's executed again.\n", "\n", "Generating randomly compiled circuits\n", "-------------------------------------\n", "\n", "We begin by creating a simple two-qubit circuit with alternating cycles:" ] }, { "cell_type": "code", "execution_count": 2, "id": "1cd8b4f2", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:43.799159Z", "iopub.status.busy": "2024-04-26T18:19:43.798876Z", "iopub.status.idle": "2024-04-26T18:19:46.139996Z", "shell.execute_reply": "2024-04-26T18:19:46.139503Z" } }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "DisplayWrapper(