Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA-Q Docs Applications Section Reorg #2609

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1283349
Applications with filter
mawolf2023 Feb 6, 2025
593f878
new applications.rst
mawolf2023 Feb 7, 2025
e6060c1
examples with solvers
mawolf2023 Feb 7, 2025
716b3be
Filters fixed, updated applications
mawolf2023 Feb 10, 2025
1fb68c4
Drop down filters to backend, fixed dynamics page in backends
mawolf2023 Feb 12, 2025
92fa48b
Update docs/sphinx/using/applications.rst
mawolf2023 Feb 12, 2025
5b41914
cudaqx page
mawolf2023 Feb 13, 2025
787d8d6
remove sphinx needs
mawolf2023 Feb 20, 2025
cde6b4d
remove cudaqx and add apapt qaoa
mawolf2023 Feb 26, 2025
c512cc7
minor backend fixes, simulator figure update
mawolf2023 Feb 27, 2025
68b724f
add license headers to .css and .js files
mawolf2023 Feb 27, 2025
3262628
* Spelling fixes
khalatepradnya Mar 10, 2025
6810214
* Make spell checker happy
khalatepradnya Mar 10, 2025
cba73b6
* Content for two notebooks
khalatepradnya Mar 10, 2025
e3c7d15
* Remove auto-generated files from source tree.
khalatepradnya Mar 10, 2025
8344b00
* Fix output on QAOA notebook
khalatepradnya Mar 10, 2025
06782f6
* Reduce the diff by restoring notebooks which had only metadata changes
khalatepradnya Mar 10, 2025
47ce3af
* Move the installation of `sphinx-tags` to devdeps image
khalatepradnya Mar 10, 2025
8ff3a2b
* Renamed notebooks to use capitalized proper names wherever applicable.
khalatepradnya Mar 11, 2025
8e08352
Apply suggestions from code review
khalatepradnya Mar 13, 2025
c2d01df
Adding link to the paper for the collaboration between Nvidia and Inf…
sacpis Mar 19, 2025
bafb2ab
Adding Learn in the text
sacpis Mar 19, 2025
f046922
Fixing docs
sacpis Mar 19, 2025
ef41835
Fixing spelling
sacpis Mar 19, 2025
d505e9f
Merge branch 'main' into sort_by_tag
sacpis Mar 19, 2025
5eeaf63
update qpu logos
mawolf2023 Mar 19, 2025
a025502
Renaming files to be lowercase to be consistent with the naming conve…
sacpis Mar 20, 2025
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
4 changes: 4 additions & 0 deletions .github/workflows/config/spellcheck_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ matrix:
# Ignore word prefixes, e.g. "pre-" in pre-computed
- open: '(^|\s)[A-Z]?[a-z]+-'
close: '(?=.)'
# Ignore apostrophy-s endings of words (e.g. NVIDIA's)
- open: '(?=\S)'
close: '($|(?=[^a-z]))'
content: '\u0027s'

