diff --git a/.github/pre-commit/spellcheck_config.yml b/.github/pre-commit/spellcheck_config.yml index 67ce45b5592..ea3bb21fc0f 100644 --- a/.github/pre-commit/spellcheck_config.yml +++ b/.github/pre-commit/spellcheck_config.yml @@ -264,7 +264,7 @@ matrix: sources: # Exclude test directories, third-party code (tpls/), build artifacts, sphinx config, # and files with f-string syntax that pyspelling's parser can't handle - - '**/*.py|!python/tests/**/*.py|!cudaq/test/**/*.py|!targettests/**/*.py|!tpls/**/*.py|!_skbuild/**/*.py|!build/**/*.py|!build_*/**/*.py|!_version.py|!docs/sphinx/conf.py|!utils/mock_qpu/qci/__init__.py' + - '**/*.py|!python/tests/**/*.py|!cudaq/test/**/*.py|!targettests/**/*.py|!tpls/**/*.py|!_skbuild/**/*.py|!build/**/*.py|!build_*/**/*.py|!_version.py|!docs/sphinx/conf.py' glob_flags: N|G|B expect_match: false aspell: diff --git a/.github/workflows/test_in_devenv.yml b/.github/workflows/test_in_devenv.yml index 325b821b698..c75445c7aec 100644 --- a/.github/workflows/test_in_devenv.yml +++ b/.github/workflows/test_in_devenv.yml @@ -309,15 +309,10 @@ jobs: echo "::error file=test_in_devenv.yml::Python tests failed with status $pytest_status." exit 1 fi - mock_qpu_failures="" for backendTest in python/tests/backends/*.py; do output=$(python -m pytest -v -s --durations=0 $backendTest 2>&1) pytest_status=$? echo "$output" - if echo "$output" | grep -q "Mock qpu not available"; then - echo "::error file=test_in_devenv.yml::Mock QPU unavailable for $backendTest" - mock_qpu_failures="$mock_qpu_failures $backendTest" - fi # Exit code 5 indicates that no tests were collected, # i.e. all tests in this file were skipped. if [ ! $pytest_status -eq 0 ] && [ ! $pytest_status -eq 5 ]; then @@ -325,10 +320,6 @@ jobs: exit 1 fi done - if [ -n "$mock_qpu_failures" ]; then - echo "::error file=test_in_devenv.yml::Mock QPU tests skipped due to missing startServer:$mock_qpu_failures" - exit 1 - fi retry pip install qiskit python -m pytest -v --durations=0 python/tests/contrib diff --git a/docs/sphinx/using/extending/backend.rst b/docs/sphinx/using/extending/backend.rst index 183226a5909..0efbb8061cf 100644 --- a/docs/sphinx/using/extending/backend.rst +++ b/docs/sphinx/using/extending/backend.rst @@ -301,9 +301,9 @@ Create unit tests for your server helper: .. code-block:: bash #!/bin/bash - + # Start the mock server - python3 utils/start_mock_qpu.py & + python3 python/tests/utils/start_mock_qpu.py & SERVER_PID=$! # Wait for server to start @@ -371,7 +371,7 @@ Create a mock server for testing: .. code-block:: text - utils/mock_qpu// + python/tests/utils/mock_qpu// └── __init__.py Implement the mock server: @@ -457,11 +457,7 @@ Create Python tests for your backend: not (cudaq.has_target("")), reason='Could not find `` in installation') - try: - from utils.mock_qpu. import startServer - except: - print("Mock qpu not available, skipping Provider Name tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) + from utils.mock_qpu. import startServer # Define the port for the mock server - make sure this is unique # across all tests. diff --git a/python/tests/backends/conftest.py b/python/tests/backends/conftest.py index 1a8764c2a0a..bb1b49945b8 100644 --- a/python/tests/backends/conftest.py +++ b/python/tests/backends/conftest.py @@ -34,10 +34,7 @@ def quantinuum_mock_server(): Yields the path to the credentials file. """ from network_utils import check_server_connection - try: - from utils.mock_qpu.quantinuum import startServer - except Exception: - pytest.skip("Mock qpu not available.", allow_module_level=False) + from utils.mock_qpu.quantinuum import startServer with open(QUANTINUUM_CREDS_FILE, 'w') as f: f.write('key: {}\nrefresh: {}\ntime: 0'.format("nexus_key", diff --git a/python/tests/backends/test_IQM.py b/python/tests/backends/test_IQM.py index 4349dd98870..2f36e2598e2 100644 --- a/python/tests/backends/test_IQM.py +++ b/python/tests/backends/test_IQM.py @@ -21,12 +21,8 @@ iqm_client = pytest.importorskip("iqm.iqm_client") -try: - from utils.mock_qpu.iqm import startServer - from utils.mock_qpu.iqm.mock_iqm_cortex_cli import write_a_mock_tokens_file -except: - pytest.skip("Mock qpu not available, skipping IQM tests.", - allow_module_level=True) +from utils.mock_qpu.iqm import startServer +from utils.mock_qpu.iqm.mock_iqm_cortex_cli import write_a_mock_tokens_file # Define the port for the mock server port = 62443 diff --git a/python/tests/backends/test_IonQ.py b/python/tests/backends/test_IonQ.py index 2078d99855b..6a49c1f1c95 100644 --- a/python/tests/backends/test_IonQ.py +++ b/python/tests/backends/test_IonQ.py @@ -12,11 +12,7 @@ from typing import List from multiprocessing import Process from network_utils import check_server_connection -try: - from utils.mock_qpu.ionq import startServer -except: - print("Mock qpu not available, skipping IonQ tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.ionq import startServer # Define the port for the mock server port = 62441 diff --git a/python/tests/backends/test_OQC.py b/python/tests/backends/test_OQC.py index d698d71031a..c2efb5de58d 100644 --- a/python/tests/backends/test_OQC.py +++ b/python/tests/backends/test_OQC.py @@ -16,11 +16,7 @@ from cudaq import spin import numpy as np -try: - from utils.mock_qpu.oqc import startServer -except: - print("Mock qpu not available, skipping OQC tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.oqc import startServer # Define the port for the mock server port = 62442 diff --git a/python/tests/backends/test_QCI.py b/python/tests/backends/test_QCI.py index 806d4bb3ece..d03f816824d 100644 --- a/python/tests/backends/test_QCI.py +++ b/python/tests/backends/test_QCI.py @@ -15,11 +15,7 @@ from cudaq import spin from network_utils import check_server_connection -try: - from utils.mock_qpu.qci import startServer -except: - print("Mock qpu not available, skipping QCI tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.qci import startServer # Define the port for the mock server port = 62449 diff --git a/python/tests/backends/test_Quantinuum_kernel.py b/python/tests/backends/test_Quantinuum_kernel.py index c5f190cf3af..86f0c0d4b4a 100644 --- a/python/tests/backends/test_Quantinuum_kernel.py +++ b/python/tests/backends/test_Quantinuum_kernel.py @@ -16,7 +16,7 @@ def assert_close(got) -> bool: - return got < -1.1 and got > -2.2 + return got < -1.1 and got > -2.21 @pytest.fixture(scope="function", autouse=True) diff --git a/python/tests/backends/test_Quantum_Machines.py b/python/tests/backends/test_Quantum_Machines.py index 3b8062384d6..4612fb5449e 100644 --- a/python/tests/backends/test_Quantum_Machines.py +++ b/python/tests/backends/test_Quantum_Machines.py @@ -11,12 +11,7 @@ import pytest from multiprocessing import Process from network_utils import check_server_connection - -try: - from utils.mock_qpu.quantum_machines import start_server -except: - print("Mock qpu not available, skipping Quantum Machines tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.quantum_machines import start_server skipIfQuantumMachinesNotInstalled = pytest.mark.skipif( not (cudaq.has_target("quantum_machines")), diff --git a/python/tests/backends/test_qbraid.py b/python/tests/backends/test_qbraid.py index 8aa9b0dff57..e8e2a6f0ce0 100644 --- a/python/tests/backends/test_qbraid.py +++ b/python/tests/backends/test_qbraid.py @@ -15,11 +15,7 @@ from cudaq import spin from network_utils import check_server_connection -try: - from utils.mock_qpu.qbraid import startServer -except ImportError: - print("Mock qpu not available, skipping qBraid tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.qbraid import startServer port = 62454 @@ -27,7 +23,7 @@ TEST_MACHINE = "qbraid:qbraid:sim:qir-sv" TEST_API_KEY = "00000000000000000000000000000000" -# The qbraid mock server in utils/mock_qpu/qbraid/__init__.py doesn't simulate +# The qbraid mock server in python/tests/utils/mock_qpu/qbraid/__init__.py doesn't simulate # quantum mechanics - it only inspects the QASM for `h` and `measure` ops and # generates random outcomes for qubits with H. It does NOT model entanglement # via CNOT. Assertions below reflect the mock's behavior, not physical truth. diff --git a/python/tests/backends/test_scaleway_mock.py b/python/tests/backends/test_scaleway_mock.py index 7f3682e260d..fa9ee74fb9a 100644 --- a/python/tests/backends/test_scaleway_mock.py +++ b/python/tests/backends/test_scaleway_mock.py @@ -24,11 +24,7 @@ DEFAULT_SHOT_COUNT = 3000 DEFAULT_DEDUPLICATION_ID = "cudaq-test-scaleway" -try: - from utils.mock_qpu.scaleway import startServer -except: - pytest.skip("Mock qpu not available, skipping Scaleway tests.", - allow_module_level=True) +from utils.mock_qpu.scaleway import startServer @pytest.fixture(scope="session", autouse=True) diff --git a/python/tests/backends/test_tii_mock.py b/python/tests/backends/test_tii_mock.py index 221d0e0ed7b..0bbf7e10536 100644 --- a/python/tests/backends/test_tii_mock.py +++ b/python/tests/backends/test_tii_mock.py @@ -20,11 +20,7 @@ not (cudaq.has_target("tii")), reason='Could not find `tii` in installation') -try: - from utils.mock_qpu.tii import startServer -except: - print("Mock qpu not available, skipping tii tests.") - pytest.skip("Mock qpu not available.", allow_module_level=True) +from utils.mock_qpu.tii import startServer # Define the port for the mock server - make sure this is unique # across all tests. diff --git a/python/tests/utils/__init__.py b/python/tests/utils/__init__.py new file mode 100644 index 00000000000..c6c6f4d157c --- /dev/null +++ b/python/tests/utils/__init__.py @@ -0,0 +1,7 @@ +# ============================================================================ # +# Copyright (c) 2026 NVIDIA Corporation & Affiliates. # +# All rights reserved. # +# # +# This source code and the accompanying materials are made available under # +# the terms of the Apache License 2.0 which accompanies this distribution. # +# ============================================================================ # diff --git a/utils/mock_qpu/__init__.py b/python/tests/utils/mock_qpu/__init__.py similarity index 100% rename from utils/mock_qpu/__init__.py rename to python/tests/utils/mock_qpu/__init__.py diff --git a/utils/mock_qpu/anyon/__init__.py b/python/tests/utils/mock_qpu/anyon/__init__.py similarity index 100% rename from utils/mock_qpu/anyon/__init__.py rename to python/tests/utils/mock_qpu/anyon/__init__.py diff --git a/utils/mock_qpu/braket/__init__.py b/python/tests/utils/mock_qpu/braket/__init__.py similarity index 100% rename from utils/mock_qpu/braket/__init__.py rename to python/tests/utils/mock_qpu/braket/__init__.py diff --git a/utils/mock_qpu/infleqtion/__init__.py b/python/tests/utils/mock_qpu/infleqtion/__init__.py similarity index 100% rename from utils/mock_qpu/infleqtion/__init__.py rename to python/tests/utils/mock_qpu/infleqtion/__init__.py diff --git a/utils/mock_qpu/ionq/__init__.py b/python/tests/utils/mock_qpu/ionq/__init__.py similarity index 100% rename from utils/mock_qpu/ionq/__init__.py rename to python/tests/utils/mock_qpu/ionq/__init__.py diff --git a/utils/mock_qpu/iqm/__init__.py b/python/tests/utils/mock_qpu/iqm/__init__.py similarity index 100% rename from utils/mock_qpu/iqm/__init__.py rename to python/tests/utils/mock_qpu/iqm/__init__.py diff --git a/utils/mock_qpu/iqm/mock_iqm_cortex_cli.py b/python/tests/utils/mock_qpu/iqm/mock_iqm_cortex_cli.py similarity index 100% rename from utils/mock_qpu/iqm/mock_iqm_cortex_cli.py rename to python/tests/utils/mock_qpu/iqm/mock_iqm_cortex_cli.py diff --git a/utils/mock_qpu/oqc/__init__.py b/python/tests/utils/mock_qpu/oqc/__init__.py similarity index 100% rename from utils/mock_qpu/oqc/__init__.py rename to python/tests/utils/mock_qpu/oqc/__init__.py diff --git a/utils/mock_qpu/preallocated_qubits_context.py b/python/tests/utils/mock_qpu/preallocated_qubits_context.py similarity index 100% rename from utils/mock_qpu/preallocated_qubits_context.py rename to python/tests/utils/mock_qpu/preallocated_qubits_context.py diff --git a/utils/mock_qpu/qbraid/__init__.py b/python/tests/utils/mock_qpu/qbraid/__init__.py similarity index 100% rename from utils/mock_qpu/qbraid/__init__.py rename to python/tests/utils/mock_qpu/qbraid/__init__.py diff --git a/utils/mock_qpu/qci/__init__.py b/python/tests/utils/mock_qpu/qci/__init__.py similarity index 100% rename from utils/mock_qpu/qci/__init__.py rename to python/tests/utils/mock_qpu/qci/__init__.py diff --git a/utils/mock_qpu/quantinuum/__init__.py b/python/tests/utils/mock_qpu/quantinuum/__init__.py similarity index 100% rename from utils/mock_qpu/quantinuum/__init__.py rename to python/tests/utils/mock_qpu/quantinuum/__init__.py diff --git a/utils/mock_qpu/quantum_machines/__init__.py b/python/tests/utils/mock_qpu/quantum_machines/__init__.py similarity index 100% rename from utils/mock_qpu/quantum_machines/__init__.py rename to python/tests/utils/mock_qpu/quantum_machines/__init__.py diff --git a/utils/mock_qpu/scaleway/__init__.py b/python/tests/utils/mock_qpu/scaleway/__init__.py similarity index 100% rename from utils/mock_qpu/scaleway/__init__.py rename to python/tests/utils/mock_qpu/scaleway/__init__.py diff --git a/utils/mock_qpu/tii/__init__.py b/python/tests/utils/mock_qpu/tii/__init__.py similarity index 100% rename from utils/mock_qpu/tii/__init__.py rename to python/tests/utils/mock_qpu/tii/__init__.py diff --git a/utils/start_mock_qpu.py b/python/tests/utils/start_mock_qpu.py similarity index 100% rename from utils/start_mock_qpu.py rename to python/tests/utils/start_mock_qpu.py diff --git a/unittests/backends/anyon/AnyonStartServerAndTest.sh.in b/unittests/backends/anyon/AnyonStartServerAndTest.sh.in index 4332882d61f..a49b1adca06 100644 --- a/unittests/backends/anyon/AnyonStartServerAndTest.sh.in +++ b/unittests/backends/anyon/AnyonStartServerAndTest.sh.in @@ -21,7 +21,7 @@ # EOF # } -# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/anyon) under main/utils +# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/anyon) under python/test/utils checkServerConnection() { PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ - << EOF import socket @@ -34,9 +34,9 @@ except Exception: EOF } -# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/anyon) under main/utils +# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/anyon) under python/test/utils # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py anyon & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py anyon & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/braket/BraketStartServerAndTest.sh.in b/unittests/backends/braket/BraketStartServerAndTest.sh.in index d9361251afd..32bb597641f 100644 --- a/unittests/backends/braket/BraketStartServerAndTest.sh.in +++ b/unittests/backends/braket/BraketStartServerAndTest.sh.in @@ -21,7 +21,7 @@ # EOF # } -# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/braket) under main/utils +# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/braket) under python/test/utils checkServerConnection() { PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ - << EOF import socket @@ -34,9 +34,9 @@ except Exception: EOF } -# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/braket) under main/utils +# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/braket) under python/test/utils # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py braket & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py braket & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/infleqtion/InfleqtionStartServerAndTest.sh.in b/unittests/backends/infleqtion/InfleqtionStartServerAndTest.sh.in index 7f9898b0a94..00b576521e7 100644 --- a/unittests/backends/infleqtion/InfleqtionStartServerAndTest.sh.in +++ b/unittests/backends/infleqtion/InfleqtionStartServerAndTest.sh.in @@ -21,7 +21,7 @@ EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py infleqtion & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py infleqtion & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/ionq/IonQStartServerAndTest.sh.in b/unittests/backends/ionq/IonQStartServerAndTest.sh.in index ef6d5de7a05..a787aaad6df 100644 --- a/unittests/backends/ionq/IonQStartServerAndTest.sh.in +++ b/unittests/backends/ionq/IonQStartServerAndTest.sh.in @@ -21,7 +21,7 @@ EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py ionq & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py ionq & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/iqm/IQMStartServerAndTest.sh.in b/unittests/backends/iqm/IQMStartServerAndTest.sh.in index a107d8fed56..14093f895e6 100644 --- a/unittests/backends/iqm/IQMStartServerAndTest.sh.in +++ b/unittests/backends/iqm/IQMStartServerAndTest.sh.in @@ -30,9 +30,9 @@ EOF # Create fake auth tokens file tmp_file=$(mktemp) -@Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/mock_qpu/iqm/mock_iqm_cortex_cli.py $tmp_file +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/mock_qpu/iqm/mock_iqm_cortex_cli.py $tmp_file # Launch the fake server -@Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py iqm & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py iqm & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/oqc/OQCStartServerAndTest.sh.in b/unittests/backends/oqc/OQCStartServerAndTest.sh.in index e18df266ff0..97c6659048a 100644 --- a/unittests/backends/oqc/OQCStartServerAndTest.sh.in +++ b/unittests/backends/oqc/OQCStartServerAndTest.sh.in @@ -22,7 +22,7 @@ EOF @Python_EXECUTABLE@ -m pip install requests llvmlite # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py oqc & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py oqc & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/qbraid/QbraidStartServerAndTest.sh.in b/unittests/backends/qbraid/QbraidStartServerAndTest.sh.in index 4221dc109fa..dc8e36b2a89 100644 --- a/unittests/backends/qbraid/QbraidStartServerAndTest.sh.in +++ b/unittests/backends/qbraid/QbraidStartServerAndTest.sh.in @@ -21,7 +21,7 @@ EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/mock_qpu/qbraid/__init__.py & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/mock_qpu/qbraid/__init__.py & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/qci/QCIStartServerAndTest.sh.in b/unittests/backends/qci/QCIStartServerAndTest.sh.in index f0db7ed564a..c17f2bfc0a7 100644 --- a/unittests/backends/qci/QCIStartServerAndTest.sh.in +++ b/unittests/backends/qci/QCIStartServerAndTest.sh.in @@ -22,7 +22,7 @@ EOF # Launch the mock server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py qci & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py qci & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/quantinuum/QuantinuumStartServerAndTest.sh.in b/unittests/backends/quantinuum/QuantinuumStartServerAndTest.sh.in index c6d62efebd9..ec224b55000 100644 --- a/unittests/backends/quantinuum/QuantinuumStartServerAndTest.sh.in +++ b/unittests/backends/quantinuum/QuantinuumStartServerAndTest.sh.in @@ -20,7 +20,7 @@ except Exception: EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py quantinuum & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py quantinuum & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/quantinuum/QuantinuumStartServerAndTestNvqpp.sh.in b/unittests/backends/quantinuum/QuantinuumStartServerAndTestNvqpp.sh.in index 6a1b4461a0d..14095af5c75 100644 --- a/unittests/backends/quantinuum/QuantinuumStartServerAndTestNvqpp.sh.in +++ b/unittests/backends/quantinuum/QuantinuumStartServerAndTestNvqpp.sh.in @@ -20,7 +20,7 @@ except Exception: EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py quantinuum & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py quantinuum & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/quantum_machines/QuantumMachinesStartServerAndTest.sh.in b/unittests/backends/quantum_machines/QuantumMachinesStartServerAndTest.sh.in index cfe0cb40583..25c57c5be03 100644 --- a/unittests/backends/quantum_machines/QuantumMachinesStartServerAndTest.sh.in +++ b/unittests/backends/quantum_machines/QuantumMachinesStartServerAndTest.sh.in @@ -21,7 +21,7 @@ EOF } # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py quantum_machines & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py quantum_machines & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/scaleway/ScalewayStartServerAndTest.sh.in b/unittests/backends/scaleway/ScalewayStartServerAndTest.sh.in index 73b7d68fc41..a89dbcc688f 100644 --- a/unittests/backends/scaleway/ScalewayStartServerAndTest.sh.in +++ b/unittests/backends/scaleway/ScalewayStartServerAndTest.sh.in @@ -29,9 +29,9 @@ except Exception: EOF } -# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/scaleway) under main/utils +# Uncomment this and connect to mock_qpu backend server within the container (mock_qpu/scaleway) under python/test/utils # Launch the fake server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py scaleway & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py scaleway & # we'll need the process id to kill it pid=$(echo "$!") n=0 diff --git a/unittests/backends/tii/TiiStartServerAndTest.sh.in b/unittests/backends/tii/TiiStartServerAndTest.sh.in index 18c8276ff9c..126510b8d41 100644 --- a/unittests/backends/tii/TiiStartServerAndTest.sh.in +++ b/unittests/backends/tii/TiiStartServerAndTest.sh.in @@ -22,7 +22,7 @@ EOF # Launch the mock server -PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_SOURCE_DIR@/utils/start_mock_qpu.py tii & +PYTHONPATH=@CMAKE_BINARY_DIR@/python @Python_EXECUTABLE@ @CMAKE_BINARY_DIR@/python/tests/utils/start_mock_qpu.py tii & # we'll need the process id to kill it pid=$(echo "$!") n=0