Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions docs/psidocs.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,39 @@
*/

:root {
--md-primary-fg-color: #000000;
--md-accent-fg-color: #7030A0;
--md-primary-fg-color: #000000;
--md-accent-fg-color: #7030A0;
}

/* Open in Colab (top-right on .ipynb pages only; no header GitHub repo link) */
a.bartiq-open-collab-btn {
border: none;
background: #7030a0;
box-sizing: border-box;
color: #fff !important;
cursor: pointer;
display: inline-block;
font-size: 0.65rem;
font-weight: 600;
line-height: 1;
margin-inline: 0;
padding: 0.45rem 0.5rem;
text-decoration: none;
white-space: nowrap;
flex-shrink: 0;
}

.md-header__source .bartiq-open-collab-btn--source {
align-self: center;
}

a.bartiq-open-collab-btn:hover,
a.bartiq-open-collab-btn:visited {
color: #fff !important;
}

a.bartiq-open-collab-btn:hover {
filter: brightness(1.08);
}

.md-typeset a {
Expand Down
15 changes: 9 additions & 6 deletions docs/tutorials/01_basic_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@
]
},
{
"cell_type": "markdown",
"id": "591e1b92-a582-434c-a06f-eb166b704b73",
"cell_type": "code",
"execution_count": null,
"id": "084bac03-3369-4a49-b518-a812cb0fc5ae",
"metadata": {},
"outputs": [],
"source": [
"<div class=\"alert alert-block alert-info admonition note\"> <p class=\"admonition-title\"><b>NOTE:</b></p>\n",
"# NOTE\n",
"\n",
"This tutorial, as well as all the other tutorials, has been written as a jupyter notebook.\n",
"If you're reading it online, you can either keep reading, or go to `docs/tutorials` to explore them in a more interactive way!\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"</div>"
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" qref graphviz\n"
]
},
{
Expand Down
29 changes: 16 additions & 13 deletions docs/tutorials/02_alias_sampling_basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@
"# Alias Sampling"
]
},
{
"cell_type": "markdown",
"id": "8d4d79ad-b0e7-4ae9-8b6c-706fa5760612",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info admonition note\"> <p class=\"admonition-title\"><b>NOTE:</b></p>\n",
"\n",
"This tutorial, as well as all the other tutorials, has been written as a jupyter notebook.\n",
"If you're reading it online, you can either keep reading, or clone the repository and go to `docs/tutorials` to explore them in a more interactive way!\n",
"\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "4200cc8f-ecea-42a1-8eab-556aa97cbe25",
Expand All @@ -38,6 +25,22 @@
"This circuit is an important subroutine in the paper's larger algorithm because it is responsible for preparing arbitrary quantum states, which can be thought of as \"loading\" data into the quantum computer."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f7543e68-33b5-4216-96d0-b2819196b3d9",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" qref graphviz\n"
]
},
{
"cell_type": "markdown",
"id": "8ec5bd3c-d8ed-4261-8f22-d7db04d65fa8",
Expand Down
31 changes: 17 additions & 14 deletions docs/tutorials/03_advanced_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,12 @@
"# Using Bartiq for Resource Analysis"
]
},
{
"cell_type": "markdown",
"id": "edb1edfd47920714",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info admonition note\"> <p class=\"admonition-title\"><b>NOTE:</b></p>\n",
"\n",
"This tutorial, as well as all the other tutorials, has been written as a jupyter notebook.\n",
"If you're reading it online, you can either keep reading, or clone the repository and go to `docs/tutorials` to explore them in a more interactive way!\n",
"\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "f8123bc58c173ac5",
"metadata": {},
"source": [
"It is time to explore how to use `bartiq`'s resource estimation capabilities in practical quantum algorithm analysis. In this tutorial, we will:\n",
"In this tutorial, we will explore how to use `bartiq`'s resource estimation capabilities in practical quantum algorithm analysis. In this tutorial, we will:\n",
"\n",
"- Compare resources of different implementations of the same operation/unitary using `bartiq`.\n",
"- Transform your estimate to obtain more useful information about the problem.\n",
Expand All @@ -43,6 +30,22 @@
"In this tutorial we will see if we can make alias sampling use less resources by using a different implementation of USP. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a589e2c2-dd54-4c84-bc75-4efccb624c07",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" qref graphviz matplotlib sympy\n"
]
},
{
"cell_type": "markdown",
"id": "ce7328a61a38dd67",
Expand Down
25 changes: 14 additions & 11 deletions docs/tutorials/04_rewriters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,28 @@
},
{
"cell_type": "code",
"execution_count": 1,
"id": "5db5109d",
"execution_count": null,
"id": "a9a062d6-53a5-407a-8d75-e8e19fcdde67",
"metadata": {},
"outputs": [],
"source": [
"from bartiq.analysis import sympy_rewriter"
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization]\" pyyaml\n"
]
},
{
"cell_type": "markdown",
"id": "8a723024",
"cell_type": "code",
"execution_count": 1,
"id": "5db5109d",
"metadata": {},
"outputs": [],
"source": [
"<div class=\"alert alert-block alert-info admonition note\"> <p class=\"admonition-title\"><b>NOTE:</b></p>\n",
"\n",
"This tutorial, as well as all the other tutorials, has been written as a jupyter notebook.\n",
"If you're reading it online, you can either keep reading, or go to `docs/tutorials` to explore them in a more interactive way!\n",
"\n",
"</div>"
"from bartiq.analysis import sympy_rewriter"
]
},
{
Expand Down
16 changes: 16 additions & 0 deletions docs/tutorials/2025_ieee_qw/01_intro_to_bartiq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
"- Brendan Reid"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "03734fc5-dc18-471a-8183-7cc8836f271e",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" qref pyyaml graphviz\n"
]
},
{
"cell_type": "markdown",
"id": "2bb1306a",
Expand Down
16 changes: 16 additions & 0 deletions docs/tutorials/2025_ieee_qw/02_algorithmic_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
"In this set of tutorials we'll be using some concepts you might not be familiar with. Understanding them is not crucial for following the rest of the tutorial, but having a high-level overview might be helfpul."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e2c5c5d4-77a0-458e-84fd-7a7eddcca869",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" qref pyyaml graphviz\n"
]
},
{
"cell_type": "markdown",
"id": "cbe0bf1e",
Expand Down
16 changes: 16 additions & 0 deletions docs/tutorials/2025_ieee_qw/03_bottleneck_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
"Bottleneck analysis is easiest with numeric routines, as comparing symbolic expressions can be tricky. Here, we load in the Double Factorization routine and evaluate it for a given physical system."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cf10c94f-8496-4e09-b1d3-fc3392b5ddc5",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization]\" pyyaml\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
16 changes: 16 additions & 0 deletions docs/tutorials/2025_ieee_qw/04_rewriters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
"`bartiq` includes a set of utilities for manipulating symbolic expressions – rewriting them to make them simpler and easier to analyze. They're known as **rewriters**. This functionality is contained in the analysis submodule, and backend-specific rewriters can be imported directly."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "924a6e3d-890c-4844-9f6c-72d9787a3192",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization]\" pyyaml\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
16 changes: 16 additions & 0 deletions docs/tutorials/2025_ieee_qw/05_hyperparameter_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
"We will start by loading a QREF file with an already compiled double factorization routine, and examine its input parameters."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b1d946e-7a28-4aae-8b58-11f63010c8a6",
"metadata": {},
"outputs": [],
"source": [
"# NOTE\n",
"\n",
"# This tutorial is a a jupyter notebook.\n",
"# Click the \"Open in Collab\" button to view an interactive version of the tutorial.\n",
"\n",
"# Install dependencies for this notebook . Run once per session.\n",
"%pip install -q \"bartiq[optimization,interactive,jupyter]\" pyyaml matplotlib sympy\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edit_uri: edit/main/docs/

theme:
name: material
custom_dir: overrides
logo: assets/logo_white.png
palette:
primary: custom
Expand Down Expand Up @@ -100,3 +101,5 @@ extra_javascript:
extra:
version:
provider: mike
# Default branch for "Open in Colab" GitHub URLs (keep aligned with the branch that hosts these docs).
colab_branch: main
Loading
Loading