{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "66073a7e", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:38.717167Z", "iopub.status.busy": "2024-04-26T18:19:38.716889Z", "iopub.status.idle": "2024-04-26T18:19:38.721178Z", "shell.execute_reply": "2024-04-26T18:19:38.720673Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# Copyright 2024 Keysight Technologies Inc." ] }, { "cell_type": "raw", "id": "e9edcfdf", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Example: Randomly Compiling Arbitrary Multi-qudit Gates\n", "=======================================================\n", "\n", "This example shows how to use the :py:class:`~trueq.compilation.RCKak` compiler pass\n", "to randomly compile circuits with non-Clifford multi-qudit gates.\n", "Randomizing and correction cycles can be applied around hard cycles in the circuit\n", "without the need to first convert all entangling gates into Clifford operations.\n", "\n", "Generating randomly compiled circuits\n", "-------------------------------------\n", "\n", "Consider some circuit with alternating easy and hard cycles, where entangling gates\n", "are considered to be hard, and single-qubit gates are considered to be easy:" ] }, { "cell_type": "code", "execution_count": 2, "id": "8946f227", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T18:19:38.723536Z", "iopub.status.busy": "2024-04-26T18:19:38.723135Z", "iopub.status.idle": "2024-04-26T18:19:41.078502Z", "shell.execute_reply": "2024-04-26T18:19:41.078032Z" } }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "DisplayWrapper(