-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test: linear_combination_of_unitaries
- Loading branch information
1 parent
bb4355c
commit 1ed9088
Showing
2 changed files
with
45 additions
and
24 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from tests.utils_for_testbook import ( | ||
validate_quantum_program_size, | ||
validate_quantum_model, | ||
wrap_testbook, | ||
) | ||
from testbook.client import TestbookNotebookClient | ||
|
||
|
||
@wrap_testbook("linear_combination_of_unitaries", timeout_seconds=20) | ||
def test_notebook(tb: TestbookNotebookClient) -> None: | ||
# test models | ||
validate_quantum_model(tb.ref("qmod_1")) | ||
validate_quantum_model(tb.ref("qmod_2")) | ||
|
||
# test quantum programs | ||
validate_quantum_program_size( | ||
tb.ref("qprog_1"), | ||
expected_width=5, # actual width: 4 | ||
expected_depth=500, # actual depth: 372 | ||
) | ||
validate_quantum_program_size( | ||
tb.ref("qprog_2"), | ||
expected_width=5, # actual width: 4 | ||
expected_depth=500, # actual depth: 372 | ||
) | ||
|
||
# test notebook content | ||
pass # Todo |
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