From 5795906f397620b6a939f3de362bc8c37817ba1d Mon Sep 17 00:00:00 2001 From: Ryan Hill Date: Sat, 28 Feb 2026 10:35:27 -0600 Subject: [PATCH] Update docs, links, and styling for v2 site migration - Update documentation URLs to v2 paths across README, examples, and pyproject.toml - Simplify custom.css: reformat indentation, remove unused admonition and layout sections - Clean up index.rst: remove inline CSS, add qbraid_qir.squin API reference - Update copyright year to 2026 and delete obsolete todo.txt Co-Authored-By: Claude Opus 4.6 --- README.md | 4 +- docs/_static/css/custom.css | 446 +++++++++++------------------- docs/_static/css/s4defs-roles.css | 4 +- docs/conf.py | 2 +- docs/index.rst | 60 +--- examples/QPE/qpe.ipynb | 4 +- examples/bernstein_vazirani.ipynb | 4 +- examples/qft.ipynb | 4 +- pyproject.toml | 3 +- qbraid_algorithms/todo.txt | 24 -- 10 files changed, 185 insertions(+), 370 deletions(-) delete mode 100644 qbraid_algorithms/todo.txt diff --git a/README.md b/README.md index 258d5e8..7105b67 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Python package for building, simulating, and benchmarking hybrid quantum-classical algorithms. -[](https://account.qbraid.com?gitHubUrl=https://github.com/qBraid/qbraid-algorithms.git) +[](https://account.qbraid.com/explore/projects/qbraid-algorithms) ## Installation @@ -60,7 +60,7 @@ qbraid_algorithms.__version__ ## Key Features: Load algorithms as PyQASM modules and QASM files qBraid Algorithms provides a collection of quantum algorithms that can be loaded -as [PyQASM](https://docs.qbraid.com/pyqasm/user-guide/overview) modules, or +as [PyQASM](https://docs.qbraid.com/v2/pyqasm/user-guide/overview) modules, or you can generate .qasm files to use them as subroutines in your own circuits. ### Loading Algorithms as PyQASM Modules diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 6fafe52..3a4afad 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -4,103 +4,114 @@ /* custom themeing */ .wy-body-for-nav { - --bg-color0: #fff; - --bg-color1: #fbfafc; - --layout-color0: #e7e7e7; - --layout-color1: #9840d2; - --shadow-0: rgb(0 33 121 / 8%); - --shadow-1: rgb(0 0 0 / 7%); - --font-color0: #000; - --font-color1: #3d3d3d; - --font-color2: #8e8e8e; - --font-color3: #cacaca; - --font-color4: #ffffff; - --brand-color0: #46096f; - --brand-color1: #df0982; - --active-gradient0: linear-gradient(45deg, - var(--brand-color1), - var(--brand-color0)); - --active-gradient1: linear-gradient(rgb(135, 0, 202) -41.11%, - rgba(216, 164, 250, 0.92) 197.13%); + --bg-color0: #fff; + --bg-color1: #fbfafc; + --layout-color0: #e7e7e7; + --layout-color1: #9840d2; + --shadow-0: rgb(0 33 121 / 8%); + --shadow-1: rgb(0 0 0 / 7%); + --font-color0: #000; + --font-color1: #3d3d3d; + --font-color2: #8e8e8e; + --font-color3: #cacaca; + --font-color4: #ffffff; + --brand-color0: #46096f; + --brand-color1: #df0982; + --active-gradient0: linear-gradient( + 45deg, + var(--brand-color1), + var(--brand-color0) + ); + --active-gradient1: linear-gradient( + rgb(135, 0, 202) -41.11%, + rgba(216, 164, 250, 0.92) 197.13% + ); } .wy-body-for-nav { - font-family: "Source Sans Pro", sans-serif; - font-weight: 400; + font-family: "Source Sans Pro", sans-serif; + font-weight: 400; } /* Left Navbar */ .wy-nav-side { - background-color: var(--bg-color0); - box-shadow: var(--shadow-1) 0px 10px 55px; + background-color: var(--bg-color0); + box-shadow: var(--shadow-1) 0px 10px 55px; } .wy-side-nav-search { - background-color: var(--bg-color0); - color: var(--font-color0); + background-color: var(--bg-color0); + color: var(--font-color0); } -.wy-side-nav-search>a { - color: var(--font-color0); - display: flex; - align-items: center; - justify-content: center; +.wy-side-nav-search > a { + color: var(--font-color0); + display: flex; + align-items: flex-start; + justify-content: center; + padding-top: 8px; + margin-left: -14px; } -.wy-side-nav-search>a::before { - content: ""; - background-image: url(../logo.png); - background-size: contain; - background-repeat: no-repeat; - width: 28px; - height: 28px; +.wy-side-nav-search > a::before { + content: ""; + background-image: url(../logo.png); + background-size: contain; + background-repeat: no-repeat; + width: 28px; + height: 28px; + margin-right: 4px; + position: relative; + top: 6px; } -.wy-side-nav-search>div.version { - color: var(--font-color2) !important; +.wy-side-nav-search > div.version, +.wy-side-nav-search > div.switch-menus, +.wy-side-nav-search > div.switch-menus > div.version-switch select { + color: var(--font-color2) !important; } -.wy-menu-vertical li.current>a, +.wy-menu-vertical li.current > a, .wy-menu-vertical li.on a { - background-image: var(--active-gradient0); - background-size: 150%; - background-position: left; - color: var(--font-color4); - transition: background-position 150ms ease; + background-image: var(--active-gradient0); + background-size: 150%; + background-position: left; + color: var(--font-color4); + transition: background-position 150ms ease; } -.wy-menu-vertical li.current>a:hover, +.wy-menu-vertical li.current > a:hover, .wy-menu-vertical li.on a:hover { - background-image: var(--active-gradient0); - background-size: 150%; - background-position: right; + background-image: var(--active-gradient0); + background-size: 150%; + background-position: right; } -.wy-menu-vertical li.current>a:hover button.toctree-expand, +.wy-menu-vertical li.current > a:hover button.toctree-expand, .wy-menu-vertical li.on a:hover button.toctree-expand { - color: var(--font-color3); + color: var(--font-color3); } /* left nav bar list item */ .wy-menu-vertical a { - color: var(--font-color1); + color: var(--font-color1); } .wy-menu-vertical a:hover { - background-image: var(--active-gradient1); - color: var(--font-color4); + background-image: var(--active-gradient1); + color: var(--font-color4); } .wy-nav-content { - background-color: var(--bg-color1); - max-width: 100dvw; - max-width: 100vw; - min-height: 100dvh; - min-height: 100vh; + background-color: var(--bg-color1); + max-width: 100dvw; + max-width: 100vw; + min-height: 100dvh; + min-height: 100vh; } /* headers */ -.rst-content .toctree-wrapper>p.caption, +.rst-content .toctree-wrapper > p.caption, h1, h2, h3, @@ -108,279 +119,158 @@ h4, h5, h6, legend { - font-family: "Nunito Sans", sans-serif; - font-weight: 700; - color: var(--brand-color0); -} - - -/* Style h1 headers only on API and stubs pages */ -html[data-content_root="../"] h1 { - opacity: 0.5 !important; - color: #000000 !important; - font-size: 100% !important; - font-weight: normal !important; - font-style: italic !important; + font-family: "Nunito Sans", sans-serif; + font-weight: 700; + color: var(--brand-color0); } .wy-menu-vertical header, .wy-menu-vertical p.caption { - color: var(--brand-color0); + color: var(--brand-color0); } -.wy-menu-vertical li.current>a button.toctree-expand, +.wy-menu-vertical li.current > a button.toctree-expand, .wy-menu-vertical li.on a button.toctree-expand { - color: var(--font-color4); + color: var(--font-color4); } /* Style the counter cards */ .card { - box-shadow: 0 6px 20px 0 var(--shadow-0); - padding: 16px; - text-align: center; - border-radius: 8px; - background-color: var(--bg-color0); - transition: transform 150ms ease; + box-shadow: 0 6px 20px 0 var(--shadow-0); + padding: 16px; + text-align: center; + border-radius: 8px; + background-color: var(--bg-color0); + transition: transform 150ms ease; } -.card>h3 { - color: var(--font-color0); +.card > h3 { + color: var(--font-color0); } .card:hover { - transform: scale(1.05); + transform: scale(1.05); } /* buttons */ .btn { - display: inline-flex; - gap: 4px; - -webkit-box-align: center; - align-items: center; - -webkit-box-pack: center; - justify-content: center; - position: relative; - box-sizing: border-box; - -webkit-tap-highlight-color: transparent; - outline: 0px; - border: 0px; - margin: 0px; - cursor: pointer; - user-select: none; - vertical-align: middle; - appearance: none; - text-decoration: none; - font-family: "Source Sans Pro", sans-serif; - font-weight: 600; - font-size: 0.875rem; - line-height: 1.75; - letter-spacing: 0.02857em; - min-width: 64px; - padding: 6px 8px; - border-radius: 4px; - text-transform: capitalize; - color: var(--font-color4); - background-color: var(--layout-color1); + display: inline-flex; + gap: 4px; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + position: relative; + box-sizing: border-box; + -webkit-tap-highlight-color: transparent; + outline: 0px; + border: 0px; + margin: 0px; + cursor: pointer; + user-select: none; + vertical-align: middle; + appearance: none; + text-decoration: none; + font-family: "Source Sans Pro", sans-serif; + font-weight: 600; + font-size: 0.875rem; + line-height: 1.75; + letter-spacing: 0.02857em; + min-width: 64px; + padding: 6px 8px; + border-radius: 4px; + text-transform: capitalize; + color: var(--font-color4); + background-color: var(--layout-color1); } .btn:active { - padding: 6px 8px; + padding: 6px 8px; } .btn-neutral { - color: var(--font-color4) !important; - background-color: var(--layout-color1) !important; - transition: background-image 150ms linear; + color: var(--font-color4) !important; + background-color: var(--layout-color1) !important; + transition: background-image 150ms linear; } .btn-neutral:hover { - color: var(--font-color4) !important; - background-image: var(--active-gradient1) !important; + color: var(--font-color4) !important; + background-image: var(--active-gradient1) !important; } .btn-neutral:visited { - color: var(--font-color4) !important; + color: var(--font-color4) !important; } /* Search box */ .wy-side-nav-search input[type="text"] { - webkit-transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); - -o-transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); - transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); - -webkit-appearance: none; - outline: transparent; - height: 45px; - padding: 0 30px; - border-radius: 45px; - width: 100%; - outline: none; - -webkit-box-shadow: none; - box-shadow: none; - border: 1px solid var(--layout-color0); - background-color: var(--bg-color0); - font-size: 14px; - line-height: 1.42857143; - color: var(--font-color1); - display: inline; - overflow: visible; - margin: 0; - font-family: "Source Sans Pro", sans-serif; + webkit-transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + -o-transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); + -webkit-appearance: none; + outline: transparent; + height: 45px; + padding: 0 30px; + border-radius: 45px; + width: 100%; + outline: none; + -webkit-box-shadow: none; + box-shadow: none; + border: 1px solid var(--layout-color0); + background-color: var(--bg-color0); + font-size: 14px; + line-height: 1.42857143; + color: var(--font-color1); + display: inline; + overflow: visible; + margin: 0; + font-family: "Source Sans Pro", sans-serif; +} + +/* Foot note */ +.rst-content .seealso .admonition-title { + background: var(--active-gradient0); +} + +.rst-content .seealso { + background: var(--layout-color0); + border-radius: 8px; + overflow: hidden; } /* common elements */ .rst-content p a { - -webkit-text-fill-color: transparent; - text-fill-color: transparent; - background: var(--active-gradient0); - -webkit-background-clip: text; - background-clip: text; + -webkit-text-fill-color: transparent; + text-fill-color: transparent; + background: var(--active-gradient0); + -webkit-background-clip: text; + background-clip: text; } -.wy-breadcrumbs>li.wy-breadcrumbs-aside>a { - -webkit-text-fill-color: transparent; - text-fill-color: transparent; - background: var(--active-gradient0); - -webkit-background-clip: text; - background-clip: text; +.wy-breadcrumbs > li.wy-breadcrumbs-aside > a { + -webkit-text-fill-color: transparent; + text-fill-color: transparent; + background: var(--active-gradient0); + -webkit-background-clip: text; + background-clip: text; } /* img */ .rst-content img { - border-radius: 8px; + border-radius: 8px; } /* highlighted texts */ .rst-content .highlighted { - -webkit-text-fill-color: var(--font-color4); - text-fill-color: var(--font-color4); + -webkit-text-fill-color: var(--font-color4); + text-fill-color: var(--font-color4); } .rst-content code.xref, .rst-content tt.xref, a .rst-content code, a .rst-content tt { - -webkit-text-fill-color: var(--brand-color0); - text-fill-color: var(--brand-color0); -} - -/* ============================================================================= - ADMONITION BOXES STYLING - ============================================================================= */ - -/* Shared border radius for enhanced elements */ -.rst-content .note-enhanced, -.rst-content .seealso, -.rst-content .seealso table.autosummary { - border-radius: 10px; -} - -/* Note Enhanced Boxes */ -.rst-content .note-enhanced { - font-size: 1.5em; - background: white; - box-shadow: 0 4px 18px rgba(70, 9, 111, 0.50); + -webkit-text-fill-color: var(--brand-color0); + text-fill-color: var(--brand-color0); } - -.rst-content .note-enhanced .admonition-title { - border-radius: 10px 10px 0 0; - background: var(--active-gradient0); - color: #ffffff !important; - font-weight: bold; - text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); - padding: 12px 16px; -} - -.rst-content .note-enhanced .admonition-title::before { - display: none !important; -} - -/* Seealso Boxes */ -.rst-content .seealso { - font-size: 1.1em; - background: white; - box-shadow: 0 4px 18px rgba(70, 9, 111, 0.50); -} - -/* Reduce line spacing in formulation sections */ -.rst-content .seealso p { - margin-bottom: 0.5em; - line-height: 1.3; -} - -.rst-content .seealso ol, -.rst-content .seealso ul { - margin-bottom: 0.5em; -} - -.rst-content .seealso li { - margin-bottom: 0.3em; - line-height: 1.3; -} - -.rst-content .seealso .math { - margin: 0.2em 0; - line-height: 1.2; -} - -.rst-content .seealso .admonition-title { - border-radius: 10px 10px 0 0; - padding-top: 16px; - background: white; - color: var(--brand-color0) !important; - font-weight: bold; -} - -.rst-content .seealso.note-enhanced-size .admonition-title::before, -.rst-content .left-box .admonition-title::before, -.rst-content .right-box .admonition-title::before { - display: none !important; -} - -.rst-content .seealso.note-enhanced-size>.admonition-title { - font-weight: bold; - text-align: center; -} - -/* Tables */ -.rst-content .seealso table.autosummary { - border-collapse: separate; - border-spacing: 0; - border-width: 2px !important; -} - -/* ============================================================================= - SIDE-BY-SIDE ALGORITHM LAYOUT - ============================================================================= */ - -/* Container Layout */ -.side-by-side { - display: flex; -} - -.left-box, -.right-box { - flex-direction: column; -} - -/* Algorithm Boxes */ -.rst-content .left-box .note, -.rst-content .right-box .note { - background: white !important; - overflow: hidden !important; -} - -/* Algorithm Titles */ -.left-box .admonition-title, -.right-box .admonition-title { - text-align: center; - font-size: 1em !important; -} - -/* ============================================================================= - PAGE-SPECIFIC FIXES - ============================================================================= */ - -/* Hide duplicate title on all qbraid_algorithms submodule pages */ -section[id^="module-qbraid_algorithms."]>p:first-of-type { - display: none; -} \ No newline at end of file diff --git a/docs/_static/css/s4defs-roles.css b/docs/_static/css/s4defs-roles.css index 3f516d1..3f9d18b 100644 --- a/docs/_static/css/s4defs-roles.css +++ b/docs/_static/css/s4defs-roles.css @@ -324,6 +324,4 @@ div.sphinxsidebar a { margin-left: auto; margin-right: auto; background-size: 35px 35px; -} - - +} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 6544276..51b4fa7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,7 +9,7 @@ import qbraid_algorithms project = "qBraid" -copyright = "2025, qBraid Development Team" +copyright = "2026, qBraid Development Team" author = "qBraid Development Team" # Set the version diff --git a/docs/index.rst b/docs/index.rst index 071acb9..bb073b4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,69 +1,20 @@ .. raw:: html - - - - - - - +

- qbraid logo + qbraid logo qBraid - | algorithms + | ALGOS

Build Quantum Algorithms with qBraid.

- - - -| :Release: |release| Overview -------- -`qBraid Algorithms `_ is a Python package designed for quantum algorithm development, implementation, and execution. Built on the `OpenQASM3 `_ standard, this library provides researchers, developers, and quantum computing enthusiasts with a robust toolkit for exploring and deploying quantum algorithms across various domains. +`qBraid Algorithms `_ is a Python package designed for quantum algorithm development, implementation, and execution. Built on the `OpenQASM3 `_ standard, this library provides researchers, developers, and quantum computing enthusiasts with a robust toolkit for exploring and deploying quantum algorithms across various domains. **Key Features:** @@ -102,7 +53,7 @@ You can also install from source by cloning this repository and running a pip in Resources ---------- -- `User Guide `_ +- `User Guide `_ - `Example Notebooks `_ - `API Reference `_ - `Source Code `_ @@ -127,6 +78,7 @@ Resources qbraid_qir qbraid_qir.cirq qbraid_qir.qasm3 + qbraid_qir.squin .. toctree:: :caption: CORE API Reference diff --git a/examples/QPE/qpe.ipynb b/examples/QPE/qpe.ipynb index e1d5706..41f30ed 100644 --- a/examples/QPE/qpe.ipynb +++ b/examples/QPE/qpe.ipynb @@ -66,7 +66,7 @@ "id": "57bc257e", "metadata": {}, "source": [ - "We can perform all standard [PyQASM](https://docs.qbraid.com/pyqasm/user-guide/overview) operations on the module, such as unrolling." + "We can perform all standard [PyQASM](https://docs.qbraid.com/v2/pyqasm/user-guide/overview) operations on the module, such as unrolling." ] }, { @@ -329,7 +329,7 @@ "metadata": {}, "source": [ "## Running Algorithms on qBraid\n", - "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/sdk/user-guide/providers/native#qbraidprovider) for more information." + "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/v2/sdk/user-guide/providers/native#qbraidprovider) for more information." ] }, { diff --git a/examples/bernstein_vazirani.ipynb b/examples/bernstein_vazirani.ipynb index 459083f..3c3963d 100644 --- a/examples/bernstein_vazirani.ipynb +++ b/examples/bernstein_vazirani.ipynb @@ -61,7 +61,7 @@ "id": "7e2ac473", "metadata": {}, "source": [ - "We can perform all standard [PyQASM](https://docs.qbraid.com/pyqasm/user-guide/overview) operations on the module, such as unrolling." + "We can perform all standard [PyQASM](https://docs.qbraid.com/v2/pyqasm/user-guide/overview) operations on the module, such as unrolling." ] }, { @@ -267,7 +267,7 @@ "metadata": {}, "source": [ "## Running Algorithms on qBraid\n", - "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/sdk/user-guide/providers/native#qbraidprovider) for more information." + "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/v2/sdk/user-guide/providers/native#qbraidprovider) for more information." ] }, { diff --git a/examples/qft.ipynb b/examples/qft.ipynb index 9d42bbb..072e270 100644 --- a/examples/qft.ipynb +++ b/examples/qft.ipynb @@ -60,7 +60,7 @@ "id": "b68eeb17", "metadata": {}, "source": [ - "We can perform all standard [PyQASM](https://docs.qbraid.com/pyqasm/user-guide/overview) operations on the module, such as unrolling." + "We can perform all standard [PyQASM](https://docs.qbraid.com/v2/pyqasm/user-guide/overview) operations on the module, such as unrolling." ] }, { @@ -301,7 +301,7 @@ "metadata": {}, "source": [ "## Running Algorithms on qBraid\n", - "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/sdk/user-guide/providers/native#qbraidprovider) for more information." + "Running algorithms on qBraid is simple. First, import QbraidProvider from qBraid Runtime. Visit [here](https://docs.qbraid.com/v2/sdk/user-guide/providers/native#qbraidprovider) for more information." ] }, { diff --git a/pyproject.toml b/pyproject.toml index c70bb2e..862cd3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,10 +50,9 @@ dependencies = {file = ["requirements.txt"]} [project.urls] Homepage = "https://github.com/qBraid/qbraid-algorithms" -Documentation = "https://docs.qbraid.com" +Documentation = "https://docs.qbraid.com/v2/algorithms" "Bug Tracker" = "https://github.com/qBraid/qbraid-algorithms/issues" Discord = "https://discord.gg/TPBU2sa8Et" -"Launch on Lab" = "https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/qbraid-algorithms.git" [tool.isort] profile = "black" diff --git a/qbraid_algorithms/todo.txt b/qbraid_algorithms/todo.txt deleted file mode 100644 index 2366a04..0000000 --- a/qbraid_algorithms/todo.txt +++ /dev/null @@ -1,24 +0,0 @@ - -QasmBuilder: -finish scoping and validate building import file generation - -GateLibrary: -look into better controlled application -- ie some static std_gate calls only accept a target. Current workaround is to directly call the gate name. -- - look at either adding args/kwargs to static gate passthrough or having behavior returning gate name on call with null -- - a decorator might be another way -reformalize ancilla claiming -- probable temp practice is that any function that can claim ancilla must work within root file (base builder) -scope as a subroutine rather than gate, means that only update would be safety checking certain calls when not established -in header (ie defined within body so ordering of definitions may be wrong) -- would also mean updating qpe, select/prep as they are in gate formalism currently due to lack of rendering support for subroutines - -Ambiguous: -pragma annotations in general --specifically one for 0 state ancilla postselection? - -Testing: -direct pyqasm validation tests within builder_algorithsm have been suspended due to lack of controlled op and -subroutine scope support in pyqasm module -- once those are fixed and released in new pyqasm version, "assert is_valid" checks need to be uncommented -remove many file level lint skips caused by naming and unused test variables \ No newline at end of file