- name: python
sources:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/config/spelling_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ DCO
DGX
DOI
Deuteron
Deutsch
Doxygen
FPGAs
Fock
Expand Down Expand Up @@ -54,6 +55,7 @@ Jupyter
JupyterLab
Kagome
Kraus
Krylov
LLVM
LSB
Libraries
Expand Down Expand Up @@ -99,6 +101,7 @@ QPU
QPUs
QPU’s
QTX
QX
Qiskit
QuEra
QuTiP
Expand Down Expand Up @@ -140,6 +143,7 @@ arity
auxillary
backend
backends
bernstein
bitcode
bitstring
bitstrings
Expand Down Expand Up @@ -170,7 +174,9 @@ coprocessor
coprocessors
copyable
coreset
coresets
cortex-cli
counterdiabatic
coupler
couplers
cuQuantum
Expand All @@ -189,6 +195,7 @@ dendrogram
deserialize
destructor
detuning
deutsch
dimensionality
discoverable
discretization
Expand Down Expand Up @@ -222,8 +229,11 @@ extremal
fermionic
fermioniq
fmt
fourier
frontend
frontends
hadamard
hamiltonian
homogenous
iff
increment
Expand All @@ -242,6 +252,7 @@ intrinsics
iterable
iteratively
kets
krylov
linker
linkers
logarithmically
Expand Down Expand Up @@ -275,6 +286,7 @@ preprocessor
probability
programmatically
pybind
qaoa
quantize
quantized
qubit
Expand All @@ -295,6 +307,7 @@ shifter
shifters
splitter
splitters
sqale
statevector
struct
structs
Expand Down Expand Up @@ -335,9 +348,11 @@ unoptimized
upvote
variadic
variational
vazirani
vdots
verifier
vertices
vqe
waveforms
wavefunction
workflow
2 changes: 1 addition & 1 deletion docker/build/devdeps.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends python3 python3
ipython==8.15.0 pandoc==2.3 sphinx==5.3.0 sphinx_rtd_theme==1.2.0 sphinx-reredirects==0.1.2 \
sphinx-copybutton==0.5.2 sphinx_inline_tabs==2023.4.21 enum-tools[sphinx] breathe==4.34.0 \
nbsphinx==0.9.2 sphinx_gallery==0.13.0 myst-parser==1.0.0 ipykernel==6.29.4 notebook==7.3.2 \
ipywidgets==8.1.5
ipywidgets==8.1.5 sphinx-tags==0.4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
157 changes: 157 additions & 0 deletions docs/sphinx/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*******************************************************************************
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
* All rights reserved. *
* *
* This source code and the accompanying materials are made available under *
* the terms of the Apache License 2.0 which accompanies this distribution. *
* *
* File: custom.css *
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have similar files in the source tree, so I don't know if the copyright banner format is same or different.
@schweitzpgi - can you provide pointers on the getting this one right for *.css and .*.js files?

* Created Date: 16 Feb 2023 *
* Last Modified: 16 Feb 2023 *
******************************************************************************/


.notebook-entry {
display: grid;
grid-template-areas:
"title image"
"content image";
grid-template-columns: 1fr 300px;
grid-template-rows: auto 1fr;
gap: 20px;
margin-bottom: 50px;
padding: 20px;
border: 1px solid #eee;
background: white;
}

.notebook-title {
grid-area: title;
display: block;
font-size: 24px;
font-weight: bold;
text-decoration: none;
margin: 0;
padding: 0 0 10px 0;
color: #333;
border-bottom: 1px solid #eee;
}

.notebook-title:hover {
color: #76b900;
text-decoration: underline;
}

.notebook-content {
grid-area: content;
padding: 0;
margin: 0;
line-height: 1.6;
}

