Skip to content
Merged
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
1,338 changes: 1,338 additions & 0 deletions applications/optimization/adaptive_qaoa_lib.ipynb

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions tests/notebooks/test_adaptive_qaoa_lib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from tests.utils_for_testbook import (
validate_quantum_program_size,
validate_quantum_model,
wrap_testbook,
)
from testbook.client import TestbookNotebookClient


@wrap_testbook("adaptive_qaoa_lib", timeout_seconds=1000)
def test_notebook(tb: TestbookNotebookClient) -> None:
# test models
# validate_quantum_model(tb.ref("qmod"))
# test quantum programs
validate_quantum_program_size(
tb.ref_pydantic("qprog"),
expected_width=None,
Copy link
Member

Choose a reason for hiding this comment

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

You can have a look at other file tests and see what to fill in. For example, test_shor.py.
In particular, the # test notebook content is optional, but it can be very useful to verify the functional result of the notebook.

If you did not generate a qmod python variable in the notebook then remove validate_quantum_model(tb.ref("qmod")).
For the validate_quantum_program_size please add numbers with some buffer compared to what you actually see.

expected_depth=None,
)

# test notebook content
pass # Todo
1 change: 1 addition & 0 deletions tests/resources/timeouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SWAP.qmod: 10
U.qmod: 10
WS_iQuHack_2025_final.ipynb: 200
X.qmod: 10
adaptive_qaoa_lib.ipynb: 1000
add_bell_states.qmod: 10
advection_equation_2nd_place_submission.ipynb: 500
advection_equation_winning_submission.ipynb: 1200
Expand Down
Loading