From aec6547b9190bd4db3cf9226a45c8065acba4b6c Mon Sep 17 00:00:00 2001
From: Ritu Thombre <42207923+ritu-thombre99@users.noreply.github.com>
Date: Sun, 29 Jan 2023 21:39:33 +0530
Subject: [PATCH] Add files via upload
---
.../iQuHack-challenge-2023-task1.ipynb | 1954 +++++++++++++
.../iQuHack-challenge-2023-task2.ipynb | 2532 +++++++++++++++++
2 files changed, 4486 insertions(+)
create mode 100644 team_solutions/team_11/iQuHack-challenge-2023-task1.ipynb
create mode 100644 team_solutions/team_11/iQuHack-challenge-2023-task2.ipynb
diff --git a/team_solutions/team_11/iQuHack-challenge-2023-task1.ipynb b/team_solutions/team_11/iQuHack-challenge-2023-task1.ipynb
new file mode 100644
index 0000000..067d320
--- /dev/null
+++ b/team_solutions/team_11/iQuHack-challenge-2023-task1.ipynb
@@ -0,0 +1,1954 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "# MIT iQuHack Microsoft Challenge: Optimizing Quantum Oracles, Task 1\n",
+ "\n",
+ "To work on this task,\n",
+ "1. Use the notebook for this task. Each of the notebooks in the repository has the code of the corresponding task.\n",
+ "2. Update your team name and Slack ID variables in the next code cell (you can use different Slack IDs for different tasks if different team members work on them, but make sure to use the same team name throughout the Hackathon). Do not change the task variable!\n",
+ "3. Work on your task in the cell that contains operation `Task1`! Your goal is to rewrite the code so that it maintains its correctness, but requires as few resources as possible. See `evaluate_results` function for details on how your absolute score for the task is calculated.\n",
+ "4. Submit your task using qBraid. Use the Share Notebook feature on qBraid (See File > Share Notebook) and enter the email rickyyoung@qbraid.com. Once you click submit, if the share notebook feature works correctly, it should show that you receive no errors and the email you entered will disappear. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "Log in to Azure (once per session, don't need to do it if running from Azure workspace)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\u001b[93mTo sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AQYA4PW7P to authenticate.\u001b[0m\n",
+ "[\n",
+ " {\n",
+ " \"cloudName\": \"AzureCloud\",\n",
+ " \"homeTenantId\": \"59729b1d-e2cb-4588-971e-4ecb3e3c1ada\",\n",
+ " \"id\": \"21499353-dbb9-4df1-86f5-b930908798f6\",\n",
+ " \"isDefault\": true,\n",
+ " \"managedByTenants\": [\n",
+ " {\n",
+ " \"tenantId\": \"d0ecd01b-d782-448e-bae0-c3cad0e0543a\"\n",
+ " },\n",
+ " {\n",
+ " \"tenantId\": \"94c4857e-1130-4ab8-8eac-069b40c9db20\"\n",
+ " },\n",
+ " {\n",
+ " \"tenantId\": \"f702a9dc-ae48-4dc7-8f0a-8155a6dfa4e5\"\n",
+ " }\n",
+ " ],\n",
+ " \"name\": \"Free Trial\",\n",
+ " \"state\": \"Enabled\",\n",
+ " \"tenantId\": \"59729b1d-e2cb-4588-971e-4ecb3e3c1ada\",\n",
+ " \"user\": {\n",
+ " \"name\": \"rituthombre99@outlook.com\",\n",
+ " \"type\": \"user\"\n",
+ " }\n",
+ " }\n",
+ "]\n"
+ ]
+ }
+ ],
+ "source": [
+ "!az login"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 1. Write the code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Preparing Q# environment...\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Run this code cell to import the modules required to work with Q# and Azure\n",
+ "import qsharp\n",
+ "from qsharp import azure"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "teamname=\"team_11\" # Update this field with your team name\n",
+ "task=[\"task1\"]\n",
+ "slack_id=\"U04JZ2Y6GE9\" # Update this field with Slack ID of the person who worked on this task as the troubleshooting contact"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "# You don't need to run this cell, it defines Q# operations as Python types to keep IntelliSense happy\n",
+ "Task1_DumpMachineWrapper : qsharp.QSharpCallable = None\n",
+ "Task1_ResourceEstimationWrapper : qsharp.QSharpCallable = None"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "**The complete code for Task 1 should be in this cell.** \n",
+ "This cell can include additional open statements and helper operations and functions if your solution needs them. \n",
+ "If you define helper operations in other cells, they will not be picked up by the grader!"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "microsoft": {
+ "language": "qsharp"
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "%%qsharp\n",
+ "open Microsoft.Quantum.Canon;\n",
+ "open Microsoft.Quantum.Diagnostics;\n",
+ "\n",
+ "// Task 1. Warm up with simple bit manipulation\n",
+ "// (input will contain 3 qubits)\n",
+ "// operation Task1(input : Qubit[], target : Qubit) : Unit is Adj {\n",
+ "// let N = Length(input);\n",
+ "// use aux = Qubit[N - 1];\n",
+ "// within {\n",
+ "// for i in 0 .. N - 2 {\n",
+ "// CNOT(input[i], aux[i]);\n",
+ "// CNOT(input[i + 1], aux[i]);\n",
+ "// }\n",
+ "// } apply {\n",
+ "// Controlled X(aux, target);\n",
+ "// }\n",
+ "//}\n",
+ "\n",
+ "\n",
+ "// Solution cost = 60\n",
+ "operation Task1(input : Qubit[], target : Qubit) : Unit is Adj {\n",
+ " use aux = Qubit[2];\n",
+ " CNOT(input[0],aux[0]);\n",
+ " CNOT(input[2],aux[0]); \n",
+ " X(aux[0]); // qubit0 = qubit2 \n",
+ " // make sure qubit1!=qubit2\n",
+ " CNOT(input[0],aux[1]);\n",
+ " CNOT(input[1],aux[1]); \n",
+ " \n",
+ " Controlled X(aux, target);\n",
+ " \n",
+ " CNOT(input[0],aux[0]);\n",
+ " CNOT(input[2],aux[0]); \n",
+ " X(aux[0]); // qubit0 = qubit2 \n",
+ " // make sure qubit1!=qubit2\n",
+ " CNOT(input[0],aux[1]);\n",
+ " CNOT(input[1],aux[1]); \n",
+ " \n",
+ "}\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "microsoft": {
+ "language": "qsharp"
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "%%qsharp\n",
+ "// Wrapper operation that allows you to observe the effects of the marking oracle by running it on a simulator.\n",
+ "operation Task1_DumpMachineWrapper() : Unit {\n",
+ " let N = 3;\n",
+ " use (input, target) = (Qubit[N], Qubit());\n",
+ " // Prepare an equal superposition of all input states in the input register.\n",
+ " ApplyToEach(H, input);\n",
+ " // Apply the oracle.\n",
+ " Task1(input, target);\n",
+ " // Print the state of the system after the oracle application.\n",
+ " DumpMachine();\n",
+ " ResetAll(input + [target]);\n",
+ "}\n",
+ "\n",
+ "// Wrapper operation that allows to run resource estimation for the task.\n",
+ "// This operation only allocates the qubits and applies the oracle once, not using any additional gates or measurements.\n",
+ "operation Task1_ResourceEstimationWrapper() : Unit {\n",
+ " let N = 3;\n",
+ " use (input, target) = (Qubit[N], Qubit());\n",
+ " Task1(input, target);\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 2. Run the code on a simulator to see what it does\n",
+ "You can also write your own code to explore the effects of the oracle (for example, applying it to different basis states and measuring the results)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "{\"diagnostic_kind\":\"state-vector\",\"qubit_ids\":[0,1,2,3],\"n_qubits\":4,\"amplitudes\":{\"0\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"1\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"2\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"3\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"4\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"5\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"6\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"7\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"8\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"9\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"10\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"11\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"12\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"13\":{\"Real\":0.35355339059327384,\"Imaginary\":0.0,\"Magnitude\":0.35355339059327384,\"Phase\":0.0},\"14\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"15\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0}}}",
+ "text/html": [
+ "\r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " Qubit IDs | \r\n",
+ " 0, 1, 2, 3 | \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ " Basis state (bitstring) | \r\n",
+ " Amplitude | Meas. Pr. | \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " $\\left|0000\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|0010\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|0101\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|0110\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|1000\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|1011\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|1100\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|1110\\right\\rangle$ | \r\n",
+ " $0.3536 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ "
"
+ ],
+ "text/plain": [
+ "|0000โฉ\t0.35355339059327384 + 0๐\n",
+ "|0010โฉ\t0.35355339059327384 + 0๐\n",
+ "|0101โฉ\t0.35355339059327384 + 0๐\n",
+ "|0110โฉ\t0.35355339059327384 + 0๐\n",
+ "|1000โฉ\t0.35355339059327384 + 0๐\n",
+ "|1011โฉ\t0.35355339059327384 + 0๐\n",
+ "|1100โฉ\t0.35355339059327384 + 0๐\n",
+ "|1110โฉ\t0.35355339059327384 + 0๐"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "()"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Note that in the output of this cell the target qubit corresponds to the rightmost bit\n",
+ "qsharp.config[\"dump.basisStateLabelingConvention\"]=\"Bitstring\"\n",
+ "qsharp.config[\"dump.phaseDisplayStyle\"]=\"None\"\n",
+ "# Uncomment the following line if you want to see only the entries with non-zero amplitudes\n",
+ "qsharp.config[\"dump.truncateSmallAmplitudes\"]=True\n",
+ "Task1_DumpMachineWrapper.simulate()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 3. Evaluate the code using resource estimation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "\"Connecting to Azure Quantum...\"",
+ "text/plain": [
+ "Connecting to Azure Quantum..."
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Connected to Azure Quantum workspace IQuHackteam11 in location eastus.\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "[{'id': 'ionq.qpu', 'current_availability': {}, 'average_queue_time': 186588},\n",
+ " {'id': 'ionq.qpu.aria-1', 'current_availability': {}, 'average_queue_time': 435744},\n",
+ " {'id': 'ionq.simulator', 'current_availability': {}, 'average_queue_time': 2},\n",
+ " {'id': 'microsoft.estimator', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s1-apival', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.hqs-lt-s2', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s2-apival', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.hqs-lt-s1-sim', 'current_availability': {}, 'average_queue_time': 623},\n",
+ " {'id': 'quantinuum.hqs-lt-s2-sim', 'current_availability': {}, 'average_queue_time': 179},\n",
+ " {'id': 'quantinuum.hqs-lt', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.qpu.h1-1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.sim.h1-1sc', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.qpu.h1-2', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.sim.h1-2sc', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.sim.h1-1e', 'current_availability': {}, 'average_queue_time': 623},\n",
+ " {'id': 'quantinuum.sim.h1-2e', 'current_availability': {}, 'average_queue_time': 179},\n",
+ " {'id': 'quantinuum.qpu.h1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'rigetti.sim.qvm', 'current_availability': {}, 'average_queue_time': 5},\n",
+ " {'id': 'rigetti.qpu.aspen-11', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'rigetti.qpu.aspen-m-2', 'current_availability': {}, 'average_queue_time': 5},\n",
+ " {'id': 'rigetti.qpu.aspen-m-3', 'current_availability': {}, 'average_queue_time': 5}]"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# If you're using this notebook in Azure Quantum hosted notebooks, remove the credential=\"CLI\" parameter!\n",
+ "# If you're using this notebook in qBraid, keep it\n",
+ "qsharp.azure.connect(\n",
+ " resourceId=\"/subscriptions/21499353-dbb9-4df1-86f5-b930908798f6/resourceGroups/AzureQuantum/providers/Microsoft.Quantum/Workspaces/IQuHackteam11\",\n",
+ " location=\"East US\",\n",
+ " credential=\"CLI\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Loading package Microsoft.Quantum.Providers.Core and dependencies...\n",
+ "Active target is now microsoft.estimator\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "{'id': 'microsoft.estimator', 'current_availability': {}, 'average_queue_time': 0}"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "qsharp.azure.target(\"microsoft.estimator\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Submitting Task1_ResourceEstimationWrapper to target microsoft.estimator...\n",
+ "Job successfully submitted.\n",
+ " Job name: RE for the task 1\n",
+ " Job ID: eaa694f7-1306-4129-908c-bd92637cbd6d\n",
+ "Waiting up to 30 seconds for Azure Quantum job to complete...\n",
+ "[4:05:17 PM] Current job status: Executing\n",
+ "[4:05:22 PM] Current job status: Succeeded\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Update job name to a more descriptive string to make it easier to find it in Job Management tab later\n",
+ "result = qsharp.azure.execute(Task1_ResourceEstimationWrapper, jobName=\"RE for the task 1\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "{\"errorBudget\":{\"logical\":0.0005,\"rotations\":0.0,\"tstates\":0.0005},\"jobParams\":{\"errorBudget\":0.001,\"qecScheme\":{\"crossingPrefactor\":0.03,\"errorCorrectionThreshold\":0.01,\"logicalCycleTime\":\"(4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance\",\"name\":\"surface_code\",\"physicalQubitsPerLogicalQubit\":\"2 * codeDistance * codeDistance\"},\"qubitParams\":{\"instructionSet\":\"GateBased\",\"name\":\"qubit_gate_ns_e3\",\"oneQubitGateErrorRate\":0.001,\"oneQubitGateTime\":\"50 ns\",\"oneQubitMeasurementErrorRate\":0.001,\"oneQubitMeasurementTime\":\"100 ns\",\"tGateErrorRate\":0.001,\"tGateTime\":\"50 ns\",\"twoQubitGateErrorRate\":0.001,\"twoQubitGateTime\":\"50 ns\"}},\"logicalCounts\":{\"ccixCount\":0,\"cczCount\":1,\"measurementCount\":0,\"numQubits\":6,\"rotationCount\":0,\"rotationDepth\":0,\"tCount\":0},\"logicalQubit\":{\"codeDistance\":9,\"logicalCycleTime\":3600.0,\"logicalErrorRate\":3.0000000000000015E-07,\"physicalQubits\":162},\"physicalCounts\":{\"breakdown\":{\"algorithmicLogicalDepth\":3,\"algorithmicLogicalQubits\":20,\"cliffordErrorRate\":0.001,\"logicalDepth\":13,\"numTfactories\":4,\"numTfactoryRuns\":1,\"numTsPerRotation\":null,\"numTstates\":4,\"physicalQubitsForAlgorithm\":3240,\"physicalQubitsForTfactories\":15680,\"requiredLogicalQubitErrorRate\":1.923076923076923E-06,\"requiredLogicalTstateErrorRate\":0.000125},\"physicalQubits\":18920,\"runtime\":46800},\"physicalCountsFormatted\":{\"codeDistancePerRound\":\"7\",\"errorBudget\":\"1.00e-3\",\"errorBudgetLogical\":\"5.00e-4\",\"errorBudgetRotations\":\"0.00e0\",\"errorBudgetTstates\":\"5.00e-4\",\"logicalCycleTime\":\"3us 600ns\",\"logicalErrorRate\":\"3.00e-7\",\"numTsPerRotation\":\"No rotations in algorithm\",\"numUnitsPerRound\":\"2\",\"physicalQubitsForTfactoriesPercentage\":\"82.88 %\",\"physicalQubitsPerRound\":\"3920\",\"requiredLogicalQubitErrorRate\":\"1.92e-6\",\"requiredLogicalTstateErrorRate\":\"1.25e-4\",\"runtime\":\"46us 800ns\",\"tfactoryRuntime\":\"36us 400ns\",\"tfactoryRuntimePerRound\":\"36us 400ns\",\"tstateLogicalErrorRate\":\"2.13e-5\",\"unitNamePerRound\":\"15-to-1 space efficient logical\"},\"reportData\":{\"assumptions\":[\"_More details on the following lists of assumptions can be found in the paper [Accessing requirements for scaling quantum computers and their applications](https://aka.ms/AQ/RE/Paper)._\",\"**Uniform independent physical noise.** We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.\",\"**Efficient classical computation.** We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.\",\"**Extraction circuits for planar quantum ISA.** We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).\",\"**Uniform independent logical noise.** We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.\",\"**Negligible Clifford costs for synthesis.** We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.\",\"**Smooth magic state consumption rate.** We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.\"],\"groups\":[{\"alwaysVisible\":true,\"entries\":[{\"description\":\"Number of physical qubits\",\"explanation\":\"This value represents the total number of physical qubits, which is the sum of 3240 physical qubits to implement the algorithm logic, and 15680 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm.\",\"label\":\"Physical qubits\",\"path\":\"physicalCounts/physicalQubits\"},{\"description\":\"Total runtime\",\"explanation\":\"This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (3us 600ns) multiplied by the 3 logical cycles to run the algorithm. If however the duration of a single T factory (here: 36us 400ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory.\",\"label\":\"Runtime\",\"path\":\"physicalCountsFormatted/runtime\"}],\"title\":\"Physical resource estimates\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of logical qubits for the algorithm after layout\",\"explanation\":\"Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the $Q_{\\\\rm alg} = 6$ logical qubits in the input algorithm, we require in total $2 \\\\cdot Q_{\\\\rm alg} + \\\\lceil \\\\sqrt{8 \\\\cdot Q_{\\\\rm alg}}\\\\rceil + 1 = 20$ logical qubits.\",\"label\":\"Logical algorithmic qubits\",\"path\":\"physicalCounts/breakdown/algorithmicLogicalQubits\"},{\"description\":\"Number of logical cycles for the algorithm\",\"explanation\":\"To execute the algorithm using _Parallel Synthesis Sequential Pauli Computation_ (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 0 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 1 CCZ and 0 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation.\",\"label\":\"Algorithmic depth\",\"path\":\"physicalCounts/breakdown/algorithmicLogicalDepth\"},{\"description\":\"Number of logical cycles performed\",\"explanation\":\"This number is usually equal to the logical depth of the algorithm, which is 3. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time.\",\"label\":\"Logical depth\",\"path\":\"physicalCounts/breakdown/logicalDepth\"},{\"description\":\"Number of T states consumed by the algorithm\",\"explanation\":\"To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 1 CCZ and 0 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation.\",\"label\":\"Number of T states\",\"path\":\"physicalCounts/breakdown/numTstates\"},{\"description\":\"Number of T factories capable of producing the demanded 4 T states during the algorithm's runtime\",\"explanation\":\"The total number of T factories 4 that are executed in parallel is computed as $\\\\left\\\\lceil\\\\dfrac{4\\\\;\\\\text{T states} \\\\cdot 36us 400ns\\\\;\\\\text{T factory duration}}{1\\\\;\\\\text{T states per T factory} \\\\cdot 46us 800ns\\\\;\\\\text{algorithm runtime}}\\\\right\\\\rceil$\",\"label\":\"Number of T factories\",\"path\":\"physicalCounts/breakdown/numTfactories\"},{\"description\":\"Number of times all T factories are invoked\",\"explanation\":\"In order to prepare the 4 T states, the 4 copies of the T factory are repeatedly invoked 1 times.\",\"label\":\"Number of T factory invocations\",\"path\":\"physicalCounts/breakdown/numTfactoryRuns\"},{\"description\":\"Number of physical qubits for the algorithm after layout\",\"explanation\":\"The 3240 are the product of the 20 logical qubits after layout and the 162 physical qubits that encode a single logical qubit.\",\"label\":\"Physical algorithmic qubits\",\"path\":\"physicalCounts/breakdown/physicalQubitsForAlgorithm\"},{\"description\":\"Number of physical qubits for the T factories\",\"explanation\":\"Each T factory requires 3920 physical qubits and we run 4 in parallel, therefore we need $15680 = 3920 \\\\cdot 4$ qubits.\",\"label\":\"Physical T factory qubits\",\"path\":\"physicalCounts/breakdown/physicalQubitsForTfactories\"},{\"description\":\"The minimum logical qubit error rate required to run the algorithm within the error budget\",\"explanation\":\"The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 20 logical qubits and the total cycle count 13.\",\"label\":\"Required logical qubit error rate\",\"path\":\"physicalCountsFormatted/requiredLogicalQubitErrorRate\"},{\"description\":\"The minimum T state error rate required for distilled T states\",\"explanation\":\"The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 4.\",\"label\":\"Required logical T state error rate\",\"path\":\"physicalCountsFormatted/requiredLogicalTstateErrorRate\"},{\"description\":\"Number of T states to implement a rotation with an arbitrary angle\",\"explanation\":\"The number of T states to implement a rotation with an arbitrary angle is $\\\\lceil 0.53 \\\\log_2(0 / 0) + 5.3\\\\rceil$ [[arXiv:2203.10064](https://arxiv.org/abs/2203.10064)]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases.\",\"label\":\"Number of T states per rotation\",\"path\":\"physicalCountsFormatted/numTsPerRotation\"}],\"title\":\"Resource estimates breakdown\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Name of QEC scheme\",\"explanation\":\"You can load pre-defined QEC schemes by using the name `surface_code` or `floquet_code`. The latter only works with Majorana qubits.\",\"label\":\"QEC scheme\",\"path\":\"jobParams/qecScheme/name\"},{\"description\":\"Required code distance for error correction\",\"explanation\":\"The code distance is the smallest odd integer greater or equal to $\\\\dfrac{2\\\\log(0.03 / 0.000001923076923076923)}{\\\\log(0.01/0.001)} - 1$\",\"label\":\"Code distance\",\"path\":\"logicalQubit/codeDistance\"},{\"description\":\"Number of physical qubits per logical qubit\",\"explanation\":\"The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified.\",\"label\":\"Physical qubits\",\"path\":\"logicalQubit/physicalQubits\"},{\"description\":\"Duration of a logical cycle in nanoseconds\",\"explanation\":\"The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified.\",\"label\":\"Logical cycle time\",\"path\":\"physicalCountsFormatted/logicalCycleTime\"},{\"description\":\"Logical qubit error rate\",\"explanation\":\"The logical qubit error rate is computed as $0.03 \\\\cdot \\\\left(\\\\dfrac{0.001}{0.01}\\\\right)^\\\\frac{9 + 1}{2}$\",\"label\":\"Logical qubit error rate\",\"path\":\"physicalCountsFormatted/logicalErrorRate\"},{\"description\":\"Crossing prefactor used in QEC scheme\",\"explanation\":\"The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate.\",\"label\":\"Crossing prefactor\",\"path\":\"jobParams/qecScheme/crossingPrefactor\"},{\"description\":\"Error correction threshold used in QEC scheme\",\"explanation\":\"The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate.\",\"label\":\"Error correction threshold\",\"path\":\"jobParams/qecScheme/errorCorrectionThreshold\"},{\"description\":\"QEC scheme formula used to compute logical cycle time\",\"explanation\":\"This is the formula that is used to compute the logical cycle time 3us 600ns.\",\"label\":\"Logical cycle time formula\",\"path\":\"jobParams/qecScheme/logicalCycleTime\"},{\"description\":\"QEC scheme formula used to compute number of physical qubits per logical qubit\",\"explanation\":\"This is the formula that is used to compute the number of physical qubits per logical qubits 162.\",\"label\":\"Physical qubits formula\",\"path\":\"jobParams/qecScheme/physicalQubitsPerLogicalQubit\"}],\"title\":\"Logical qubit parameters\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of physical qubits for a single T factory\",\"explanation\":\"This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate.\",\"label\":\"Physical qubits\",\"path\":\"tfactory/physicalQubits\"},{\"description\":\"Runtime of a single T factory\",\"explanation\":\"The runtime of a single T factory is the accumulated runtime of executing each round in a T factory.\",\"label\":\"Runtime\",\"path\":\"physicalCountsFormatted/tfactoryRuntime\"},{\"description\":\"Number of output T states produced in a single run of T factory\",\"explanation\":\"The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.13e-5.\",\"label\":\"Number of output T states per run\",\"path\":\"tfactory/numTstates\"},{\"description\":\"Number of physical input T states consumed in a single run of a T factory\",\"explanation\":\"This value includes the physical input T states of all copies of the distillation unit in the first round.\",\"label\":\"Number of input T states per run\",\"path\":\"tfactory/numInputTstates\"},{\"description\":\"The number of distillation rounds\",\"explanation\":\"This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed.\",\"label\":\"Distillation rounds\",\"path\":\"tfactory/numRounds\"},{\"description\":\"The number of units in each round of distillation\",\"explanation\":\"This is the number of copies for the distillation units per round.\",\"label\":\"Distillation units per round\",\"path\":\"physicalCountsFormatted/numUnitsPerRound\"},{\"description\":\"The types of distillation units\",\"explanation\":\"These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units.\",\"label\":\"Distillation units\",\"path\":\"physicalCountsFormatted/unitNamePerRound\"},{\"description\":\"The code distance in each round of distillation\",\"explanation\":\"This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits.\",\"label\":\"Distillation code distances\",\"path\":\"physicalCountsFormatted/codeDistancePerRound\"},{\"description\":\"The number of physical qubits used in each round of distillation\",\"explanation\":\"The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds.\",\"label\":\"Number of physical qubits per round\",\"path\":\"physicalCountsFormatted/physicalQubitsPerRound\"},{\"description\":\"The runtime of each distillation round\",\"explanation\":\"The runtime of the T factory is the sum of the runtimes in all rounds.\",\"label\":\"Runtime per round\",\"path\":\"physicalCountsFormatted/tfactoryRuntimePerRound\"},{\"description\":\"Logical T state error rate\",\"explanation\":\"This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 1.25e-4.\",\"label\":\"Logical T state error rate\",\"path\":\"physicalCountsFormatted/tstateLogicalErrorRate\"}],\"title\":\"T factory parameters\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of logical qubits in the input quantum program\",\"explanation\":\"We determine 20 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits.\",\"label\":\"Logical qubits (pre-layout)\",\"path\":\"logicalCounts/numQubits\"},{\"description\":\"Number of T gates in the input quantum program\",\"explanation\":\"This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates.\",\"label\":\"T gates\",\"path\":\"logicalCounts/tCount\"},{\"description\":\"Number of rotation gates in the input quantum program\",\"explanation\":\"This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number.\",\"label\":\"Rotation gates\",\"path\":\"logicalCounts/rotationCount\"},{\"description\":\"Depth of rotation gates in the input quantum program\",\"explanation\":\"This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle.\",\"label\":\"Rotation depth\",\"path\":\"logicalCounts/rotationDepth\"},{\"description\":\"Number of CCZ-gates in the input quantum program\",\"explanation\":\"This is the number of CCZ gates.\",\"label\":\"CCZ gates\",\"path\":\"logicalCounts/cczCount\"},{\"description\":\"Number of CCiX-gates in the input quantum program\",\"explanation\":\"This is the number of CCiX gates, which applies $-iX$ controlled on two control qubits [[1212.5069](https://arxiv.org/abs/1212.5069)].\",\"label\":\"CCiX gates\",\"path\":\"logicalCounts/ccixCount\"},{\"description\":\"Number of single qubit measurements in the input quantum program\",\"explanation\":\"This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%.\",\"label\":\"Measurement operations\",\"path\":\"logicalCounts/measurementCount\"}],\"title\":\"Pre-layout logical resources\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Total error budget for the algorithm\",\"explanation\":\"The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget $\\\\epsilon = \\\\epsilon_{\\\\log} + \\\\epsilon_{\\\\rm dis} + \\\\epsilon_{\\\\rm syn}$ is uniformly distributed and applies to errors $\\\\epsilon_{\\\\log}$ to implement logical qubits, an error budget $\\\\epsilon_{\\\\rm dis}$ to produce T states through distillation, and an error budget $\\\\epsilon_{\\\\rm syn}$ to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets $\\\\epsilon_{\\\\rm dis}$ and $\\\\epsilon_{\\\\rm syn}$ are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors.\",\"label\":\"Total error budget\",\"path\":\"physicalCountsFormatted/errorBudget\"},{\"description\":\"Probability of at least one logical error\",\"explanation\":\"This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.\",\"label\":\"Logical error probability\",\"path\":\"physicalCountsFormatted/errorBudgetLogical\"},{\"description\":\"Probability of at least one faulty T distillation\",\"explanation\":\"This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.\",\"label\":\"T distillation error probability\",\"path\":\"physicalCountsFormatted/errorBudgetTstates\"},{\"description\":\"Probability of at least one failed rotation synthesis\",\"explanation\":\"This is one third of the total error budget 1.00e-3.\",\"label\":\"Rotation synthesis error probability\",\"path\":\"physicalCountsFormatted/errorBudgetRotations\"}],\"title\":\"Assumed error budget\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Some descriptive name for the qubit model\",\"explanation\":\"You can load pre-defined qubit parameters by using the names `qubit_gate_ns_e3`, `qubit_gate_ns_e4`, `qubit_gate_us_e3`, `qubit_gate_us_e4`, `qubit_maj_ns_e4`, or `qubit_maj_ns_e6`. The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates).\",\"label\":\"Qubit name\",\"path\":\"jobParams/qubitParams/name\"},{\"description\":\"Underlying qubit technology (gate-based or Majorana)\",\"explanation\":\"When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either *gate-based* or *Majorana*. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations.\",\"label\":\"Instruction set\",\"path\":\"jobParams/qubitParams/instructionSet\"},{\"description\":\"Operation time for single-qubit measurement (t_meas) in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis.\",\"label\":\"Single-qubit measurement time\",\"path\":\"jobParams/qubitParams/oneQubitMeasurementTime\"},{\"description\":\"Operation time for single-qubit gate (t_gate) in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates.\",\"label\":\"Single-qubit gate time\",\"path\":\"jobParams/qubitParams/oneQubitGateTime\"},{\"description\":\"Operation time for two-qubit gate in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate.\",\"label\":\"Two-qubit gate time\",\"path\":\"jobParams/qubitParams/twoQubitGateTime\"},{\"description\":\"Operation time for a T gate\",\"explanation\":\"This is the operation time in nanoseconds to execute a T gate.\",\"label\":\"T gate time\",\"path\":\"jobParams/qubitParams/tGateTime\"},{\"description\":\"Error rate for single-qubit measurement\",\"explanation\":\"This is the probability in which a single-qubit measurement in the Pauli basis may fail.\",\"label\":\"Single-qubit measurement error rate\",\"path\":\"jobParams/qubitParams/oneQubitMeasurementErrorRate\"},{\"description\":\"Error rate for single-qubit Clifford gate (p)\",\"explanation\":\"This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail.\",\"label\":\"Single-qubit error rate\",\"path\":\"jobParams/qubitParams/oneQubitGateErrorRate\"},{\"description\":\"Error rate for two-qubit Clifford gate\",\"explanation\":\"This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail.\",\"label\":\"Two-qubit error rate\",\"path\":\"jobParams/qubitParams/twoQubitGateErrorRate\"},{\"description\":\"Error rate to prepare single-qubit T state or apply a T gate (p_T)\",\"explanation\":\"This is the probability in which executing a single T gate may fail.\",\"label\":\"T gate error rate\",\"path\":\"jobParams/qubitParams/tGateErrorRate\"}],\"title\":\"Physical qubit parameters\"}]},\"status\":\"success\",\"tfactory\":{\"codeDistancePerRound\":[7],\"logicalErrorRate\":2.133500000000001E-05,\"numInputTstates\":30,\"numRounds\":1,\"numTstates\":1,\"numUnitsPerRound\":[2],\"physicalQubits\":3920,\"physicalQubitsPerRound\":[3920],\"runtime\":36400.0,\"runtimePerRound\":[36400.0],\"unitNamePerRound\":[\"15-to-1 space efficient logical\"]}}",
+ "text/html": [
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Physical resource estimates\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 18920 | \r\n",
+ " \r\n",
+ " Number of physical qubits \n",
+ "\r\n",
+ " \r\n",
+ " This value represents the total number of physical qubits, which is the sum of 3240 physical qubits to implement the algorithm logic, and 15680 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime | \r\n",
+ " 46us 800ns | \r\n",
+ " \r\n",
+ " Total runtime \n",
+ "\r\n",
+ " \r\n",
+ " This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (3us 600ns) multiplied by the 3 logical cycles to run the algorithm. If however the duration of a single T factory (here: 36us 400ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Resource estimates breakdown\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Logical algorithmic qubits | \r\n",
+ " 20 | \r\n",
+ " \r\n",
+ " Number of logical qubits for the algorithm after layout \n",
+ "\r\n",
+ " \r\n",
+ " Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the \\(Q_{\\rm alg} = 6\\) logical qubits in the input algorithm, we require in total $2 \\cdot Q_{\\rm alg} + \\lceil \\sqrt{8 \\cdot Q_{\\rm alg}}\\rceil + 1 = 20$ logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Algorithmic depth | \r\n",
+ " 3 | \r\n",
+ " \r\n",
+ " Number of logical cycles for the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " To execute the algorithm using Parallel Synthesis Sequential Pauli Computation (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 0 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 1 CCZ and 0 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical depth | \r\n",
+ " 13 | \r\n",
+ " \r\n",
+ " Number of logical cycles performed \n",
+ "\r\n",
+ " \r\n",
+ " This number is usually equal to the logical depth of the algorithm, which is 3. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T states | \r\n",
+ " 4 | \r\n",
+ " \r\n",
+ " Number of T states consumed by the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 1 CCZ and 0 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T factories | \r\n",
+ " 4 | \r\n",
+ " \r\n",
+ " Number of T factories capable of producing the demanded 4 T states during the algorithm's runtime \n",
+ "\r\n",
+ " \r\n",
+ " The total number of T factories 4 that are executed in parallel is computed as \\(\\left\\lceil\\dfrac{4\\;\\text{T states} \\cdot 36us 400ns\\;\\text{T factory duration}}{1\\;\\text{T states per T factory} \\cdot 46us 800ns\\;\\text{algorithm runtime}}\\right\\rceil\\) \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T factory invocations | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " Number of times all T factories are invoked \n",
+ "\r\n",
+ " \r\n",
+ " In order to prepare the 4 T states, the 4 copies of the T factory are repeatedly invoked 1 times. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical algorithmic qubits | \r\n",
+ " 3240 | \r\n",
+ " \r\n",
+ " Number of physical qubits for the algorithm after layout \n",
+ "\r\n",
+ " \r\n",
+ " The 3240 are the product of the 20 logical qubits after layout and the 162 physical qubits that encode a single logical qubit. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical T factory qubits | \r\n",
+ " 15680 | \r\n",
+ " \r\n",
+ " Number of physical qubits for the T factories \n",
+ "\r\n",
+ " \r\n",
+ " Each T factory requires 3920 physical qubits and we run 4 in parallel, therefore we need $15680 = 3920 \\cdot 4$ qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Required logical qubit error rate | \r\n",
+ " 1.92e-6 | \r\n",
+ " \r\n",
+ " The minimum logical qubit error rate required to run the algorithm within the error budget \n",
+ "\r\n",
+ " \r\n",
+ " The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 20 logical qubits and the total cycle count 13. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Required logical T state error rate | \r\n",
+ " 1.25e-4 | \r\n",
+ " \r\n",
+ " The minimum T state error rate required for distilled T states \n",
+ "\r\n",
+ " \r\n",
+ " The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 4. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T states per rotation | \r\n",
+ " No rotations in algorithm | \r\n",
+ " \r\n",
+ " Number of T states to implement a rotation with an arbitrary angle \n",
+ "\r\n",
+ " \r\n",
+ " The number of T states to implement a rotation with an arbitrary angle is \\(\\lceil 0.53 \\log_2(0 / 0) + 5.3\\rceil\\) [arXiv:2203.10064]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Logical qubit parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " QEC scheme | \r\n",
+ " surface_code | \r\n",
+ " \r\n",
+ " Name of QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " You can load pre-defined QEC schemes by using the name surface_code or floquet_code . The latter only works with Majorana qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Code distance | \r\n",
+ " 9 | \r\n",
+ " \r\n",
+ " Required code distance for error correction \n",
+ "\r\n",
+ " \r\n",
+ " The code distance is the smallest odd integer greater or equal to \\(\\dfrac{2\\log(0.03 / 0.000001923076923076923)}{\\log(0.01/0.001)} - 1\\) \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 162 | \r\n",
+ " \r\n",
+ " Number of physical qubits per logical qubit \n",
+ "\r\n",
+ " \r\n",
+ " The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical cycle time | \r\n",
+ " 3us 600ns | \r\n",
+ " \r\n",
+ " Duration of a logical cycle in nanoseconds \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical qubit error rate | \r\n",
+ " 3.00e-7 | \r\n",
+ " \r\n",
+ " Logical qubit error rate \n",
+ "\r\n",
+ " \r\n",
+ " The logical qubit error rate is computed as $0.03 \\cdot \\left(\\dfrac{0.001}{0.01}\\right)^\\frac{9 + 1}{2}$ \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Crossing prefactor | \r\n",
+ " 0.03 | \r\n",
+ " \r\n",
+ " Crossing prefactor used in QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Error correction threshold | \r\n",
+ " 0.01 | \r\n",
+ " \r\n",
+ " Error correction threshold used in QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical cycle time formula | \r\n",
+ " (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance | \r\n",
+ " \r\n",
+ " QEC scheme formula used to compute logical cycle time \n",
+ "\r\n",
+ " \r\n",
+ " This is the formula that is used to compute the logical cycle time 3us 600ns. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits formula | \r\n",
+ " 2 * codeDistance * codeDistance | \r\n",
+ " \r\n",
+ " QEC scheme formula used to compute number of physical qubits per logical qubit \n",
+ "\r\n",
+ " \r\n",
+ " This is the formula that is used to compute the number of physical qubits per logical qubits 162. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " T factory parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 3920 | \r\n",
+ " \r\n",
+ " Number of physical qubits for a single T factory \n",
+ "\r\n",
+ " \r\n",
+ " This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime | \r\n",
+ " 36us 400ns | \r\n",
+ " \r\n",
+ " Runtime of a single T factory \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of a single T factory is the accumulated runtime of executing each round in a T factory. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of output T states per run | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " Number of output T states produced in a single run of T factory \n",
+ "\r\n",
+ " \r\n",
+ " The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.13e-5. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of input T states per run | \r\n",
+ " 30 | \r\n",
+ " \r\n",
+ " Number of physical input T states consumed in a single run of a T factory \n",
+ "\r\n",
+ " \r\n",
+ " This value includes the physical input T states of all copies of the distillation unit in the first round. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation rounds | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " The number of distillation rounds \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation units per round | \r\n",
+ " 2 | \r\n",
+ " \r\n",
+ " The number of units in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of copies for the distillation units per round. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation units | \r\n",
+ " 15-to-1 space efficient logical | \r\n",
+ " \r\n",
+ " The types of distillation units \n",
+ "\r\n",
+ " \r\n",
+ " These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation code distances | \r\n",
+ " 7 | \r\n",
+ " \r\n",
+ " The code distance in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of physical qubits per round | \r\n",
+ " 3920 | \r\n",
+ " \r\n",
+ " The number of physical qubits used in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime per round | \r\n",
+ " 36us 400ns | \r\n",
+ " \r\n",
+ " The runtime of each distillation round \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of the T factory is the sum of the runtimes in all rounds. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical T state error rate | \r\n",
+ " 2.13e-5 | \r\n",
+ " \r\n",
+ " Logical T state error rate \n",
+ "\r\n",
+ " \r\n",
+ " This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 1.25e-4. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Pre-layout logical resources\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Logical qubits (pre-layout) | \r\n",
+ " 6 | \r\n",
+ " \r\n",
+ " Number of logical qubits in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " We determine 20 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gates | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of T gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation gates | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of rotation gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation depth | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Depth of rotation gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " CCZ gates | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " Number of CCZ-gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of CCZ gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " CCiX gates | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of CCiX-gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of CCiX gates, which applies \\(-iX\\) controlled on two control qubits [1212.5069]. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Measurement operations | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of single qubit measurements in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Assumed error budget\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Total error budget | \r\n",
+ " 1.00e-3 | \r\n",
+ " \r\n",
+ " Total error budget for the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget \\(\\epsilon = \\epsilon_{\\log} + \\epsilon_{\\rm dis} + \\epsilon_{\\rm syn}\\) is uniformly distributed and applies to errors \\(\\epsilon_{\\log}\\) to implement logical qubits, an error budget \\(\\epsilon_{\\rm dis}\\) to produce T states through distillation, and an error budget \\(\\epsilon_{\\rm syn}\\) to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets \\(\\epsilon_{\\rm dis}\\) and \\(\\epsilon_{\\rm syn}\\) are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical error probability | \r\n",
+ " 5.00e-4 | \r\n",
+ " \r\n",
+ " Probability of at least one logical error \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T distillation error probability | \r\n",
+ " 5.00e-4 | \r\n",
+ " \r\n",
+ " Probability of at least one faulty T distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation synthesis error probability | \r\n",
+ " 0.00e0 | \r\n",
+ " \r\n",
+ " Probability of at least one failed rotation synthesis \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Physical qubit parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Qubit name | \r\n",
+ " qubit_gate_ns_e3 | \r\n",
+ " \r\n",
+ " Some descriptive name for the qubit model \n",
+ "\r\n",
+ " \r\n",
+ " You can load pre-defined qubit parameters by using the names qubit_gate_ns_e3 , qubit_gate_ns_e4 , qubit_gate_us_e3 , qubit_gate_us_e4 , qubit_maj_ns_e4 , or qubit_maj_ns_e6 . The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates). \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Instruction set | \r\n",
+ " GateBased | \r\n",
+ " \r\n",
+ " Underlying qubit technology (gate-based or Majorana) \n",
+ "\r\n",
+ " \r\n",
+ " When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either gate-based or Majorana. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit measurement time | \r\n",
+ " 100 ns | \r\n",
+ " \r\n",
+ " Operation time for single-qubit measurement (t_meas) in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for single-qubit gate (t_gate) in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Two-qubit gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for two-qubit gate in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for a T gate \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to execute a T gate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit measurement error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for single-qubit measurement \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a single-qubit measurement in the Pauli basis may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for single-qubit Clifford gate (p) \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Two-qubit error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for two-qubit Clifford gate \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gate error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate to prepare single-qubit T state or apply a T gate (p_T) \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which executing a single T gate may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " Assumptions
\r\n",
+ " \n",
+ "More details on the following lists of assumptions can be found in the paper Accessing requirements for scaling quantum computers and their applications.
\n",
+ " \n",
+ "Uniform independent physical noise. We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.
\n",
+ " \n",
+ "Efficient classical computation. We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.
\n",
+ " \n",
+ "Extraction circuits for planar quantum ISA. We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).
\n",
+ " \n",
+ "Uniform independent logical noise. We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.
\n",
+ " \n",
+ "Negligible Clifford costs for synthesis. We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.
\n",
+ " \n",
+ "Smooth magic state consumption rate. We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.
\n",
+ " \n",
+ "
\n"
+ ],
+ "text/plain": [
+ "{'errorBudget': {'logical': 0.0005, 'rotations': 0.0, 'tstates': 0.0005},\n",
+ " 'jobParams': {'errorBudget': 0.001,\n",
+ " 'qecScheme': {'crossingPrefactor': 0.03,\n",
+ " 'errorCorrectionThreshold': 0.01,\n",
+ " 'logicalCycleTime': '(4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance',\n",
+ " 'name': 'surface_code',\n",
+ " 'physicalQubitsPerLogicalQubit': '2 * codeDistance * codeDistance'},\n",
+ " 'qubitParams': {'instructionSet': 'GateBased',\n",
+ " 'name': 'qubit_gate_ns_e3',\n",
+ " 'oneQubitGateErrorRate': 0.001,\n",
+ " 'oneQubitGateTime': '50 ns',\n",
+ " 'oneQubitMeasurementErrorRate': 0.001,\n",
+ " 'oneQubitMeasurementTime': '100 ns',\n",
+ " 'tGateErrorRate': 0.001,\n",
+ " 'tGateTime': '50 ns',\n",
+ " 'twoQubitGateErrorRate': 0.001,\n",
+ " 'twoQubitGateTime': '50 ns'}},\n",
+ " 'logicalCounts': {'ccixCount': 0,\n",
+ " 'cczCount': 1,\n",
+ " 'measurementCount': 0,\n",
+ " 'numQubits': 6,\n",
+ " 'rotationCount': 0,\n",
+ " 'rotationDepth': 0,\n",
+ " 'tCount': 0},\n",
+ " 'logicalQubit': {'codeDistance': 9,\n",
+ " 'logicalCycleTime': 3600.0,\n",
+ " 'logicalErrorRate': 3.0000000000000015e-07,\n",
+ " 'physicalQubits': 162},\n",
+ " 'physicalCounts': {'breakdown': {'algorithmicLogicalDepth': 3,\n",
+ " 'algorithmicLogicalQubits': 20,\n",
+ " 'cliffordErrorRate': 0.001,\n",
+ " 'logicalDepth': 13,\n",
+ " 'numTfactories': 4,\n",
+ " 'numTfactoryRuns': 1,\n",
+ " 'numTsPerRotation': None,\n",
+ " 'numTstates': 4,\n",
+ " 'physicalQubitsForAlgorithm': 3240,\n",
+ " 'physicalQubitsForTfactories': 15680,\n",
+ " 'requiredLogicalQubitErrorRate': 1.923076923076923e-06,\n",
+ " 'requiredLogicalTstateErrorRate': 0.000125},\n",
+ " 'physicalQubits': 18920,\n",
+ " 'runtime': 46800},\n",
+ " 'physicalCountsFormatted': {'codeDistancePerRound': '7',\n",
+ " 'errorBudget': '1.00e-3',\n",
+ " 'errorBudgetLogical': '5.00e-4',\n",
+ " 'errorBudgetRotations': '0.00e0',\n",
+ " 'errorBudgetTstates': '5.00e-4',\n",
+ " 'logicalCycleTime': '3us 600ns',\n",
+ " 'logicalErrorRate': '3.00e-7',\n",
+ " 'numTsPerRotation': 'No rotations in algorithm',\n",
+ " 'numUnitsPerRound': '2',\n",
+ " 'physicalQubitsForTfactoriesPercentage': '82.88 %',\n",
+ " 'physicalQubitsPerRound': '3920',\n",
+ " 'requiredLogicalQubitErrorRate': '1.92e-6',\n",
+ " 'requiredLogicalTstateErrorRate': '1.25e-4',\n",
+ " 'runtime': '46us 800ns',\n",
+ " 'tfactoryRuntime': '36us 400ns',\n",
+ " 'tfactoryRuntimePerRound': '36us 400ns',\n",
+ " 'tstateLogicalErrorRate': '2.13e-5',\n",
+ " 'unitNamePerRound': '15-to-1 space efficient logical'},\n",
+ " 'reportData': {'assumptions': ['_More details on the following lists of assumptions can be found in the paper [Accessing requirements for scaling quantum computers and their applications](https://aka.ms/AQ/RE/Paper)._',\n",
+ " '**Uniform independent physical noise.** We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.',\n",
+ " '**Efficient classical computation.** We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.',\n",
+ " '**Extraction circuits for planar quantum ISA.** We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).',\n",
+ " '**Uniform independent logical noise.** We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.',\n",
+ " '**Negligible Clifford costs for synthesis.** We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.',\n",
+ " '**Smooth magic state consumption rate.** We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.'],\n",
+ " 'groups': [{'alwaysVisible': True,\n",
+ " 'entries': [{'description': 'Number of physical qubits',\n",
+ " 'explanation': 'This value represents the total number of physical qubits, which is the sum of 3240 physical qubits to implement the algorithm logic, and 15680 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'physicalCounts/physicalQubits'},\n",
+ " {'description': 'Total runtime',\n",
+ " 'explanation': 'This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (3us 600ns) multiplied by the 3 logical cycles to run the algorithm. If however the duration of a single T factory (here: 36us 400ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory.',\n",
+ " 'label': 'Runtime',\n",
+ " 'path': 'physicalCountsFormatted/runtime'}],\n",
+ " 'title': 'Physical resource estimates'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of logical qubits for the algorithm after layout',\n",
+ " 'explanation': 'Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the $Q_{\\\\rm alg} = 6$ logical qubits in the input algorithm, we require in total $2 \\\\cdot Q_{\\\\rm alg} + \\\\lceil \\\\sqrt{8 \\\\cdot Q_{\\\\rm alg}}\\\\rceil + 1 = 20$ logical qubits.',\n",
+ " 'label': 'Logical algorithmic qubits',\n",
+ " 'path': 'physicalCounts/breakdown/algorithmicLogicalQubits'},\n",
+ " {'description': 'Number of logical cycles for the algorithm',\n",
+ " 'explanation': 'To execute the algorithm using _Parallel Synthesis Sequential Pauli Computation_ (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 0 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 1 CCZ and 0 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation.',\n",
+ " 'label': 'Algorithmic depth',\n",
+ " 'path': 'physicalCounts/breakdown/algorithmicLogicalDepth'},\n",
+ " {'description': 'Number of logical cycles performed',\n",
+ " 'explanation': \"This number is usually equal to the logical depth of the algorithm, which is 3. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time.\",\n",
+ " 'label': 'Logical depth',\n",
+ " 'path': 'physicalCounts/breakdown/logicalDepth'},\n",
+ " {'description': 'Number of T states consumed by the algorithm',\n",
+ " 'explanation': 'To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 1 CCZ and 0 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation.',\n",
+ " 'label': 'Number of T states',\n",
+ " 'path': 'physicalCounts/breakdown/numTstates'},\n",
+ " {'description': \"Number of T factories capable of producing the demanded 4 T states during the algorithm's runtime\",\n",
+ " 'explanation': 'The total number of T factories 4 that are executed in parallel is computed as $\\\\left\\\\lceil\\\\dfrac{4\\\\;\\\\text{T states} \\\\cdot 36us 400ns\\\\;\\\\text{T factory duration}}{1\\\\;\\\\text{T states per T factory} \\\\cdot 46us 800ns\\\\;\\\\text{algorithm runtime}}\\\\right\\\\rceil$',\n",
+ " 'label': 'Number of T factories',\n",
+ " 'path': 'physicalCounts/breakdown/numTfactories'},\n",
+ " {'description': 'Number of times all T factories are invoked',\n",
+ " 'explanation': 'In order to prepare the 4 T states, the 4 copies of the T factory are repeatedly invoked 1 times.',\n",
+ " 'label': 'Number of T factory invocations',\n",
+ " 'path': 'physicalCounts/breakdown/numTfactoryRuns'},\n",
+ " {'description': 'Number of physical qubits for the algorithm after layout',\n",
+ " 'explanation': 'The 3240 are the product of the 20 logical qubits after layout and the 162 physical qubits that encode a single logical qubit.',\n",
+ " 'label': 'Physical algorithmic qubits',\n",
+ " 'path': 'physicalCounts/breakdown/physicalQubitsForAlgorithm'},\n",
+ " {'description': 'Number of physical qubits for the T factories',\n",
+ " 'explanation': 'Each T factory requires 3920 physical qubits and we run 4 in parallel, therefore we need $15680 = 3920 \\\\cdot 4$ qubits.',\n",
+ " 'label': 'Physical T factory qubits',\n",
+ " 'path': 'physicalCounts/breakdown/physicalQubitsForTfactories'},\n",
+ " {'description': 'The minimum logical qubit error rate required to run the algorithm within the error budget',\n",
+ " 'explanation': 'The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 20 logical qubits and the total cycle count 13.',\n",
+ " 'label': 'Required logical qubit error rate',\n",
+ " 'path': 'physicalCountsFormatted/requiredLogicalQubitErrorRate'},\n",
+ " {'description': 'The minimum T state error rate required for distilled T states',\n",
+ " 'explanation': 'The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 4.',\n",
+ " 'label': 'Required logical T state error rate',\n",
+ " 'path': 'physicalCountsFormatted/requiredLogicalTstateErrorRate'},\n",
+ " {'description': 'Number of T states to implement a rotation with an arbitrary angle',\n",
+ " 'explanation': 'The number of T states to implement a rotation with an arbitrary angle is $\\\\lceil 0.53 \\\\log_2(0 / 0) + 5.3\\\\rceil$ [[arXiv:2203.10064](https://arxiv.org/abs/2203.10064)]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases.',\n",
+ " 'label': 'Number of T states per rotation',\n",
+ " 'path': 'physicalCountsFormatted/numTsPerRotation'}],\n",
+ " 'title': 'Resource estimates breakdown'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Name of QEC scheme',\n",
+ " 'explanation': 'You can load pre-defined QEC schemes by using the name `surface_code` or `floquet_code`. The latter only works with Majorana qubits.',\n",
+ " 'label': 'QEC scheme',\n",
+ " 'path': 'jobParams/qecScheme/name'},\n",
+ " {'description': 'Required code distance for error correction',\n",
+ " 'explanation': 'The code distance is the smallest odd integer greater or equal to $\\\\dfrac{2\\\\log(0.03 / 0.000001923076923076923)}{\\\\log(0.01/0.001)} - 1$',\n",
+ " 'label': 'Code distance',\n",
+ " 'path': 'logicalQubit/codeDistance'},\n",
+ " {'description': 'Number of physical qubits per logical qubit',\n",
+ " 'explanation': 'The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'logicalQubit/physicalQubits'},\n",
+ " {'description': 'Duration of a logical cycle in nanoseconds',\n",
+ " 'explanation': 'The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified.',\n",
+ " 'label': 'Logical cycle time',\n",
+ " 'path': 'physicalCountsFormatted/logicalCycleTime'},\n",
+ " {'description': 'Logical qubit error rate',\n",
+ " 'explanation': 'The logical qubit error rate is computed as $0.03 \\\\cdot \\\\left(\\\\dfrac{0.001}{0.01}\\\\right)^\\\\frac{9 + 1}{2}$',\n",
+ " 'label': 'Logical qubit error rate',\n",
+ " 'path': 'physicalCountsFormatted/logicalErrorRate'},\n",
+ " {'description': 'Crossing prefactor used in QEC scheme',\n",
+ " 'explanation': 'The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate.',\n",
+ " 'label': 'Crossing prefactor',\n",
+ " 'path': 'jobParams/qecScheme/crossingPrefactor'},\n",
+ " {'description': 'Error correction threshold used in QEC scheme',\n",
+ " 'explanation': 'The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate.',\n",
+ " 'label': 'Error correction threshold',\n",
+ " 'path': 'jobParams/qecScheme/errorCorrectionThreshold'},\n",
+ " {'description': 'QEC scheme formula used to compute logical cycle time',\n",
+ " 'explanation': 'This is the formula that is used to compute the logical cycle time 3us 600ns.',\n",
+ " 'label': 'Logical cycle time formula',\n",
+ " 'path': 'jobParams/qecScheme/logicalCycleTime'},\n",
+ " {'description': 'QEC scheme formula used to compute number of physical qubits per logical qubit',\n",
+ " 'explanation': 'This is the formula that is used to compute the number of physical qubits per logical qubits 162.',\n",
+ " 'label': 'Physical qubits formula',\n",
+ " 'path': 'jobParams/qecScheme/physicalQubitsPerLogicalQubit'}],\n",
+ " 'title': 'Logical qubit parameters'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of physical qubits for a single T factory',\n",
+ " 'explanation': 'This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'tfactory/physicalQubits'},\n",
+ " {'description': 'Runtime of a single T factory',\n",
+ " 'explanation': 'The runtime of a single T factory is the accumulated runtime of executing each round in a T factory.',\n",
+ " 'label': 'Runtime',\n",
+ " 'path': 'physicalCountsFormatted/tfactoryRuntime'},\n",
+ " {'description': 'Number of output T states produced in a single run of T factory',\n",
+ " 'explanation': 'The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.13e-5.',\n",
+ " 'label': 'Number of output T states per run',\n",
+ " 'path': 'tfactory/numTstates'},\n",
+ " {'description': 'Number of physical input T states consumed in a single run of a T factory',\n",
+ " 'explanation': 'This value includes the physical input T states of all copies of the distillation unit in the first round.',\n",
+ " 'label': 'Number of input T states per run',\n",
+ " 'path': 'tfactory/numInputTstates'},\n",
+ " {'description': 'The number of distillation rounds',\n",
+ " 'explanation': 'This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed.',\n",
+ " 'label': 'Distillation rounds',\n",
+ " 'path': 'tfactory/numRounds'},\n",
+ " {'description': 'The number of units in each round of distillation',\n",
+ " 'explanation': 'This is the number of copies for the distillation units per round.',\n",
+ " 'label': 'Distillation units per round',\n",
+ " 'path': 'physicalCountsFormatted/numUnitsPerRound'},\n",
+ " {'description': 'The types of distillation units',\n",
+ " 'explanation': 'These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units.',\n",
+ " 'label': 'Distillation units',\n",
+ " 'path': 'physicalCountsFormatted/unitNamePerRound'},\n",
+ " {'description': 'The code distance in each round of distillation',\n",
+ " 'explanation': 'This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits.',\n",
+ " 'label': 'Distillation code distances',\n",
+ " 'path': 'physicalCountsFormatted/codeDistancePerRound'},\n",
+ " {'description': 'The number of physical qubits used in each round of distillation',\n",
+ " 'explanation': 'The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds.',\n",
+ " 'label': 'Number of physical qubits per round',\n",
+ " 'path': 'physicalCountsFormatted/physicalQubitsPerRound'},\n",
+ " {'description': 'The runtime of each distillation round',\n",
+ " 'explanation': 'The runtime of the T factory is the sum of the runtimes in all rounds.',\n",
+ " 'label': 'Runtime per round',\n",
+ " 'path': 'physicalCountsFormatted/tfactoryRuntimePerRound'},\n",
+ " {'description': 'Logical T state error rate',\n",
+ " 'explanation': 'This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 1.25e-4.',\n",
+ " 'label': 'Logical T state error rate',\n",
+ " 'path': 'physicalCountsFormatted/tstateLogicalErrorRate'}],\n",
+ " 'title': 'T factory parameters'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of logical qubits in the input quantum program',\n",
+ " 'explanation': 'We determine 20 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits.',\n",
+ " 'label': 'Logical qubits (pre-layout)',\n",
+ " 'path': 'logicalCounts/numQubits'},\n",
+ " {'description': 'Number of T gates in the input quantum program',\n",
+ " 'explanation': 'This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates.',\n",
+ " 'label': 'T gates',\n",
+ " 'path': 'logicalCounts/tCount'},\n",
+ " {'description': 'Number of rotation gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number.',\n",
+ " 'label': 'Rotation gates',\n",
+ " 'path': 'logicalCounts/rotationCount'},\n",
+ " {'description': 'Depth of rotation gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle.',\n",
+ " 'label': 'Rotation depth',\n",
+ " 'path': 'logicalCounts/rotationDepth'},\n",
+ " {'description': 'Number of CCZ-gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of CCZ gates.',\n",
+ " 'label': 'CCZ gates',\n",
+ " 'path': 'logicalCounts/cczCount'},\n",
+ " {'description': 'Number of CCiX-gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of CCiX gates, which applies $-iX$ controlled on two control qubits [[1212.5069](https://arxiv.org/abs/1212.5069)].',\n",
+ " 'label': 'CCiX gates',\n",
+ " 'path': 'logicalCounts/ccixCount'},\n",
+ " {'description': 'Number of single qubit measurements in the input quantum program',\n",
+ " 'explanation': 'This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%.',\n",
+ " 'label': 'Measurement operations',\n",
+ " 'path': 'logicalCounts/measurementCount'}],\n",
+ " 'title': 'Pre-layout logical resources'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Total error budget for the algorithm',\n",
+ " 'explanation': \"The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget $\\\\epsilon = \\\\epsilon_{\\\\log} + \\\\epsilon_{\\\\rm dis} + \\\\epsilon_{\\\\rm syn}$ is uniformly distributed and applies to errors $\\\\epsilon_{\\\\log}$ to implement logical qubits, an error budget $\\\\epsilon_{\\\\rm dis}$ to produce T states through distillation, and an error budget $\\\\epsilon_{\\\\rm syn}$ to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets $\\\\epsilon_{\\\\rm dis}$ and $\\\\epsilon_{\\\\rm syn}$ are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors.\",\n",
+ " 'label': 'Total error budget',\n",
+ " 'path': 'physicalCountsFormatted/errorBudget'},\n",
+ " {'description': 'Probability of at least one logical error',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.',\n",
+ " 'label': 'Logical error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetLogical'},\n",
+ " {'description': 'Probability of at least one faulty T distillation',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.',\n",
+ " 'label': 'T distillation error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetTstates'},\n",
+ " {'description': 'Probability of at least one failed rotation synthesis',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3.',\n",
+ " 'label': 'Rotation synthesis error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetRotations'}],\n",
+ " 'title': 'Assumed error budget'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Some descriptive name for the qubit model',\n",
+ " 'explanation': 'You can load pre-defined qubit parameters by using the names `qubit_gate_ns_e3`, `qubit_gate_ns_e4`, `qubit_gate_us_e3`, `qubit_gate_us_e4`, `qubit_maj_ns_e4`, or `qubit_maj_ns_e6`. The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates).',\n",
+ " 'label': 'Qubit name',\n",
+ " 'path': 'jobParams/qubitParams/name'},\n",
+ " {'description': 'Underlying qubit technology (gate-based or Majorana)',\n",
+ " 'explanation': 'When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either *gate-based* or *Majorana*. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations.',\n",
+ " 'label': 'Instruction set',\n",
+ " 'path': 'jobParams/qubitParams/instructionSet'},\n",
+ " {'description': 'Operation time for single-qubit measurement (t_meas) in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis.',\n",
+ " 'label': 'Single-qubit measurement time',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitMeasurementTime'},\n",
+ " {'description': 'Operation time for single-qubit gate (t_gate) in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates.',\n",
+ " 'label': 'Single-qubit gate time',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitGateTime'},\n",
+ " {'description': 'Operation time for two-qubit gate in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate.',\n",
+ " 'label': 'Two-qubit gate time',\n",
+ " 'path': 'jobParams/qubitParams/twoQubitGateTime'},\n",
+ " {'description': 'Operation time for a T gate',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to execute a T gate.',\n",
+ " 'label': 'T gate time',\n",
+ " 'path': 'jobParams/qubitParams/tGateTime'},\n",
+ " {'description': 'Error rate for single-qubit measurement',\n",
+ " 'explanation': 'This is the probability in which a single-qubit measurement in the Pauli basis may fail.',\n",
+ " 'label': 'Single-qubit measurement error rate',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitMeasurementErrorRate'},\n",
+ " {'description': 'Error rate for single-qubit Clifford gate (p)',\n",
+ " 'explanation': 'This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail.',\n",
+ " 'label': 'Single-qubit error rate',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitGateErrorRate'},\n",
+ " {'description': 'Error rate for two-qubit Clifford gate',\n",
+ " 'explanation': 'This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail.',\n",
+ " 'label': 'Two-qubit error rate',\n",
+ " 'path': 'jobParams/qubitParams/twoQubitGateErrorRate'},\n",
+ " {'description': 'Error rate to prepare single-qubit T state or apply a T gate (p_T)',\n",
+ " 'explanation': 'This is the probability in which executing a single T gate may fail.',\n",
+ " 'label': 'T gate error rate',\n",
+ " 'path': 'jobParams/qubitParams/tGateErrorRate'}],\n",
+ " 'title': 'Physical qubit parameters'}]},\n",
+ " 'status': 'success',\n",
+ " 'tfactory': {'codeDistancePerRound': [7],\n",
+ " 'logicalErrorRate': 2.133500000000001e-05,\n",
+ " 'numInputTstates': 30,\n",
+ " 'numRounds': 1,\n",
+ " 'numTstates': 1,\n",
+ " 'numUnitsPerRound': [2],\n",
+ " 'physicalQubits': 3920,\n",
+ " 'physicalQubitsPerRound': [3920],\n",
+ " 'runtime': 36400.0,\n",
+ " 'runtimePerRound': [36400.0],\n",
+ " 'unitNamePerRound': ['15-to-1 space efficient logical']}}"
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# If you need to pull up the results of an old job, use its job ID with qsharp.azure.output command\n",
+ "# result = qsharp.azure.output(\"...\")\n",
+ "result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "# The function that extracts the relevant resource information from the resource estimation job results and produces your absolute score.\n",
+ "def evaluate_results(res) : \n",
+ " width = res['physicalCounts']['breakdown']['algorithmicLogicalQubits']\n",
+ " depth = res['physicalCounts']['breakdown']['algorithmicLogicalDepth']\n",
+ " print(f\"Logical algorithmic qubits = {width}\")\n",
+ " print(f\"Algorithmic depth = {depth}\")\n",
+ " print(f\"Score = {width * depth}\")\n",
+ " return width * depth\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Logical algorithmic qubits = 20\n",
+ "Algorithmic depth = 3\n",
+ "Score = 60\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "60"
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "evaluate_results(result)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernel_info": {
+ "name": "python3"
+ },
+ "kernelspec": {
+ "display_name": "Python 3 [Q#]",
+ "language": "python",
+ "name": "python3_qsharp_b54crn"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.10"
+ },
+ "nteract": {
+ "version": "nteract-front-end@1.0.0"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/team_solutions/team_11/iQuHack-challenge-2023-task2.ipynb b/team_solutions/team_11/iQuHack-challenge-2023-task2.ipynb
new file mode 100644
index 0000000..eeea0c3
--- /dev/null
+++ b/team_solutions/team_11/iQuHack-challenge-2023-task2.ipynb
@@ -0,0 +1,2532 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "# MIT iQuHack Microsoft Challenge: Optimizing Quantum Oracles, Task 2\n",
+ "\n",
+ "To work on this task,\n",
+ "1. Use the notebook for this task. Each of the notebooks in the repository has the code of the corresponding task.\n",
+ "2. Update your team name and Slack ID variables in the next code cell (you can use different Slack IDs for different tasks if different team members work on them, but make sure to use the same team name throughout the Hackathon). Do not change the task variable!\n",
+ "3. Work on your task in the cell that contains operation `Task2`! Your goal is to rewrite the code so that it maintains its correctness, but requires as few resources as possible. See `evaluate_results` function for details on how your absolute score for the task is calculated.\n",
+ "4. Submit your task using qBraid. Use the Share Notebook feature on qBraid (See File > Share Notebook) and enter the email rickyyoung@qbraid.com. Once you click submit, if the share notebook feature works correctly, it should show that you receive no errors and the email you entered will disappear. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "Log in to Azure (once per session, don't need to do it if running from Azure workspace)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\u001b[93mTo sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code FCD5BVNSW to authenticate.\u001b[0m\n",
+ "[\n",
+ " {\n",
+ " \"cloudName\": \"AzureCloud\",\n",
+ " \"homeTenantId\": \"59729b1d-e2cb-4588-971e-4ecb3e3c1ada\",\n",
+ " \"id\": \"21499353-dbb9-4df1-86f5-b930908798f6\",\n",
+ " \"isDefault\": true,\n",
+ " \"managedByTenants\": [\n",
+ " {\n",
+ " \"tenantId\": \"d0ecd01b-d782-448e-bae0-c3cad0e0543a\"\n",
+ " },\n",
+ " {\n",
+ " \"tenantId\": \"94c4857e-1130-4ab8-8eac-069b40c9db20\"\n",
+ " },\n",
+ " {\n",
+ " \"tenantId\": \"f702a9dc-ae48-4dc7-8f0a-8155a6dfa4e5\"\n",
+ " }\n",
+ " ],\n",
+ " \"name\": \"Free Trial\",\n",
+ " \"state\": \"Enabled\",\n",
+ " \"tenantId\": \"59729b1d-e2cb-4588-971e-4ecb3e3c1ada\",\n",
+ " \"user\": {\n",
+ " \"name\": \"rituthombre99@outlook.com\",\n",
+ " \"type\": \"user\"\n",
+ " }\n",
+ " }\n",
+ "]\n"
+ ]
+ }
+ ],
+ "source": [
+ "!az login"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 1. Write the code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "# Run this code cell to import the modules required to work with Q# and Azure\n",
+ "import qsharp\n",
+ "from qsharp import azure"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "teamname=\"team_11\" # Update this field with your team name\n",
+ "task=[\"task2\"]\n",
+ "slack_id=\"U04JZ2Y6GE9\" # Update this field with Slack ID of the person who worked on this task as the troubleshooting contact"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "# You don't need to run this cell, it defines Q# operations as Python types to keep IntelliSense happy\n",
+ "Task2_DumpMachineWrapper : qsharp.QSharpCallable = None\n",
+ "Task2_ResourceEstimationWrapper : qsharp.QSharpCallable = None"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "**The complete code for Task 2 should be in this cell.** \n",
+ "This cell can include additional open statements and helper operations and functions if your solution needs them. \n",
+ "If you define helper operations in other cells, they will not be picked up by the grader!"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "microsoft": {
+ "language": "qsharp"
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "%%qsharp\n",
+ "open Microsoft.Quantum.Canon;\n",
+ "open Microsoft.Quantum.Diagnostics;\n",
+ "\n",
+ "// Task 2. Celebrate MIT iQuHack!\n",
+ "// (input will contain 5 qubits)\n",
+ "operation Task2(input : Qubit[], target : Qubit) : Unit is Adj {\n",
+ " \n",
+ " // Unitary for I not required as it is applied twice, hence uncomputed in the end\n",
+ " ControlledOnInt(13, X)(input, target); // M\n",
+ " //ControlledOnInt( 9, X)(input, target); // I\n",
+ " ControlledOnInt(20, X)(input, target); // T\n",
+ "\n",
+ " //ControlledOnInt( 9, X)(input, target); // I\n",
+ " ControlledOnInt(17, X)(input, target); // Q\n",
+ " ControlledOnInt(21, X)(input, target); // U\n",
+ " ControlledOnInt( 8, X)(input, target); // H\n",
+ " ControlledOnInt( 1, X)(input, target); // A\n",
+ " ControlledOnInt( 3, X)(input, target); // C\n",
+ " ControlledOnInt(11, X)(input, target); // K\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "microsoft": {
+ "language": "qsharp"
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [],
+ "source": [
+ "%%qsharp\n",
+ "// Wrapper operation that allows you to observe the effects of the marking oracle by running it on a simulator.\n",
+ "operation Task2_DumpMachineWrapper() : Unit {\n",
+ " let N = 5;\n",
+ " use (input, target) = (Qubit[N], Qubit());\n",
+ " // Prepare an equal superposition of all input states in the input register.\n",
+ " ApplyToEach(H, input);\n",
+ " // Apply the oracle.\n",
+ " Task2(input, target);\n",
+ " // Print the state of the system after the oracle application.\n",
+ " DumpMachine();\n",
+ " ResetAll(input + [target]);\n",
+ "}\n",
+ "\n",
+ "// Wrapper operation that allows to run resource estimation for the task.\n",
+ "// This operation only allocates the qubits and applies the oracle once, not using any additional gates or measurements.\n",
+ "operation Task2_ResourceEstimationWrapper() : Unit {\n",
+ " let N = 5;\n",
+ " use (input, target) = (Qubit[N], Qubit());\n",
+ " Task2(input, target);\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 2. Run the code on a simulator to see what it does\n",
+ "You can also write your own code to explore the effects of the oracle (for example, applying it to different basis states and measuring the results)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "{\"diagnostic_kind\":\"state-vector\",\"qubit_ids\":[0,1,2,3,4,5],\"n_qubits\":6,\"amplitudes\":{\"0\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"1\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"2\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"3\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"4\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"5\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"6\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"7\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"8\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"9\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"10\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"11\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"12\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"13\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"14\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"15\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"16\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"17\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"18\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"19\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"20\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"21\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"22\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"23\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"24\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"25\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"26\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"27\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"28\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"29\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"30\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"31\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"32\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"33\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"34\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"35\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"36\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"37\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"38\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"39\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"40\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"41\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"42\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"43\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"44\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"45\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"46\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"47\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"48\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"49\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"50\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"51\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"52\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"53\":{\"Real\":0.17677669529663698,\"Imaginary\":0.0,\"Magnitude\":0.17677669529663698,\"Phase\":0.0},\"54\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"55\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"56\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"57\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"58\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"59\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"60\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"61\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"62\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0},\"63\":{\"Real\":0.0,\"Imaginary\":0.0,\"Magnitude\":0.0,\"Phase\":0.0}}}",
+ "text/html": [
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " Qubit IDs | \r\n",
+ " 0, 1, 2, 3, 4, 5 | \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ " Basis state (bitstring) | \r\n",
+ " Amplitude | Meas. Pr. | \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " \r\n",
+ " $\\left|000000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|000010\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|000101\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|000110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|001000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|001011\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|001100\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|001110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|010000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|010010\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|010100\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|010110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|011000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|011010\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|011100\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|011110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|100001\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|100011\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|100100\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|100110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|101000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|101011\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|101101\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|101110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|110001\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|110010\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|110101\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|110110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|111000\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|111010\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|111100\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " $\\left|111110\\right\\rangle$ | \r\n",
+ " $0.1768 + 0.0000 i$ | \r\n",
+ " \r\n",
+ " \r\n",
+ " | \r\n",
+ " \r\n",
+ " \r\n",
+ "
\r\n",
+ " \r\n",
+ " \r\n",
+ "
"
+ ],
+ "text/plain": [
+ "|000000โฉ\t0.17677669529663698 + 0๐\n",
+ "|000010โฉ\t0.17677669529663698 + 0๐\n",
+ "|000101โฉ\t0.17677669529663698 + 0๐\n",
+ "|000110โฉ\t0.17677669529663698 + 0๐\n",
+ "|001000โฉ\t0.17677669529663698 + 0๐\n",
+ "|001011โฉ\t0.17677669529663698 + 0๐\n",
+ "|001100โฉ\t0.17677669529663698 + 0๐\n",
+ "|001110โฉ\t0.17677669529663698 + 0๐\n",
+ "|010000โฉ\t0.17677669529663698 + 0๐\n",
+ "|010010โฉ\t0.17677669529663698 + 0๐\n",
+ "|010100โฉ\t0.17677669529663698 + 0๐\n",
+ "|010110โฉ\t0.17677669529663698 + 0๐\n",
+ "|011000โฉ\t0.17677669529663698 + 0๐\n",
+ "|011010โฉ\t0.17677669529663698 + 0๐\n",
+ "|011100โฉ\t0.17677669529663698 + 0๐\n",
+ "|011110โฉ\t0.17677669529663698 + 0๐\n",
+ "|100001โฉ\t0.17677669529663698 + 0๐\n",
+ "|100011โฉ\t0.17677669529663698 + 0๐\n",
+ "|100100โฉ\t0.17677669529663698 + 0๐\n",
+ "|100110โฉ\t0.17677669529663698 + 0๐\n",
+ "|101000โฉ\t0.17677669529663698 + 0๐\n",
+ "|101011โฉ\t0.17677669529663698 + 0๐\n",
+ "|101101โฉ\t0.17677669529663698 + 0๐\n",
+ "|101110โฉ\t0.17677669529663698 + 0๐\n",
+ "|110001โฉ\t0.17677669529663698 + 0๐\n",
+ "|110010โฉ\t0.17677669529663698 + 0๐\n",
+ "|110101โฉ\t0.17677669529663698 + 0๐\n",
+ "|110110โฉ\t0.17677669529663698 + 0๐\n",
+ "|111000โฉ\t0.17677669529663698 + 0๐\n",
+ "|111010โฉ\t0.17677669529663698 + 0๐\n",
+ "|111100โฉ\t0.17677669529663698 + 0๐\n",
+ "|111110โฉ\t0.17677669529663698 + 0๐"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "()"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Note that in the output of this cell the target qubit corresponds to the rightmost bit\n",
+ "qsharp.config[\"dump.basisStateLabelingConvention\"]=\"Bitstring\"\n",
+ "qsharp.config[\"dump.phaseDisplayStyle\"]=\"None\"\n",
+ "# Uncomment the following line if you want to see only the entries with non-zero amplitudes\n",
+ "qsharp.config[\"dump.truncateSmallAmplitudes\"]=True\n",
+ "Task2_DumpMachineWrapper.simulate()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "source": [
+ "## Step 3. Evaluate the code using resource estimation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "\"Connecting to Azure Quantum...\"",
+ "text/plain": [
+ "Connecting to Azure Quantum..."
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Connected to Azure Quantum workspace IQuHackteam11 in location eastus.\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "[{'id': 'ionq.qpu', 'current_availability': {}, 'average_queue_time': 186414},\n",
+ " {'id': 'ionq.qpu.aria-1', 'current_availability': {}, 'average_queue_time': 432942},\n",
+ " {'id': 'ionq.simulator', 'current_availability': {}, 'average_queue_time': 2},\n",
+ " {'id': 'microsoft.estimator', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s1-apival', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.hqs-lt-s2', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.hqs-lt-s2-apival', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.hqs-lt-s1-sim', 'current_availability': {}, 'average_queue_time': 623},\n",
+ " {'id': 'quantinuum.hqs-lt-s2-sim', 'current_availability': {}, 'average_queue_time': 156},\n",
+ " {'id': 'quantinuum.hqs-lt', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.qpu.h1-1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.sim.h1-1sc', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.qpu.h1-2', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'quantinuum.sim.h1-2sc', 'current_availability': {}, 'average_queue_time': 1},\n",
+ " {'id': 'quantinuum.sim.h1-1e', 'current_availability': {}, 'average_queue_time': 623},\n",
+ " {'id': 'quantinuum.sim.h1-2e', 'current_availability': {}, 'average_queue_time': 156},\n",
+ " {'id': 'quantinuum.qpu.h1', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'rigetti.sim.qvm', 'current_availability': {}, 'average_queue_time': 5},\n",
+ " {'id': 'rigetti.qpu.aspen-11', 'current_availability': {}, 'average_queue_time': 0},\n",
+ " {'id': 'rigetti.qpu.aspen-m-2', 'current_availability': {}, 'average_queue_time': 5},\n",
+ " {'id': 'rigetti.qpu.aspen-m-3', 'current_availability': {}, 'average_queue_time': 5}]"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# If you're using this notebook in Azure Quantum hosted notebooks, remove the credential=\"CLI\" parameter!\n",
+ "# If you're using this notebook in qBraid, keep it\n",
+ "qsharp.azure.connect(\n",
+ " resourceId=\"/subscriptions/21499353-dbb9-4df1-86f5-b930908798f6/resourceGroups/AzureQuantum/providers/Microsoft.Quantum/Workspaces/IQuHackteam11\",\n",
+ " location=\"East US\",\n",
+ " credential=\"CLI\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Loading package Microsoft.Quantum.Providers.Core and dependencies...\n",
+ "Active target is now microsoft.estimator\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "{'id': 'microsoft.estimator', 'current_availability': {}, 'average_queue_time': 0}"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "qsharp.azure.target(\"microsoft.estimator\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Submitting Task2_ResourceEstimationWrapper to target microsoft.estimator...\n",
+ "Job successfully submitted.\n",
+ " Job name: RE for the task 2\n",
+ " Job ID: 27c11f9b-cde0-454f-8535-5eff6de48e60\n",
+ "Waiting up to 30 seconds for Azure Quantum job to complete...\n",
+ "[3:14:02 PM] Current job status: Waiting\n",
+ "[3:14:08 PM] Current job status: Succeeded\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Update job name to a more descriptive string to make it easier to find it in Job Management tab later\n",
+ "result = qsharp.azure.execute(Task2_ResourceEstimationWrapper, jobName=\"RE for the task 2\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/x-qsharp-data": "{\"errorBudget\":{\"logical\":0.0005,\"rotations\":0.0,\"tstates\":0.0005},\"jobParams\":{\"errorBudget\":0.001,\"qecScheme\":{\"crossingPrefactor\":0.03,\"errorCorrectionThreshold\":0.01,\"logicalCycleTime\":\"(4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance\",\"name\":\"surface_code\",\"physicalQubitsPerLogicalQubit\":\"2 * codeDistance * codeDistance\"},\"qubitParams\":{\"instructionSet\":\"GateBased\",\"name\":\"qubit_gate_ns_e3\",\"oneQubitGateErrorRate\":0.001,\"oneQubitGateTime\":\"50 ns\",\"oneQubitMeasurementErrorRate\":0.001,\"oneQubitMeasurementTime\":\"100 ns\",\"tGateErrorRate\":0.001,\"tGateTime\":\"50 ns\",\"twoQubitGateErrorRate\":0.001,\"twoQubitGateTime\":\"50 ns\"}},\"logicalCounts\":{\"ccixCount\":24,\"cczCount\":8,\"measurementCount\":24,\"numQubits\":9,\"rotationCount\":0,\"rotationDepth\":0,\"tCount\":0},\"logicalQubit\":{\"codeDistance\":11,\"logicalCycleTime\":4400.0,\"logicalErrorRate\":3.000000000000002E-08,\"physicalQubits\":242},\"physicalCounts\":{\"breakdown\":{\"algorithmicLogicalDepth\":120,\"algorithmicLogicalQubits\":28,\"cliffordErrorRate\":0.001,\"logicalDepth\":120,\"numTfactories\":12,\"numTfactoryRuns\":11,\"numTsPerRotation\":null,\"numTstates\":128,\"physicalQubitsForAlgorithm\":6776,\"physicalQubitsForTfactories\":77760,\"requiredLogicalQubitErrorRate\":1.4880952380952382E-07,\"requiredLogicalTstateErrorRate\":3.90625E-06},\"physicalQubits\":84536,\"runtime\":528000},\"physicalCountsFormatted\":{\"codeDistancePerRound\":\"9\",\"errorBudget\":\"1.00e-3\",\"errorBudgetLogical\":\"5.00e-4\",\"errorBudgetRotations\":\"0.00e0\",\"errorBudgetTstates\":\"5.00e-4\",\"logicalCycleTime\":\"4us 400ns\",\"logicalErrorRate\":\"3.00e-8\",\"numTsPerRotation\":\"No rotations in algorithm\",\"numUnitsPerRound\":\"2\",\"physicalQubitsForTfactoriesPercentage\":\"91.98 %\",\"physicalQubitsPerRound\":\"6480\",\"requiredLogicalQubitErrorRate\":\"1.49e-7\",\"requiredLogicalTstateErrorRate\":\"3.91e-6\",\"runtime\":\"528us\",\"tfactoryRuntime\":\"46us 800ns\",\"tfactoryRuntimePerRound\":\"46us 800ns\",\"tstateLogicalErrorRate\":\"2.17e-6\",\"unitNamePerRound\":\"15-to-1 space efficient logical\"},\"reportData\":{\"assumptions\":[\"_More details on the following lists of assumptions can be found in the paper [Accessing requirements for scaling quantum computers and their applications](https://aka.ms/AQ/RE/Paper)._\",\"**Uniform independent physical noise.** We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.\",\"**Efficient classical computation.** We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.\",\"**Extraction circuits for planar quantum ISA.** We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).\",\"**Uniform independent logical noise.** We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.\",\"**Negligible Clifford costs for synthesis.** We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.\",\"**Smooth magic state consumption rate.** We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.\"],\"groups\":[{\"alwaysVisible\":true,\"entries\":[{\"description\":\"Number of physical qubits\",\"explanation\":\"This value represents the total number of physical qubits, which is the sum of 6776 physical qubits to implement the algorithm logic, and 77760 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm.\",\"label\":\"Physical qubits\",\"path\":\"physicalCounts/physicalQubits\"},{\"description\":\"Total runtime\",\"explanation\":\"This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (4us 400ns) multiplied by the 120 logical cycles to run the algorithm. If however the duration of a single T factory (here: 46us 800ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory.\",\"label\":\"Runtime\",\"path\":\"physicalCountsFormatted/runtime\"}],\"title\":\"Physical resource estimates\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of logical qubits for the algorithm after layout\",\"explanation\":\"Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the $Q_{\\\\rm alg} = 9$ logical qubits in the input algorithm, we require in total $2 \\\\cdot Q_{\\\\rm alg} + \\\\lceil \\\\sqrt{8 \\\\cdot Q_{\\\\rm alg}}\\\\rceil + 1 = 28$ logical qubits.\",\"label\":\"Logical algorithmic qubits\",\"path\":\"physicalCounts/breakdown/algorithmicLogicalQubits\"},{\"description\":\"Number of logical cycles for the algorithm\",\"explanation\":\"To execute the algorithm using _Parallel Synthesis Sequential Pauli Computation_ (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 24 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 8 CCZ and 24 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation.\",\"label\":\"Algorithmic depth\",\"path\":\"physicalCounts/breakdown/algorithmicLogicalDepth\"},{\"description\":\"Number of logical cycles performed\",\"explanation\":\"This number is usually equal to the logical depth of the algorithm, which is 120. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time.\",\"label\":\"Logical depth\",\"path\":\"physicalCounts/breakdown/logicalDepth\"},{\"description\":\"Number of T states consumed by the algorithm\",\"explanation\":\"To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 8 CCZ and 24 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation.\",\"label\":\"Number of T states\",\"path\":\"physicalCounts/breakdown/numTstates\"},{\"description\":\"Number of T factories capable of producing the demanded 128 T states during the algorithm's runtime\",\"explanation\":\"The total number of T factories 12 that are executed in parallel is computed as $\\\\left\\\\lceil\\\\dfrac{128\\\\;\\\\text{T states} \\\\cdot 46us 800ns\\\\;\\\\text{T factory duration}}{1\\\\;\\\\text{T states per T factory} \\\\cdot 528us\\\\;\\\\text{algorithm runtime}}\\\\right\\\\rceil$\",\"label\":\"Number of T factories\",\"path\":\"physicalCounts/breakdown/numTfactories\"},{\"description\":\"Number of times all T factories are invoked\",\"explanation\":\"In order to prepare the 128 T states, the 12 copies of the T factory are repeatedly invoked 11 times.\",\"label\":\"Number of T factory invocations\",\"path\":\"physicalCounts/breakdown/numTfactoryRuns\"},{\"description\":\"Number of physical qubits for the algorithm after layout\",\"explanation\":\"The 6776 are the product of the 28 logical qubits after layout and the 242 physical qubits that encode a single logical qubit.\",\"label\":\"Physical algorithmic qubits\",\"path\":\"physicalCounts/breakdown/physicalQubitsForAlgorithm\"},{\"description\":\"Number of physical qubits for the T factories\",\"explanation\":\"Each T factory requires 6480 physical qubits and we run 12 in parallel, therefore we need $77760 = 6480 \\\\cdot 12$ qubits.\",\"label\":\"Physical T factory qubits\",\"path\":\"physicalCounts/breakdown/physicalQubitsForTfactories\"},{\"description\":\"The minimum logical qubit error rate required to run the algorithm within the error budget\",\"explanation\":\"The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 28 logical qubits and the total cycle count 120.\",\"label\":\"Required logical qubit error rate\",\"path\":\"physicalCountsFormatted/requiredLogicalQubitErrorRate\"},{\"description\":\"The minimum T state error rate required for distilled T states\",\"explanation\":\"The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 128.\",\"label\":\"Required logical T state error rate\",\"path\":\"physicalCountsFormatted/requiredLogicalTstateErrorRate\"},{\"description\":\"Number of T states to implement a rotation with an arbitrary angle\",\"explanation\":\"The number of T states to implement a rotation with an arbitrary angle is $\\\\lceil 0.53 \\\\log_2(0 / 0) + 5.3\\\\rceil$ [[arXiv:2203.10064](https://arxiv.org/abs/2203.10064)]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases.\",\"label\":\"Number of T states per rotation\",\"path\":\"physicalCountsFormatted/numTsPerRotation\"}],\"title\":\"Resource estimates breakdown\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Name of QEC scheme\",\"explanation\":\"You can load pre-defined QEC schemes by using the name `surface_code` or `floquet_code`. The latter only works with Majorana qubits.\",\"label\":\"QEC scheme\",\"path\":\"jobParams/qecScheme/name\"},{\"description\":\"Required code distance for error correction\",\"explanation\":\"The code distance is the smallest odd integer greater or equal to $\\\\dfrac{2\\\\log(0.03 / 0.00000014880952380952382)}{\\\\log(0.01/0.001)} - 1$\",\"label\":\"Code distance\",\"path\":\"logicalQubit/codeDistance\"},{\"description\":\"Number of physical qubits per logical qubit\",\"explanation\":\"The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified.\",\"label\":\"Physical qubits\",\"path\":\"logicalQubit/physicalQubits\"},{\"description\":\"Duration of a logical cycle in nanoseconds\",\"explanation\":\"The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified.\",\"label\":\"Logical cycle time\",\"path\":\"physicalCountsFormatted/logicalCycleTime\"},{\"description\":\"Logical qubit error rate\",\"explanation\":\"The logical qubit error rate is computed as $0.03 \\\\cdot \\\\left(\\\\dfrac{0.001}{0.01}\\\\right)^\\\\frac{11 + 1}{2}$\",\"label\":\"Logical qubit error rate\",\"path\":\"physicalCountsFormatted/logicalErrorRate\"},{\"description\":\"Crossing prefactor used in QEC scheme\",\"explanation\":\"The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate.\",\"label\":\"Crossing prefactor\",\"path\":\"jobParams/qecScheme/crossingPrefactor\"},{\"description\":\"Error correction threshold used in QEC scheme\",\"explanation\":\"The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate.\",\"label\":\"Error correction threshold\",\"path\":\"jobParams/qecScheme/errorCorrectionThreshold\"},{\"description\":\"QEC scheme formula used to compute logical cycle time\",\"explanation\":\"This is the formula that is used to compute the logical cycle time 4us 400ns.\",\"label\":\"Logical cycle time formula\",\"path\":\"jobParams/qecScheme/logicalCycleTime\"},{\"description\":\"QEC scheme formula used to compute number of physical qubits per logical qubit\",\"explanation\":\"This is the formula that is used to compute the number of physical qubits per logical qubits 242.\",\"label\":\"Physical qubits formula\",\"path\":\"jobParams/qecScheme/physicalQubitsPerLogicalQubit\"}],\"title\":\"Logical qubit parameters\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of physical qubits for a single T factory\",\"explanation\":\"This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate.\",\"label\":\"Physical qubits\",\"path\":\"tfactory/physicalQubits\"},{\"description\":\"Runtime of a single T factory\",\"explanation\":\"The runtime of a single T factory is the accumulated runtime of executing each round in a T factory.\",\"label\":\"Runtime\",\"path\":\"physicalCountsFormatted/tfactoryRuntime\"},{\"description\":\"Number of output T states produced in a single run of T factory\",\"explanation\":\"The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.17e-6.\",\"label\":\"Number of output T states per run\",\"path\":\"tfactory/numTstates\"},{\"description\":\"Number of physical input T states consumed in a single run of a T factory\",\"explanation\":\"This value includes the physical input T states of all copies of the distillation unit in the first round.\",\"label\":\"Number of input T states per run\",\"path\":\"tfactory/numInputTstates\"},{\"description\":\"The number of distillation rounds\",\"explanation\":\"This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed.\",\"label\":\"Distillation rounds\",\"path\":\"tfactory/numRounds\"},{\"description\":\"The number of units in each round of distillation\",\"explanation\":\"This is the number of copies for the distillation units per round.\",\"label\":\"Distillation units per round\",\"path\":\"physicalCountsFormatted/numUnitsPerRound\"},{\"description\":\"The types of distillation units\",\"explanation\":\"These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units.\",\"label\":\"Distillation units\",\"path\":\"physicalCountsFormatted/unitNamePerRound\"},{\"description\":\"The code distance in each round of distillation\",\"explanation\":\"This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits.\",\"label\":\"Distillation code distances\",\"path\":\"physicalCountsFormatted/codeDistancePerRound\"},{\"description\":\"The number of physical qubits used in each round of distillation\",\"explanation\":\"The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds.\",\"label\":\"Number of physical qubits per round\",\"path\":\"physicalCountsFormatted/physicalQubitsPerRound\"},{\"description\":\"The runtime of each distillation round\",\"explanation\":\"The runtime of the T factory is the sum of the runtimes in all rounds.\",\"label\":\"Runtime per round\",\"path\":\"physicalCountsFormatted/tfactoryRuntimePerRound\"},{\"description\":\"Logical T state error rate\",\"explanation\":\"This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 3.91e-6.\",\"label\":\"Logical T state error rate\",\"path\":\"physicalCountsFormatted/tstateLogicalErrorRate\"}],\"title\":\"T factory parameters\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Number of logical qubits in the input quantum program\",\"explanation\":\"We determine 28 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits.\",\"label\":\"Logical qubits (pre-layout)\",\"path\":\"logicalCounts/numQubits\"},{\"description\":\"Number of T gates in the input quantum program\",\"explanation\":\"This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates.\",\"label\":\"T gates\",\"path\":\"logicalCounts/tCount\"},{\"description\":\"Number of rotation gates in the input quantum program\",\"explanation\":\"This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number.\",\"label\":\"Rotation gates\",\"path\":\"logicalCounts/rotationCount\"},{\"description\":\"Depth of rotation gates in the input quantum program\",\"explanation\":\"This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle.\",\"label\":\"Rotation depth\",\"path\":\"logicalCounts/rotationDepth\"},{\"description\":\"Number of CCZ-gates in the input quantum program\",\"explanation\":\"This is the number of CCZ gates.\",\"label\":\"CCZ gates\",\"path\":\"logicalCounts/cczCount\"},{\"description\":\"Number of CCiX-gates in the input quantum program\",\"explanation\":\"This is the number of CCiX gates, which applies $-iX$ controlled on two control qubits [[1212.5069](https://arxiv.org/abs/1212.5069)].\",\"label\":\"CCiX gates\",\"path\":\"logicalCounts/ccixCount\"},{\"description\":\"Number of single qubit measurements in the input quantum program\",\"explanation\":\"This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%.\",\"label\":\"Measurement operations\",\"path\":\"logicalCounts/measurementCount\"}],\"title\":\"Pre-layout logical resources\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Total error budget for the algorithm\",\"explanation\":\"The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget $\\\\epsilon = \\\\epsilon_{\\\\log} + \\\\epsilon_{\\\\rm dis} + \\\\epsilon_{\\\\rm syn}$ is uniformly distributed and applies to errors $\\\\epsilon_{\\\\log}$ to implement logical qubits, an error budget $\\\\epsilon_{\\\\rm dis}$ to produce T states through distillation, and an error budget $\\\\epsilon_{\\\\rm syn}$ to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets $\\\\epsilon_{\\\\rm dis}$ and $\\\\epsilon_{\\\\rm syn}$ are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors.\",\"label\":\"Total error budget\",\"path\":\"physicalCountsFormatted/errorBudget\"},{\"description\":\"Probability of at least one logical error\",\"explanation\":\"This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.\",\"label\":\"Logical error probability\",\"path\":\"physicalCountsFormatted/errorBudgetLogical\"},{\"description\":\"Probability of at least one faulty T distillation\",\"explanation\":\"This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.\",\"label\":\"T distillation error probability\",\"path\":\"physicalCountsFormatted/errorBudgetTstates\"},{\"description\":\"Probability of at least one failed rotation synthesis\",\"explanation\":\"This is one third of the total error budget 1.00e-3.\",\"label\":\"Rotation synthesis error probability\",\"path\":\"physicalCountsFormatted/errorBudgetRotations\"}],\"title\":\"Assumed error budget\"},{\"alwaysVisible\":false,\"entries\":[{\"description\":\"Some descriptive name for the qubit model\",\"explanation\":\"You can load pre-defined qubit parameters by using the names `qubit_gate_ns_e3`, `qubit_gate_ns_e4`, `qubit_gate_us_e3`, `qubit_gate_us_e4`, `qubit_maj_ns_e4`, or `qubit_maj_ns_e6`. The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates).\",\"label\":\"Qubit name\",\"path\":\"jobParams/qubitParams/name\"},{\"description\":\"Underlying qubit technology (gate-based or Majorana)\",\"explanation\":\"When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either *gate-based* or *Majorana*. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations.\",\"label\":\"Instruction set\",\"path\":\"jobParams/qubitParams/instructionSet\"},{\"description\":\"Operation time for single-qubit measurement (t_meas) in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis.\",\"label\":\"Single-qubit measurement time\",\"path\":\"jobParams/qubitParams/oneQubitMeasurementTime\"},{\"description\":\"Operation time for single-qubit gate (t_gate) in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates.\",\"label\":\"Single-qubit gate time\",\"path\":\"jobParams/qubitParams/oneQubitGateTime\"},{\"description\":\"Operation time for two-qubit gate in ns\",\"explanation\":\"This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate.\",\"label\":\"Two-qubit gate time\",\"path\":\"jobParams/qubitParams/twoQubitGateTime\"},{\"description\":\"Operation time for a T gate\",\"explanation\":\"This is the operation time in nanoseconds to execute a T gate.\",\"label\":\"T gate time\",\"path\":\"jobParams/qubitParams/tGateTime\"},{\"description\":\"Error rate for single-qubit measurement\",\"explanation\":\"This is the probability in which a single-qubit measurement in the Pauli basis may fail.\",\"label\":\"Single-qubit measurement error rate\",\"path\":\"jobParams/qubitParams/oneQubitMeasurementErrorRate\"},{\"description\":\"Error rate for single-qubit Clifford gate (p)\",\"explanation\":\"This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail.\",\"label\":\"Single-qubit error rate\",\"path\":\"jobParams/qubitParams/oneQubitGateErrorRate\"},{\"description\":\"Error rate for two-qubit Clifford gate\",\"explanation\":\"This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail.\",\"label\":\"Two-qubit error rate\",\"path\":\"jobParams/qubitParams/twoQubitGateErrorRate\"},{\"description\":\"Error rate to prepare single-qubit T state or apply a T gate (p_T)\",\"explanation\":\"This is the probability in which executing a single T gate may fail.\",\"label\":\"T gate error rate\",\"path\":\"jobParams/qubitParams/tGateErrorRate\"}],\"title\":\"Physical qubit parameters\"}]},\"status\":\"success\",\"tfactory\":{\"codeDistancePerRound\":[9],\"logicalErrorRate\":2.165000000000001E-06,\"numInputTstates\":30,\"numRounds\":1,\"numTstates\":1,\"numUnitsPerRound\":[2],\"physicalQubits\":6480,\"physicalQubitsPerRound\":[6480],\"runtime\":46800.0,\"runtimePerRound\":[46800.0],\"unitNamePerRound\":[\"15-to-1 space efficient logical\"]}}",
+ "text/html": [
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Physical resource estimates\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 84536 | \r\n",
+ " \r\n",
+ " Number of physical qubits \n",
+ "\r\n",
+ " \r\n",
+ " This value represents the total number of physical qubits, which is the sum of 6776 physical qubits to implement the algorithm logic, and 77760 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime | \r\n",
+ " 528us | \r\n",
+ " \r\n",
+ " Total runtime \n",
+ "\r\n",
+ " \r\n",
+ " This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (4us 400ns) multiplied by the 120 logical cycles to run the algorithm. If however the duration of a single T factory (here: 46us 800ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Resource estimates breakdown\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Logical algorithmic qubits | \r\n",
+ " 28 | \r\n",
+ " \r\n",
+ " Number of logical qubits for the algorithm after layout \n",
+ "\r\n",
+ " \r\n",
+ " Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the \\(Q_{\\rm alg} = 9\\) logical qubits in the input algorithm, we require in total $2 \\cdot Q_{\\rm alg} + \\lceil \\sqrt{8 \\cdot Q_{\\rm alg}}\\rceil + 1 = 28$ logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Algorithmic depth | \r\n",
+ " 120 | \r\n",
+ " \r\n",
+ " Number of logical cycles for the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " To execute the algorithm using Parallel Synthesis Sequential Pauli Computation (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 24 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 8 CCZ and 24 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical depth | \r\n",
+ " 120 | \r\n",
+ " \r\n",
+ " Number of logical cycles performed \n",
+ "\r\n",
+ " \r\n",
+ " This number is usually equal to the logical depth of the algorithm, which is 120. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T states | \r\n",
+ " 128 | \r\n",
+ " \r\n",
+ " Number of T states consumed by the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 8 CCZ and 24 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T factories | \r\n",
+ " 12 | \r\n",
+ " \r\n",
+ " Number of T factories capable of producing the demanded 128 T states during the algorithm's runtime \n",
+ "\r\n",
+ " \r\n",
+ " The total number of T factories 12 that are executed in parallel is computed as \\(\\left\\lceil\\dfrac{128\\;\\text{T states} \\cdot 46us 800ns\\;\\text{T factory duration}}{1\\;\\text{T states per T factory} \\cdot 528us\\;\\text{algorithm runtime}}\\right\\rceil\\) \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T factory invocations | \r\n",
+ " 11 | \r\n",
+ " \r\n",
+ " Number of times all T factories are invoked \n",
+ "\r\n",
+ " \r\n",
+ " In order to prepare the 128 T states, the 12 copies of the T factory are repeatedly invoked 11 times. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical algorithmic qubits | \r\n",
+ " 6776 | \r\n",
+ " \r\n",
+ " Number of physical qubits for the algorithm after layout \n",
+ "\r\n",
+ " \r\n",
+ " The 6776 are the product of the 28 logical qubits after layout and the 242 physical qubits that encode a single logical qubit. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical T factory qubits | \r\n",
+ " 77760 | \r\n",
+ " \r\n",
+ " Number of physical qubits for the T factories \n",
+ "\r\n",
+ " \r\n",
+ " Each T factory requires 6480 physical qubits and we run 12 in parallel, therefore we need $77760 = 6480 \\cdot 12$ qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Required logical qubit error rate | \r\n",
+ " 1.49e-7 | \r\n",
+ " \r\n",
+ " The minimum logical qubit error rate required to run the algorithm within the error budget \n",
+ "\r\n",
+ " \r\n",
+ " The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 28 logical qubits and the total cycle count 120. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Required logical T state error rate | \r\n",
+ " 3.91e-6 | \r\n",
+ " \r\n",
+ " The minimum T state error rate required for distilled T states \n",
+ "\r\n",
+ " \r\n",
+ " The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 128. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of T states per rotation | \r\n",
+ " No rotations in algorithm | \r\n",
+ " \r\n",
+ " Number of T states to implement a rotation with an arbitrary angle \n",
+ "\r\n",
+ " \r\n",
+ " The number of T states to implement a rotation with an arbitrary angle is \\(\\lceil 0.53 \\log_2(0 / 0) + 5.3\\rceil\\) [arXiv:2203.10064]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Logical qubit parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " QEC scheme | \r\n",
+ " surface_code | \r\n",
+ " \r\n",
+ " Name of QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " You can load pre-defined QEC schemes by using the name surface_code or floquet_code . The latter only works with Majorana qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Code distance | \r\n",
+ " 11 | \r\n",
+ " \r\n",
+ " Required code distance for error correction \n",
+ "\r\n",
+ " \r\n",
+ " The code distance is the smallest odd integer greater or equal to \\(\\dfrac{2\\log(0.03 / 0.00000014880952380952382)}{\\log(0.01/0.001)} - 1\\) \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 242 | \r\n",
+ " \r\n",
+ " Number of physical qubits per logical qubit \n",
+ "\r\n",
+ " \r\n",
+ " The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical cycle time | \r\n",
+ " 4us 400ns | \r\n",
+ " \r\n",
+ " Duration of a logical cycle in nanoseconds \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical qubit error rate | \r\n",
+ " 3.00e-8 | \r\n",
+ " \r\n",
+ " Logical qubit error rate \n",
+ "\r\n",
+ " \r\n",
+ " The logical qubit error rate is computed as $0.03 \\cdot \\left(\\dfrac{0.001}{0.01}\\right)^\\frac{11 + 1}{2}$ \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Crossing prefactor | \r\n",
+ " 0.03 | \r\n",
+ " \r\n",
+ " Crossing prefactor used in QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Error correction threshold | \r\n",
+ " 0.01 | \r\n",
+ " \r\n",
+ " Error correction threshold used in QEC scheme \n",
+ "\r\n",
+ " \r\n",
+ " The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical cycle time formula | \r\n",
+ " (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance | \r\n",
+ " \r\n",
+ " QEC scheme formula used to compute logical cycle time \n",
+ "\r\n",
+ " \r\n",
+ " This is the formula that is used to compute the logical cycle time 4us 400ns. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits formula | \r\n",
+ " 2 * codeDistance * codeDistance | \r\n",
+ " \r\n",
+ " QEC scheme formula used to compute number of physical qubits per logical qubit \n",
+ "\r\n",
+ " \r\n",
+ " This is the formula that is used to compute the number of physical qubits per logical qubits 242. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " T factory parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Physical qubits | \r\n",
+ " 6480 | \r\n",
+ " \r\n",
+ " Number of physical qubits for a single T factory \n",
+ "\r\n",
+ " \r\n",
+ " This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime | \r\n",
+ " 46us 800ns | \r\n",
+ " \r\n",
+ " Runtime of a single T factory \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of a single T factory is the accumulated runtime of executing each round in a T factory. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of output T states per run | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " Number of output T states produced in a single run of T factory \n",
+ "\r\n",
+ " \r\n",
+ " The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.17e-6. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of input T states per run | \r\n",
+ " 30 | \r\n",
+ " \r\n",
+ " Number of physical input T states consumed in a single run of a T factory \n",
+ "\r\n",
+ " \r\n",
+ " This value includes the physical input T states of all copies of the distillation unit in the first round. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation rounds | \r\n",
+ " 1 | \r\n",
+ " \r\n",
+ " The number of distillation rounds \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation units per round | \r\n",
+ " 2 | \r\n",
+ " \r\n",
+ " The number of units in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of copies for the distillation units per round. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation units | \r\n",
+ " 15-to-1 space efficient logical | \r\n",
+ " \r\n",
+ " The types of distillation units \n",
+ "\r\n",
+ " \r\n",
+ " These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Distillation code distances | \r\n",
+ " 9 | \r\n",
+ " \r\n",
+ " The code distance in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Number of physical qubits per round | \r\n",
+ " 6480 | \r\n",
+ " \r\n",
+ " The number of physical qubits used in each round of distillation \n",
+ "\r\n",
+ " \r\n",
+ " The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Runtime per round | \r\n",
+ " 46us 800ns | \r\n",
+ " \r\n",
+ " The runtime of each distillation round \n",
+ "\r\n",
+ " \r\n",
+ " The runtime of the T factory is the sum of the runtimes in all rounds. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical T state error rate | \r\n",
+ " 2.17e-6 | \r\n",
+ " \r\n",
+ " Logical T state error rate \n",
+ "\r\n",
+ " \r\n",
+ " This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 3.91e-6. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Pre-layout logical resources\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Logical qubits (pre-layout) | \r\n",
+ " 9 | \r\n",
+ " \r\n",
+ " Number of logical qubits in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " We determine 28 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gates | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of T gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation gates | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Number of rotation gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation depth | \r\n",
+ " 0 | \r\n",
+ " \r\n",
+ " Depth of rotation gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " CCZ gates | \r\n",
+ " 8 | \r\n",
+ " \r\n",
+ " Number of CCZ-gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of CCZ gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " CCiX gates | \r\n",
+ " 24 | \r\n",
+ " \r\n",
+ " Number of CCiX-gates in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of CCiX gates, which applies \\(-iX\\) controlled on two control qubits [1212.5069]. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Measurement operations | \r\n",
+ " 24 | \r\n",
+ " \r\n",
+ " Number of single qubit measurements in the input quantum program \n",
+ "\r\n",
+ " \r\n",
+ " This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Assumed error budget\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Total error budget | \r\n",
+ " 1.00e-3 | \r\n",
+ " \r\n",
+ " Total error budget for the algorithm \n",
+ "\r\n",
+ " \r\n",
+ " The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget \\(\\epsilon = \\epsilon_{\\log} + \\epsilon_{\\rm dis} + \\epsilon_{\\rm syn}\\) is uniformly distributed and applies to errors \\(\\epsilon_{\\log}\\) to implement logical qubits, an error budget \\(\\epsilon_{\\rm dis}\\) to produce T states through distillation, and an error budget \\(\\epsilon_{\\rm syn}\\) to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets \\(\\epsilon_{\\rm dis}\\) and \\(\\epsilon_{\\rm syn}\\) are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Logical error probability | \r\n",
+ " 5.00e-4 | \r\n",
+ " \r\n",
+ " Probability of at least one logical error \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T distillation error probability | \r\n",
+ " 5.00e-4 | \r\n",
+ " \r\n",
+ " Probability of at least one faulty T distillation \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Rotation synthesis error probability | \r\n",
+ " 0.00e0 | \r\n",
+ " \r\n",
+ " Probability of at least one failed rotation synthesis \n",
+ "\r\n",
+ " \r\n",
+ " This is one third of the total error budget 1.00e-3. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " \r\n",
+ " Physical qubit parameters\r\n",
+ "
\r\n",
+ " \r\n",
+ " \n",
+ "\r\n",
+ " \r\n",
+ " Qubit name | \r\n",
+ " qubit_gate_ns_e3 | \r\n",
+ " \r\n",
+ " Some descriptive name for the qubit model \n",
+ "\r\n",
+ " \r\n",
+ " You can load pre-defined qubit parameters by using the names qubit_gate_ns_e3 , qubit_gate_ns_e4 , qubit_gate_us_e3 , qubit_gate_us_e4 , qubit_maj_ns_e4 , or qubit_maj_ns_e6 . The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates). \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Instruction set | \r\n",
+ " GateBased | \r\n",
+ " \r\n",
+ " Underlying qubit technology (gate-based or Majorana) \n",
+ "\r\n",
+ " \r\n",
+ " When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either gate-based or Majorana. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit measurement time | \r\n",
+ " 100 ns | \r\n",
+ " \r\n",
+ " Operation time for single-qubit measurement (t_meas) in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for single-qubit gate (t_gate) in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Two-qubit gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for two-qubit gate in ns \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gate time | \r\n",
+ " 50 ns | \r\n",
+ " \r\n",
+ " Operation time for a T gate \n",
+ "\r\n",
+ " \r\n",
+ " This is the operation time in nanoseconds to execute a T gate. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit measurement error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for single-qubit measurement \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a single-qubit measurement in the Pauli basis may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Single-qubit error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for single-qubit Clifford gate (p) \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " Two-qubit error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate for two-qubit Clifford gate \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "\r\n",
+ " \r\n",
+ " T gate error rate | \r\n",
+ " 0.001 | \r\n",
+ " \r\n",
+ " Error rate to prepare single-qubit T state or apply a T gate (p_T) \n",
+ "\r\n",
+ " \r\n",
+ " This is the probability in which executing a single T gate may fail. \n",
+ "\r\n",
+ " | \r\n",
+ "
\n",
+ "
\n",
+ "\r\n",
+ " Assumptions
\r\n",
+ " \n",
+ "More details on the following lists of assumptions can be found in the paper Accessing requirements for scaling quantum computers and their applications.
\n",
+ " \n",
+ "Uniform independent physical noise. We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.
\n",
+ " \n",
+ "Efficient classical computation. We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.
\n",
+ " \n",
+ "Extraction circuits for planar quantum ISA. We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).
\n",
+ " \n",
+ "Uniform independent logical noise. We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.
\n",
+ " \n",
+ "Negligible Clifford costs for synthesis. We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.
\n",
+ " \n",
+ "Smooth magic state consumption rate. We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.
\n",
+ " \n",
+ "
\n"
+ ],
+ "text/plain": [
+ "{'errorBudget': {'logical': 0.0005, 'rotations': 0.0, 'tstates': 0.0005},\n",
+ " 'jobParams': {'errorBudget': 0.001,\n",
+ " 'qecScheme': {'crossingPrefactor': 0.03,\n",
+ " 'errorCorrectionThreshold': 0.01,\n",
+ " 'logicalCycleTime': '(4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance',\n",
+ " 'name': 'surface_code',\n",
+ " 'physicalQubitsPerLogicalQubit': '2 * codeDistance * codeDistance'},\n",
+ " 'qubitParams': {'instructionSet': 'GateBased',\n",
+ " 'name': 'qubit_gate_ns_e3',\n",
+ " 'oneQubitGateErrorRate': 0.001,\n",
+ " 'oneQubitGateTime': '50 ns',\n",
+ " 'oneQubitMeasurementErrorRate': 0.001,\n",
+ " 'oneQubitMeasurementTime': '100 ns',\n",
+ " 'tGateErrorRate': 0.001,\n",
+ " 'tGateTime': '50 ns',\n",
+ " 'twoQubitGateErrorRate': 0.001,\n",
+ " 'twoQubitGateTime': '50 ns'}},\n",
+ " 'logicalCounts': {'ccixCount': 24,\n",
+ " 'cczCount': 8,\n",
+ " 'measurementCount': 24,\n",
+ " 'numQubits': 9,\n",
+ " 'rotationCount': 0,\n",
+ " 'rotationDepth': 0,\n",
+ " 'tCount': 0},\n",
+ " 'logicalQubit': {'codeDistance': 11,\n",
+ " 'logicalCycleTime': 4400.0,\n",
+ " 'logicalErrorRate': 3.000000000000002e-08,\n",
+ " 'physicalQubits': 242},\n",
+ " 'physicalCounts': {'breakdown': {'algorithmicLogicalDepth': 120,\n",
+ " 'algorithmicLogicalQubits': 28,\n",
+ " 'cliffordErrorRate': 0.001,\n",
+ " 'logicalDepth': 120,\n",
+ " 'numTfactories': 12,\n",
+ " 'numTfactoryRuns': 11,\n",
+ " 'numTsPerRotation': None,\n",
+ " 'numTstates': 128,\n",
+ " 'physicalQubitsForAlgorithm': 6776,\n",
+ " 'physicalQubitsForTfactories': 77760,\n",
+ " 'requiredLogicalQubitErrorRate': 1.4880952380952382e-07,\n",
+ " 'requiredLogicalTstateErrorRate': 3.90625e-06},\n",
+ " 'physicalQubits': 84536,\n",
+ " 'runtime': 528000},\n",
+ " 'physicalCountsFormatted': {'codeDistancePerRound': '9',\n",
+ " 'errorBudget': '1.00e-3',\n",
+ " 'errorBudgetLogical': '5.00e-4',\n",
+ " 'errorBudgetRotations': '0.00e0',\n",
+ " 'errorBudgetTstates': '5.00e-4',\n",
+ " 'logicalCycleTime': '4us 400ns',\n",
+ " 'logicalErrorRate': '3.00e-8',\n",
+ " 'numTsPerRotation': 'No rotations in algorithm',\n",
+ " 'numUnitsPerRound': '2',\n",
+ " 'physicalQubitsForTfactoriesPercentage': '91.98 %',\n",
+ " 'physicalQubitsPerRound': '6480',\n",
+ " 'requiredLogicalQubitErrorRate': '1.49e-7',\n",
+ " 'requiredLogicalTstateErrorRate': '3.91e-6',\n",
+ " 'runtime': '528us',\n",
+ " 'tfactoryRuntime': '46us 800ns',\n",
+ " 'tfactoryRuntimePerRound': '46us 800ns',\n",
+ " 'tstateLogicalErrorRate': '2.17e-6',\n",
+ " 'unitNamePerRound': '15-to-1 space efficient logical'},\n",
+ " 'reportData': {'assumptions': ['_More details on the following lists of assumptions can be found in the paper [Accessing requirements for scaling quantum computers and their applications](https://aka.ms/AQ/RE/Paper)._',\n",
+ " '**Uniform independent physical noise.** We assume that the noise on physical qubits and physical qubit operations is the standard circuit noise model. In particular we assume error events at different space-time locations are independent and that error rates are uniform across the system in time and space.',\n",
+ " '**Efficient classical computation.** We assume that classical overhead (compilation, control, feedback, readout, decoding, etc.) does not dominate the overall cost of implementing the full quantum algorithm.',\n",
+ " '**Extraction circuits for planar quantum ISA.** We assume that stabilizer extraction circuits with similar depth and error correction performance to those for standard surface and Hastings-Haah code patches can be constructed to implement all operations of the planar quantum ISA (instruction set architecture).',\n",
+ " '**Uniform independent logical noise.** We assume that the error rate of a logical operation is approximately equal to its space-time volume (the number of tiles multiplied by the number of logical time steps) multiplied by the error rate of a logical qubit in a standard one-tile patch in one logical time step.',\n",
+ " '**Negligible Clifford costs for synthesis.** We assume that the space overhead for synthesis and space and time overhead for transport of magic states within magic state factories and to synthesis qubits are all negligible.',\n",
+ " '**Smooth magic state consumption rate.** We assume that the rate of T state consumption throughout the compiled algorithm is almost constant, or can be made almost constant without significantly increasing the number of logical time steps for the algorithm.'],\n",
+ " 'groups': [{'alwaysVisible': True,\n",
+ " 'entries': [{'description': 'Number of physical qubits',\n",
+ " 'explanation': 'This value represents the total number of physical qubits, which is the sum of 6776 physical qubits to implement the algorithm logic, and 77760 physical qubits to execute the T factories that are responsible to produce the T states that are consumed by the algorithm.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'physicalCounts/physicalQubits'},\n",
+ " {'description': 'Total runtime',\n",
+ " 'explanation': 'This is a runtime estimate (in nanosecond precision) for the execution time of the algorithm. In general, the execution time corresponds to the duration of one logical cycle (4us 400ns) multiplied by the 120 logical cycles to run the algorithm. If however the duration of a single T factory (here: 46us 800ns) is larger than the algorithm runtime, we extend the number of logical cycles artificially in order to exceed the runtime of a single T factory.',\n",
+ " 'label': 'Runtime',\n",
+ " 'path': 'physicalCountsFormatted/runtime'}],\n",
+ " 'title': 'Physical resource estimates'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of logical qubits for the algorithm after layout',\n",
+ " 'explanation': 'Laying out the logical qubits in the presence of nearest-neighbor constraints requires additional logical qubits. In particular, to layout the $Q_{\\\\rm alg} = 9$ logical qubits in the input algorithm, we require in total $2 \\\\cdot Q_{\\\\rm alg} + \\\\lceil \\\\sqrt{8 \\\\cdot Q_{\\\\rm alg}}\\\\rceil + 1 = 28$ logical qubits.',\n",
+ " 'label': 'Logical algorithmic qubits',\n",
+ " 'path': 'physicalCounts/breakdown/algorithmicLogicalQubits'},\n",
+ " {'description': 'Number of logical cycles for the algorithm',\n",
+ " 'explanation': 'To execute the algorithm using _Parallel Synthesis Sequential Pauli Computation_ (PSSPC), operations are scheduled in terms of multi-qubit Pauli measurements, for which assume an execution time of one logical cycle. Based on the input algorithm, we require one multi-qubit measurement for the 24 single-qubit measurements, the 0 arbitrary single-qubit rotations, and the 0 T gates, three multi-qubit measurements for each of the 8 CCZ and 24 CCiX gates in the input program, as well as No rotations in algorithm multi-qubit measurements for each of the 0 non-Clifford layers in which there is at least one single-qubit rotation with an arbitrary angle rotation.',\n",
+ " 'label': 'Algorithmic depth',\n",
+ " 'path': 'physicalCounts/breakdown/algorithmicLogicalDepth'},\n",
+ " {'description': 'Number of logical cycles performed',\n",
+ " 'explanation': \"This number is usually equal to the logical depth of the algorithm, which is 120. However, in the case in which a single T factory is slower than the execution time of the algorithm, we adjust the logical cycle depth to exceed the T factory's execution time.\",\n",
+ " 'label': 'Logical depth',\n",
+ " 'path': 'physicalCounts/breakdown/logicalDepth'},\n",
+ " {'description': 'Number of T states consumed by the algorithm',\n",
+ " 'explanation': 'To execute the algorithm, we require one T state for each of the 0 T gates, four T states for each of the 8 CCZ and 24 CCiX gates, as well as No rotations in algorithm for each of the 0 single-qubit rotation gates with arbitrary angle rotation.',\n",
+ " 'label': 'Number of T states',\n",
+ " 'path': 'physicalCounts/breakdown/numTstates'},\n",
+ " {'description': \"Number of T factories capable of producing the demanded 128 T states during the algorithm's runtime\",\n",
+ " 'explanation': 'The total number of T factories 12 that are executed in parallel is computed as $\\\\left\\\\lceil\\\\dfrac{128\\\\;\\\\text{T states} \\\\cdot 46us 800ns\\\\;\\\\text{T factory duration}}{1\\\\;\\\\text{T states per T factory} \\\\cdot 528us\\\\;\\\\text{algorithm runtime}}\\\\right\\\\rceil$',\n",
+ " 'label': 'Number of T factories',\n",
+ " 'path': 'physicalCounts/breakdown/numTfactories'},\n",
+ " {'description': 'Number of times all T factories are invoked',\n",
+ " 'explanation': 'In order to prepare the 128 T states, the 12 copies of the T factory are repeatedly invoked 11 times.',\n",
+ " 'label': 'Number of T factory invocations',\n",
+ " 'path': 'physicalCounts/breakdown/numTfactoryRuns'},\n",
+ " {'description': 'Number of physical qubits for the algorithm after layout',\n",
+ " 'explanation': 'The 6776 are the product of the 28 logical qubits after layout and the 242 physical qubits that encode a single logical qubit.',\n",
+ " 'label': 'Physical algorithmic qubits',\n",
+ " 'path': 'physicalCounts/breakdown/physicalQubitsForAlgorithm'},\n",
+ " {'description': 'Number of physical qubits for the T factories',\n",
+ " 'explanation': 'Each T factory requires 6480 physical qubits and we run 12 in parallel, therefore we need $77760 = 6480 \\\\cdot 12$ qubits.',\n",
+ " 'label': 'Physical T factory qubits',\n",
+ " 'path': 'physicalCounts/breakdown/physicalQubitsForTfactories'},\n",
+ " {'description': 'The minimum logical qubit error rate required to run the algorithm within the error budget',\n",
+ " 'explanation': 'The minimum logical qubit error rate is obtained by dividing the logical error probability 5.00e-4 by the product of 28 logical qubits and the total cycle count 120.',\n",
+ " 'label': 'Required logical qubit error rate',\n",
+ " 'path': 'physicalCountsFormatted/requiredLogicalQubitErrorRate'},\n",
+ " {'description': 'The minimum T state error rate required for distilled T states',\n",
+ " 'explanation': 'The minimum T state error rate is obtained by dividing the T distillation error probability 5.00e-4 by the total number of T states 128.',\n",
+ " 'label': 'Required logical T state error rate',\n",
+ " 'path': 'physicalCountsFormatted/requiredLogicalTstateErrorRate'},\n",
+ " {'description': 'Number of T states to implement a rotation with an arbitrary angle',\n",
+ " 'explanation': 'The number of T states to implement a rotation with an arbitrary angle is $\\\\lceil 0.53 \\\\log_2(0 / 0) + 5.3\\\\rceil$ [[arXiv:2203.10064](https://arxiv.org/abs/2203.10064)]. For simplicity, we use this formula for all single-qubit arbitrary angle rotations, and do not distinguish between best, worst, and average cases.',\n",
+ " 'label': 'Number of T states per rotation',\n",
+ " 'path': 'physicalCountsFormatted/numTsPerRotation'}],\n",
+ " 'title': 'Resource estimates breakdown'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Name of QEC scheme',\n",
+ " 'explanation': 'You can load pre-defined QEC schemes by using the name `surface_code` or `floquet_code`. The latter only works with Majorana qubits.',\n",
+ " 'label': 'QEC scheme',\n",
+ " 'path': 'jobParams/qecScheme/name'},\n",
+ " {'description': 'Required code distance for error correction',\n",
+ " 'explanation': 'The code distance is the smallest odd integer greater or equal to $\\\\dfrac{2\\\\log(0.03 / 0.00000014880952380952382)}{\\\\log(0.01/0.001)} - 1$',\n",
+ " 'label': 'Code distance',\n",
+ " 'path': 'logicalQubit/codeDistance'},\n",
+ " {'description': 'Number of physical qubits per logical qubit',\n",
+ " 'explanation': 'The number of physical qubits per logical qubit are evaluated using the formula 2 * codeDistance * codeDistance that can be user-specified.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'logicalQubit/physicalQubits'},\n",
+ " {'description': 'Duration of a logical cycle in nanoseconds',\n",
+ " 'explanation': 'The runtime of one logical cycle in nanoseconds is evaluated using the formula (4 * twoQubitGateTime + 2 * oneQubitMeasurementTime) * codeDistance that can be user-specified.',\n",
+ " 'label': 'Logical cycle time',\n",
+ " 'path': 'physicalCountsFormatted/logicalCycleTime'},\n",
+ " {'description': 'Logical qubit error rate',\n",
+ " 'explanation': 'The logical qubit error rate is computed as $0.03 \\\\cdot \\\\left(\\\\dfrac{0.001}{0.01}\\\\right)^\\\\frac{11 + 1}{2}$',\n",
+ " 'label': 'Logical qubit error rate',\n",
+ " 'path': 'physicalCountsFormatted/logicalErrorRate'},\n",
+ " {'description': 'Crossing prefactor used in QEC scheme',\n",
+ " 'explanation': 'The crossing prefactor is usually extracted numerically from simulations when fitting an exponential curve to model the relationship between logical and physical error rate.',\n",
+ " 'label': 'Crossing prefactor',\n",
+ " 'path': 'jobParams/qecScheme/crossingPrefactor'},\n",
+ " {'description': 'Error correction threshold used in QEC scheme',\n",
+ " 'explanation': 'The error correction threshold is the physical error rate below which the error rate of the logical qubit is less than the error rate of the physical qubit that constitute it. This value is usually extracted numerically from simulations of the logical error rate.',\n",
+ " 'label': 'Error correction threshold',\n",
+ " 'path': 'jobParams/qecScheme/errorCorrectionThreshold'},\n",
+ " {'description': 'QEC scheme formula used to compute logical cycle time',\n",
+ " 'explanation': 'This is the formula that is used to compute the logical cycle time 4us 400ns.',\n",
+ " 'label': 'Logical cycle time formula',\n",
+ " 'path': 'jobParams/qecScheme/logicalCycleTime'},\n",
+ " {'description': 'QEC scheme formula used to compute number of physical qubits per logical qubit',\n",
+ " 'explanation': 'This is the formula that is used to compute the number of physical qubits per logical qubits 242.',\n",
+ " 'label': 'Physical qubits formula',\n",
+ " 'path': 'jobParams/qecScheme/physicalQubitsPerLogicalQubit'}],\n",
+ " 'title': 'Logical qubit parameters'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of physical qubits for a single T factory',\n",
+ " 'explanation': 'This corresponds to the maximum number of physical qubits over all rounds of T distillation units in a T factory. A round of distillation contains of multiple copies of distillation units to achieve the required success probability of producing a T state with the expected logical T state error rate.',\n",
+ " 'label': 'Physical qubits',\n",
+ " 'path': 'tfactory/physicalQubits'},\n",
+ " {'description': 'Runtime of a single T factory',\n",
+ " 'explanation': 'The runtime of a single T factory is the accumulated runtime of executing each round in a T factory.',\n",
+ " 'label': 'Runtime',\n",
+ " 'path': 'physicalCountsFormatted/tfactoryRuntime'},\n",
+ " {'description': 'Number of output T states produced in a single run of T factory',\n",
+ " 'explanation': 'The T factory takes as input 30 noisy physical T states with an error rate of 0.001 and produces 1 T states with an error rate of 2.17e-6.',\n",
+ " 'label': 'Number of output T states per run',\n",
+ " 'path': 'tfactory/numTstates'},\n",
+ " {'description': 'Number of physical input T states consumed in a single run of a T factory',\n",
+ " 'explanation': 'This value includes the physical input T states of all copies of the distillation unit in the first round.',\n",
+ " 'label': 'Number of input T states per run',\n",
+ " 'path': 'tfactory/numInputTstates'},\n",
+ " {'description': 'The number of distillation rounds',\n",
+ " 'explanation': 'This is the number of distillation rounds. In each round one or multiple copies of some distillation unit is executed.',\n",
+ " 'label': 'Distillation rounds',\n",
+ " 'path': 'tfactory/numRounds'},\n",
+ " {'description': 'The number of units in each round of distillation',\n",
+ " 'explanation': 'This is the number of copies for the distillation units per round.',\n",
+ " 'label': 'Distillation units per round',\n",
+ " 'path': 'physicalCountsFormatted/numUnitsPerRound'},\n",
+ " {'description': 'The types of distillation units',\n",
+ " 'explanation': 'These are the types of distillation units that are executed in each round. The units can be either physical or logical, depending on what type of qubit they are operating. Space-efficient units require fewer qubits for the cost of longer runtime compared to Reed-Muller preparation units.',\n",
+ " 'label': 'Distillation units',\n",
+ " 'path': 'physicalCountsFormatted/unitNamePerRound'},\n",
+ " {'description': 'The code distance in each round of distillation',\n",
+ " 'explanation': 'This is the code distance used for the units in each round. If the code distance is 1, then the distillation unit operates on physical qubits instead of error-corrected logical qubits.',\n",
+ " 'label': 'Distillation code distances',\n",
+ " 'path': 'physicalCountsFormatted/codeDistancePerRound'},\n",
+ " {'description': 'The number of physical qubits used in each round of distillation',\n",
+ " 'explanation': 'The maximum number of physical qubits over all rounds is the number of physical qubits for the T factory, since qubits are reused by different rounds.',\n",
+ " 'label': 'Number of physical qubits per round',\n",
+ " 'path': 'physicalCountsFormatted/physicalQubitsPerRound'},\n",
+ " {'description': 'The runtime of each distillation round',\n",
+ " 'explanation': 'The runtime of the T factory is the sum of the runtimes in all rounds.',\n",
+ " 'label': 'Runtime per round',\n",
+ " 'path': 'physicalCountsFormatted/tfactoryRuntimePerRound'},\n",
+ " {'description': 'Logical T state error rate',\n",
+ " 'explanation': 'This is the logical T state error rate achieved by the T factory which is equal or smaller than the required error rate 3.91e-6.',\n",
+ " 'label': 'Logical T state error rate',\n",
+ " 'path': 'physicalCountsFormatted/tstateLogicalErrorRate'}],\n",
+ " 'title': 'T factory parameters'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Number of logical qubits in the input quantum program',\n",
+ " 'explanation': 'We determine 28 from this number by assuming to align them in a 2D grid. Auxiliary qubits are added to allow for sufficient space to execute multi-qubit Pauli measurements on all or a subset of the logical qubits.',\n",
+ " 'label': 'Logical qubits (pre-layout)',\n",
+ " 'path': 'logicalCounts/numQubits'},\n",
+ " {'description': 'Number of T gates in the input quantum program',\n",
+ " 'explanation': 'This includes all T gates and adjoint T gates, but not T gates used to implement rotation gates with arbitrary angle, CCZ gates, or CCiX gates.',\n",
+ " 'label': 'T gates',\n",
+ " 'path': 'logicalCounts/tCount'},\n",
+ " {'description': 'Number of rotation gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of all rotation gates. If an angle corresponds to a Pauli, Clifford, or T gate, it is not accounted for in this number.',\n",
+ " 'label': 'Rotation gates',\n",
+ " 'path': 'logicalCounts/rotationCount'},\n",
+ " {'description': 'Depth of rotation gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of all non-Clifford layers that include at least one single-qubit rotation gate with an arbitrary angle.',\n",
+ " 'label': 'Rotation depth',\n",
+ " 'path': 'logicalCounts/rotationDepth'},\n",
+ " {'description': 'Number of CCZ-gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of CCZ gates.',\n",
+ " 'label': 'CCZ gates',\n",
+ " 'path': 'logicalCounts/cczCount'},\n",
+ " {'description': 'Number of CCiX-gates in the input quantum program',\n",
+ " 'explanation': 'This is the number of CCiX gates, which applies $-iX$ controlled on two control qubits [[1212.5069](https://arxiv.org/abs/1212.5069)].',\n",
+ " 'label': 'CCiX gates',\n",
+ " 'path': 'logicalCounts/ccixCount'},\n",
+ " {'description': 'Number of single qubit measurements in the input quantum program',\n",
+ " 'explanation': 'This is the number of single qubit measurements in Pauli basis that are used in the input program. Note that all measurements are counted, however, the measurement result is is determined randomly (with a fixed seed) to be 0 or 1 with a probability of 50%.',\n",
+ " 'label': 'Measurement operations',\n",
+ " 'path': 'logicalCounts/measurementCount'}],\n",
+ " 'title': 'Pre-layout logical resources'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Total error budget for the algorithm',\n",
+ " 'explanation': \"The total error budget sets the overall allowed error for the algorithm, i.e., the number of times it is allowed to fail. Its value must be between 0 and 1 and the default value is 0.001, which corresponds to 0.1%, and means that the algorithm is allowed to fail once in 1000 executions. This parameter is highly application specific. For example, if one is running Shor's algorithm for factoring integers, a large value for the error budget may be tolerated as one can check that the output are indeed the prime factors of the input. On the other hand, a much smaller error budget may be needed for an algorithm solving a problem with a solution which cannot be efficiently verified. This budget $\\\\epsilon = \\\\epsilon_{\\\\log} + \\\\epsilon_{\\\\rm dis} + \\\\epsilon_{\\\\rm syn}$ is uniformly distributed and applies to errors $\\\\epsilon_{\\\\log}$ to implement logical qubits, an error budget $\\\\epsilon_{\\\\rm dis}$ to produce T states through distillation, and an error budget $\\\\epsilon_{\\\\rm syn}$ to synthesize rotation gates with arbitrary angles. Note that for distillation and rotation synthesis, the respective error budgets $\\\\epsilon_{\\\\rm dis}$ and $\\\\epsilon_{\\\\rm syn}$ are uniformly distributed among all T states and all rotation gates, respectively. If there are no rotation gates in the input algorithm, the error budget is uniformly distributed to logical errors and T state errors.\",\n",
+ " 'label': 'Total error budget',\n",
+ " 'path': 'physicalCountsFormatted/errorBudget'},\n",
+ " {'description': 'Probability of at least one logical error',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.',\n",
+ " 'label': 'Logical error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetLogical'},\n",
+ " {'description': 'Probability of at least one faulty T distillation',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3 if the input algorithm contains rotation with gates with arbitrary angles, or one half of it, otherwise.',\n",
+ " 'label': 'T distillation error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetTstates'},\n",
+ " {'description': 'Probability of at least one failed rotation synthesis',\n",
+ " 'explanation': 'This is one third of the total error budget 1.00e-3.',\n",
+ " 'label': 'Rotation synthesis error probability',\n",
+ " 'path': 'physicalCountsFormatted/errorBudgetRotations'}],\n",
+ " 'title': 'Assumed error budget'},\n",
+ " {'alwaysVisible': False,\n",
+ " 'entries': [{'description': 'Some descriptive name for the qubit model',\n",
+ " 'explanation': 'You can load pre-defined qubit parameters by using the names `qubit_gate_ns_e3`, `qubit_gate_ns_e4`, `qubit_gate_us_e3`, `qubit_gate_us_e4`, `qubit_maj_ns_e4`, or `qubit_maj_ns_e6`. The names of these pre-defined qubit parameters indicate the instruction set (gate-based or Majorana), the operation speed (ns or ยฌยตs regime), as well as the fidelity (e.g., e3 for $10^{-3}$ gate error rates).',\n",
+ " 'label': 'Qubit name',\n",
+ " 'path': 'jobParams/qubitParams/name'},\n",
+ " {'description': 'Underlying qubit technology (gate-based or Majorana)',\n",
+ " 'explanation': 'When modeling the physical qubit abstractions, we distinguish between two different physical instruction sets that are used to operate the qubits. The physical instruction set can be either *gate-based* or *Majorana*. A gate-based instruction set provides single-qubit measurement, single-qubit gates (incl. T gates), and two-qubit gates. A Majorana instruction set provides a physical T gate, single-qubit measurement and two-qubit joint measurement operations.',\n",
+ " 'label': 'Instruction set',\n",
+ " 'path': 'jobParams/qubitParams/instructionSet'},\n",
+ " {'description': 'Operation time for single-qubit measurement (t_meas) in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a single-qubit measurement in the Pauli basis.',\n",
+ " 'label': 'Single-qubit measurement time',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitMeasurementTime'},\n",
+ " {'description': 'Operation time for single-qubit gate (t_gate) in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a single-qubit Clifford operation, e.g., Hadamard or Phase gates.',\n",
+ " 'label': 'Single-qubit gate time',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitGateTime'},\n",
+ " {'description': 'Operation time for two-qubit gate in ns',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to perform a two-qubit Clifford operation, e.g., a CNOT or CZ gate.',\n",
+ " 'label': 'Two-qubit gate time',\n",
+ " 'path': 'jobParams/qubitParams/twoQubitGateTime'},\n",
+ " {'description': 'Operation time for a T gate',\n",
+ " 'explanation': 'This is the operation time in nanoseconds to execute a T gate.',\n",
+ " 'label': 'T gate time',\n",
+ " 'path': 'jobParams/qubitParams/tGateTime'},\n",
+ " {'description': 'Error rate for single-qubit measurement',\n",
+ " 'explanation': 'This is the probability in which a single-qubit measurement in the Pauli basis may fail.',\n",
+ " 'label': 'Single-qubit measurement error rate',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitMeasurementErrorRate'},\n",
+ " {'description': 'Error rate for single-qubit Clifford gate (p)',\n",
+ " 'explanation': 'This is the probability in which a single-qubit Clifford operation, e.g., Hadamard or Phase gates, may fail.',\n",
+ " 'label': 'Single-qubit error rate',\n",
+ " 'path': 'jobParams/qubitParams/oneQubitGateErrorRate'},\n",
+ " {'description': 'Error rate for two-qubit Clifford gate',\n",
+ " 'explanation': 'This is the probability in which a two-qubit Clifford operation, e.g., CNOT or CZ gates, may fail.',\n",
+ " 'label': 'Two-qubit error rate',\n",
+ " 'path': 'jobParams/qubitParams/twoQubitGateErrorRate'},\n",
+ " {'description': 'Error rate to prepare single-qubit T state or apply a T gate (p_T)',\n",
+ " 'explanation': 'This is the probability in which executing a single T gate may fail.',\n",
+ " 'label': 'T gate error rate',\n",
+ " 'path': 'jobParams/qubitParams/tGateErrorRate'}],\n",
+ " 'title': 'Physical qubit parameters'}]},\n",
+ " 'status': 'success',\n",
+ " 'tfactory': {'codeDistancePerRound': [9],\n",
+ " 'logicalErrorRate': 2.165000000000001e-06,\n",
+ " 'numInputTstates': 30,\n",
+ " 'numRounds': 1,\n",
+ " 'numTstates': 1,\n",
+ " 'numUnitsPerRound': [2],\n",
+ " 'physicalQubits': 6480,\n",
+ " 'physicalQubitsPerRound': [6480],\n",
+ " 'runtime': 46800.0,\n",
+ " 'runtimePerRound': [46800.0],\n",
+ " 'unitNamePerRound': ['15-to-1 space efficient logical']}}"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# If you need to pull up the results of an old job, use its job ID with qsharp.azure.output command\n",
+ "# result = qsharp.azure.output(\"...\")\n",
+ "result"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# The function that extracts the relevant resource information from the resource estimation job results and produces your absolute score.\n",
+ "def evaluate_results(res) : \n",
+ " width = res['physicalCounts']['breakdown']['algorithmicLogicalQubits']\n",
+ " depth = res['physicalCounts']['breakdown']['algorithmicLogicalDepth']\n",
+ " print(f\"Logical algorithmic qubits = {width}\")\n",
+ " print(f\"Algorithmic depth = {depth}\")\n",
+ " print(f\"Score = {width * depth}\")\n",
+ " return width * depth\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false,
+ "jupyter": {
+ "outputs_hidden": false,
+ "source_hidden": false
+ },
+ "nteract": {
+ "transient": {
+ "deleting": false
+ }
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Logical algorithmic qubits = 28\n",
+ "Algorithmic depth = 120\n",
+ "Score = 3360\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "3360"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "evaluate_results(result)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernel_info": {
+ "name": "python3"
+ },
+ "kernelspec": {
+ "display_name": "Python 3 [Q#]",
+ "language": "python",
+ "name": "python3_qsharp_b54crn"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.10"
+ },
+ "nteract": {
+ "version": "nteract-front-end@1.0.0"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}