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
7 changes: 0 additions & 7 deletions dev_tools/autogenerate-bloqs-notebooks-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@
]


# --------------------------------------------------------------------------
# ----- Root Bloqs -----------------------------------------------------
# --------------------------------------------------------------------------
ROOT_BLOQS = ['cryptography/ecc/ecc.ipynb']


def _all_nbspecs() -> Iterable[NotebookSpecV2]:
for _, nbspecs in NB_BY_SECTION:
yield from nbspecs
Expand Down Expand Up @@ -108,7 +102,6 @@ def write_toc():
]

toc_lines = header + _get_toc_section_lines('Concepts', CONCEPTS, maxdepth=1)
toc_lines += _get_toc_section_lines('Root Bloqs', ROOT_BLOQS, maxdepth=1)
bloqs_dir = SOURCE_DIR / 'bloqs'
for section, nbspecs in NB_BY_SECTION:
entries = [str(nbspec.path.relative_to(bloqs_dir)) for nbspec in nbspecs]
Expand Down
15 changes: 15 additions & 0 deletions dev_tools/qualtran_dev_tools/notebook_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@
GIT_ROOT = get_git_root()
SOURCE_DIR = GIT_ROOT / 'qualtran/'

# --------------------------------------------------------------------------
# ----- Root Bloqs -----------------------------------------------------
# --------------------------------------------------------------------------

ROOT_BLOQS: List[NotebookSpecV2] = [
NotebookSpecV2(
title='Elliptic Curves',
module=qualtran.bloqs.cryptography.ecc,
path_stem='ecc_root',
bloq_specs=[qualtran.bloqs.cryptography.ecc.find_ecc_private_key._ECC_BLOQ_DOC],
)
]

# --------------------------------------------------------------------------
# ----- Basic Gates ----------------------------------------------------
# --------------------------------------------------------------------------
Expand Down Expand Up @@ -557,6 +570,7 @@
NotebookSpecV2(
title='Elliptic Curve Cryptography',
module=qualtran.bloqs.cryptography.ecc,
path_stem='ecc_arithmetic',
bloq_specs=[
qualtran.bloqs.cryptography.ecc.find_ecc_private_key._ECC_BLOQ_DOC,
qualtran.bloqs.cryptography.ecc.ec_phase_estimate_r._EC_PE_BLOQ_DOC,
Expand Down Expand Up @@ -928,6 +942,7 @@
]

NB_BY_SECTION = [
('Root Bloqs', ROOT_BLOQS),
('Basic Gates', BASIC_GATES),
('Chemistry', CHEMISTRY),
('Arithmetic', ARITHMETIC),
Expand Down
6 changes: 3 additions & 3 deletions docs/bloqs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Bloqs Library
state_preparation/state_preparation_via_rotation_tutorial.ipynb

.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Root Bloqs:

cryptography/ecc/ecc.ipynb
cryptography/ecc/ecc_root.ipynb

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -93,7 +93,7 @@ Bloqs Library
mod_arithmetic/mod_division.ipynb
cryptography/rsa/rsa.ipynb
cryptography/ecc/ec_add.ipynb
cryptography/ecc/ecc.ipynb
cryptography/ecc/ecc_arithmetic.ipynb

.. toctree::
:maxdepth: 2
Expand Down
Loading