{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "42c8cd6e", "metadata": { "execution": { "iopub.execute_input": "2024-03-26T19:00:15.195465Z", "iopub.status.busy": "2024-03-26T19:00:15.195217Z", "iopub.status.idle": "2024-03-26T19:00:15.197749Z", "shell.execute_reply": "2024-03-26T19:00:15.197339Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2024 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "ef5bc225", "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": "7fdb3ac8", "metadata": { "execution": { "iopub.execute_input": "2024-03-26T19:00:15.199736Z", "iopub.status.busy": "2024-03-26T19:00:15.199422Z", "iopub.status.idle": "2024-03-26T19:00:17.509264Z", "shell.execute_reply": "2024-03-26T19:00:17.508776Z" } }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "DisplayWrapper(