-
Notifications
You must be signed in to change notification settings - Fork 218
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
Draft
mawolf2023
wants to merge
28
commits into
NVIDIA:main
Choose a base branch
from
mawolf2023:sort_by_tag
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
b3ecd7f
Applications with filter
mawolf2023 d1778f3
new applications.rst
mawolf2023 b99a3e0
examples with solvers
mawolf2023 a7385da
Filters fixed, updated applications
mawolf2023 4738288
Update docs/sphinx/using/applications.rst
mawolf2023 b6eaa28
Drop down filters to backend, fixed dynamics page in backends
mawolf2023 f91f2e7
fix conflict
mawolf2023 d5e8eef
cudaqx page
mawolf2023 e10f431
remove sphinx needs
mawolf2023 7b941da
remove cudaqx and add apapt qaoa
mawolf2023 b745ca6
minor backend fixes, simulator figure update
mawolf2023 f3f8484
conflicts resolved
mawolf2023 f990b31
add license headers to .css and .js files
mawolf2023 5687b7d
Merge branch 'main' into sort_by_tag
khalatepradnya 04f074a
* Spelling fixes
khalatepradnya e4457c6
* Make spell checker happy
khalatepradnya 4c95f2a
* Content for two notebooks
khalatepradnya 9c4935c
* Remove auto-generated files from source tree.
khalatepradnya ccfa657
* Fix output on QAOA notebook
khalatepradnya 8e64813
* Reduce the diff by restoring notebooks which had only metadata changes
khalatepradnya 9b30ff5
* Move the installation of `sphinx-tags` to devdeps image
khalatepradnya 5adde72
Merge branch 'main' into sort_by_tag
khalatepradnya e070fa1
* Renamed notebooks to use capitalized proper names wherever applicable.
khalatepradnya 5be370a
Merge branch 'main' into sort_by_tag
khalatepradnya 86cfff8
Merge branch 'main' into sort_by_tag
khalatepradnya 5151cc8
Since the AFQMC notebook was removed, doesn't make sense to have
khalatepradnya 815ce62
Apply suggestions from code review
khalatepradnya 97c58cb
Merge branch 'main' into sort_by_tag
khalatepradnya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 * | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
* 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
}); | ||
}); | ||
}); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
CUDA-QX
.