We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7ca75b commit b57d79dCopy full SHA for b57d79d
tests/notebooks/test_bernstein_vazirani.py
@@ -0,0 +1,19 @@
1
+import pytest
2
+from tests.utils_for_testbook import (
3
+ validate_quantum_program_size,
4
+ validate_quantum_model,
5
+ execute_testbook_with_timeout,
6
+)
7
+from tests.utils_for_tests import should_skip_notebook
8
+from testbook.client import TestbookNotebookClient # type: ignore[import]
9
+
10
11
+@execute_testbook_with_timeout("bernstein_vazirani", timeout_seconds=20)
12
+def test_bernstein_vazirani(tb: TestbookNotebookClient) -> None:
13
+ # test models
14
+ validate_quantum_model(tb.ref("qmod"))
15
+ # test quantum programs
16
+ validate_quantum_program_size(tb.ref("qprog"), expected_width=6, expected_depth=5)
17
18
+ # test notebook content
19
+ assert int(tb.ref("secret_integer_q")) == tb.ref("SECRET_INT")
0 commit comments