.notebook-image {
grid-area: image;
width: 300px;
height: 200px;
object-fit: cover;
justify-self: end;
align-self: start;
margin: 0;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toctree-wrapper {
grid-area: link;
margin: 10px 0 0 0;
padding: 0;
}

.tag-button {
margin: 2px;
padding: 8px 16px;
border: 1px solid #ccc;
background: #f8f8f8;
cursor: pointer;
border-radius: 4px;
transition: all 0.3s ease;
}

.tag-button.active {
background-color: #76b900;
color: white;
border-color: #599400;
box-shadow: 0 0 5px rgba(118, 185, 0, 0.3);
}

.tag-button:hover {
background-color: #ecffad;
}

.filter-groups {
margin-bottom: 40px;
padding: 20px;
background: #f9f9f9;
border-radius: 8px;
}

.tag-filters {
margin-bottom: 25px;
}

.backend-group {
display: inline-block;
position: relative;
margin-right: 10px;
}

.backend-options {
display: none;
position: absolute;
top: 100%;
left: 0;
background: white;
border: 1px solid #ccc;
border-radius: 4px;
padding: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
z-index: 100;
min-width: 200px;
}

.backend-group:hover .backend-options {
display: block;
}

.backend-toggle {
position: relative;
padding-right: 24px;
}

.backend-toggle::after {
content: '▼';
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
font-size: 10px;
}

.sub-option {
display: block;
width: 100%;
text-align: left;
margin: 4px 0;
border: none;
background: transparent;
padding: 6px 12px;
}

.sub-option:hover {
background-color: #f5f5f5;
}

.sub-option.active {
background-color: #76b900;
color: white;
}
112 changes: 112 additions & 0 deletions docs/sphinx/_static/filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*******************************************************************************
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
* All rights reserved. *
* *
* This source code and the accompanying materials are made available under *
* the terms of the Apache License 2.0 which accompanies this distribution. *
* *
* File: filter.js *
* Created Date: 16 Feb 2023 *
* Last Modified: 16 Feb 2023 *
******************************************************************************/


document.addEventListener('DOMContentLoaded', function() {
const notebooks = document.querySelectorAll('.notebook-entry');
const tagButtons = document.querySelectorAll('.tag-button');

const activeFilters = {
domain: 'all',
backend: 'all',
occasion: 'all',
subFilter: 'all'
};

const backendCategories = {
noiseless: ['gpu', 'mgpu', 'mqpu'],
noisy: ['density'],
qpu: ['neutral']
};

tagButtons.forEach(button => {
button.addEventListener('click', function() {
const group = this.getAttribute('data-group');
const tag = this.getAttribute('data-tag');

if (this.classList.contains('sub-option')) {
if (activeFilters.subFilter === tag) {
activeFilters.subFilter = 'all';
activeFilters.backend = 'all';
document.querySelectorAll('.sub-option, .backend-toggle').forEach(btn =>
btn.classList.remove('active'));
document.querySelector('.tag-button[data-tag="all"]').classList.add('active');
} else {
activeFilters.subFilter = tag;
activeFilters.backend = this.closest('.backend-group')
.querySelector('.backend-toggle')
.getAttribute('data-tag');

document.querySelectorAll('.sub-option').forEach(btn =>
btn.classList.toggle('active', btn.getAttribute('data-tag') === tag));

document.querySelectorAll('.backend-toggle').forEach(toggle =>
toggle.classList.toggle('active',
toggle.getAttribute('data-tag') === activeFilters.backend));

document.querySelector('.tag-button[data-tag="all"]').classList.remove('active');
}
} else if (this.classList.contains('backend-toggle')) {
if (activeFilters.backend === tag) {
activeFilters.backend = 'all';
activeFilters.subFilter = 'all';
document.querySelectorAll('.backend-toggle, .sub-option').forEach(btn =>
btn.classList.remove('active'));
document.querySelector('.tag-button[data-tag="all"]').classList.add('active');
} else {
activeFilters.backend = tag;
activeFilters.subFilter = 'all';
document.querySelectorAll('.backend-toggle').forEach(btn =>
btn.classList.toggle('active', btn.getAttribute('data-tag') === tag));
document.querySelectorAll('.sub-option').forEach(btn =>
btn.classList.remove('active'));
document.querySelector('.tag-button[data-tag="all"]').classList.remove('active');
}
} else {
// Handle regular filter buttons
if (group === 'occasion') {
if (activeFilters[group] === tag) {
// If clicking the same tag, reset to 'all'
activeFilters[group] = 'all';
this.classList.remove('active');
} else {
activeFilters[group] = tag;
document.querySelectorAll(`.tag-button[data-group="${group}"]`)
.forEach(btn => btn.classList.remove('active'));
this.classList.add('active');
}
} else {
document.querySelectorAll(`.tag-button[data-group="${group}"]`)
.forEach(btn => btn.classList.remove('active'));
this.classList.add('active');
activeFilters[group] = tag;
}

if (group === 'backend') {
activeFilters.subFilter = 'all';
}
}

// Apply all filters
notebooks.forEach(notebook => {
const notebookTags = notebook.getAttribute('data-tags').split(',').map(t => t.trim());
const isVisible = Object.entries(activeFilters).every(([group, tag]) => {
if (group === 'subFilter' && tag !== 'all') {
return notebookTags.includes(tag);
}
return tag === 'all' || notebookTags.includes(tag);
});
notebook.style.display = isVisible ? 'grid' : 'none';
});
});
});
});
11 changes: 11 additions & 0 deletions docs/sphinx/_tags/tagsindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:orphan:

.. _tagoverview:

Tags overview
#############

.. toctree::
:caption: Tags
:maxdepth: 1

Loading
Loading