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
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.

Large diffs are not rendered by default.

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


@wrap_testbook("tensor_hypercontraction", timeout_seconds=1801)
def test_notebook(tb: TestbookNotebookClient) -> None:
# test quantum programs
validate_quantum_program_size(
tb.ref_pydantic("qprog_prepare_part1"),
expected_width=100, # actual is 82
expected_depth=5000, # actual is 3576
)

validate_quantum_program_size(
tb.ref_pydantic("qprog_prepare_part2"),
expected_width=120, # actual is 93
expected_depth=7000, # actual is 5039
)

validate_quantum_program_size(
tb.ref_pydantic("qprog_select"),
expected_width=130, # actual is 108
expected_depth=5000, # actual is 3195
)

validate_quantum_program_size(
tb.ref_pydantic("qprog"),
expected_width=140, # actual is 114
)

# test notebook content
pass # Todo
Loading