From 4910b6f09de105f7ad6d2891e7ee533d249ed2de Mon Sep 17 00:00:00 2001 From: ravidalon Date: Mon, 24 Feb 2025 09:43:34 +0200 Subject: [PATCH 1/2] Fix a couple of links --- .../qml/hybrid_qnn/hybrid_qnn_for_subset_majority.ipynb | 2 +- .../workshops/finance_workshops/Qmod_workshop4finance.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/algorithms/qml/hybrid_qnn/hybrid_qnn_for_subset_majority.ipynb b/algorithms/qml/hybrid_qnn/hybrid_qnn_for_subset_majority.ipynb index a2ddb534..778963bf 100644 --- a/algorithms/qml/hybrid_qnn/hybrid_qnn_for_subset_majority.ipynb +++ b/algorithms/qml/hybrid_qnn/hybrid_qnn_for_subset_majority.ipynb @@ -64,7 +64,7 @@ "\n", "The integration of quantum layers in classical neural networks may offer reduction in resources for a given functionality, as the network (or part of it) is expressed via the Hilbert space, providing different expressibility compared to classical networks.\n", "\n", - "This notebook demonstrates QNN by treating a specific function—the subset majority—for which we construct, train, and verify a hybrid classical-quantum neural network. The notebook assumes familiarity with Classiq and NN with PyTorch. See the [QML guide with Classiq](https://github.com/Classiq/classiq-library/blob/main/tutorials/documentation_materials/user_guide/qml_with_classiq_guide/qml_with_classiq_guide.ipynb)." + "This notebook demonstrates QNN by treating a specific function—the subset majority—for which we construct, train, and verify a hybrid classical-quantum neural network. The notebook assumes familiarity with Classiq and NN with PyTorch. See the [QML guide with Classiq](https://github.com/Classiq/classiq-library/blob/main/tutorials/popular_usage_examples/qml_with_classiq_guide/qml_with_classiq_guide.ipynb)." ] }, { diff --git a/tutorials/workshops/finance_workshops/Qmod_workshop4finance.ipynb b/tutorials/workshops/finance_workshops/Qmod_workshop4finance.ipynb index 652c69ac..cb16b26b 100644 --- a/tutorials/workshops/finance_workshops/Qmod_workshop4finance.ipynb +++ b/tutorials/workshops/finance_workshops/Qmod_workshop4finance.ipynb @@ -246,7 +246,7 @@ "1. Make sure you define a `main` function that calls functions you create.\n", "2. Use `create_model` by running `qmod = create_model(main)` to construct a representation of your model.\n", "3. You can synthesize the model (using `qprog = synthesize(qmod)`) to obtain an implementation - a quantum program.\n", - "4. You can then visualize the quantum program (`show(qprog)`) or execute it using `execute(qprog)`. See: [Execution - Classiq](https://github.com/Classiq/classiq-library/blob/main/tutorials/documentation_materials/classiq_101/classiq_concepts/execute/execute.ipynb). You can also execute it with the IDE after visualizing the circuit." + "4. You can then visualize the quantum program (`show(qprog)`) or execute it using `execute(qprog)`. See: [Execution - Classiq](https://github.com/Classiq/classiq-library/blob/main/tutorials/classiq_101/classiq_concepts/execute/execute.ipynb). You can also execute it with the IDE after visualizing the circuit." ] }, { @@ -626,7 +626,7 @@ "The `repeat` operator invokes a statement block multiple times. The statement block is specified using a Python callable, typically a `lambda` expression. Inside the block, you can refer to variables declared in the outer function scope.\n", "This concept is called `quantum variable capture`, equivalent to [capture](https://en.wikipedia.org/wiki/Closure_(computer_programming)) in classical languages.\n", "\n", - "See also capturing context [variables](https://github.com/Classiq/classiq-library/blob/main/tutorials/documentation_materials/classiq_101/classiq_concepts/design/quantum_variables_and_functions/quantum_variables_and_functions.ipynb) and parameters and [operators](https://docs.classiq.io/latest/qmod-reference/language-reference/operators)." + "See also capturing context [variables](https://github.com/Classiq/classiq-library/blob/main/tutorials/classiq_101/classiq_concepts/design/quantum_variables_and_functions/quantum_variables_and_functions.ipynb) and parameters and [operators](https://docs.classiq.io/latest/qmod-reference/language-reference/operators)." ] }, { From 2b68a4e8b87e1ad0f833583c44af797cc13dd82c Mon Sep 17 00:00:00 2001 From: ravidalon Date: Mon, 24 Feb 2025 09:53:05 +0200 Subject: [PATCH 2/2] Fix path relative-ness --- tests/utils_for_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/utils_for_tests.py b/tests/utils_for_tests.py index 311f6397..a293f17d 100644 --- a/tests/utils_for_tests.py +++ b/tests/utils_for_tests.py @@ -9,7 +9,10 @@ def iterate_notebooks() -> list[str]: if os.environ.get("SHOULD_TEST_ALL_FILES", "") == "true": notebooks_to_test = _get_all_notebooks() else: - notebooks_to_test = os.environ.get("LIST_OF_IPYNB_CHANGED", "").split() + notebooks_to_test = [ + os.path.relpath(os.path.join(ROOT_DIRECTORY, path), os.getcwd()) + for path in os.environ.get("LIST_OF_IPYNB_CHANGED", "").split() + ] return notebooks_to_test