diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 088b488492..1610b5917d 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -30,6 +30,9 @@ ### Improvements +* Skip the compilation of Lightning simulators and development requirements to boost the build of public docs up to 5x. + [(#904)](https://github.com/PennyLaneAI/pennylane-lightning/pull/904) + * Update Pybind11 to 2.13.5. [(#901)](https://github.com/PennyLaneAI/pennylane-lightning/pull/901) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7218acc5a3..51c5b4ffc9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,32 +3,17 @@ version: 2 sphinx: configuration: doc/conf.py -python: - install: - - requirements: ci_build_requirements.txt - - requirements: doc/requirements.txt - - requirements: requirements-dev.txt - - method: pip - path: . - build: os: ubuntu-22.04 tools: python: "3.10" apt_packages: - - cmake - - build-essential - - libopenblas-base - - libopenblas-dev - graphviz - - wget jobs: - pre_install: - - wget https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run - - sh cuda_12.3.2_545.23.08_linux.run --silent --toolkit --toolkitpath=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3 || cat /tmp/cuda-installer.log - - echo "setuptools~=66.0" >> ci_build_requirements.txt post_install: - - rm -rf ./build && export PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/bin${PATH:+:${PATH}} && export LD_LIBRARY_PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} && PL_BACKEND="lightning_gpu" python scripts/configure_pyproject_toml.py && CMAKE_ARGS="-DPL_DISABLE_CUDA_SAFETY=1" python -m build - - rm -rf ./build && PL_BACKEND="lightning_kokkos" python scripts/configure_pyproject_toml.py && python -m build - - rm -rf ./build && export PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/bin${PATH:+:${PATH}} && export LD_LIBRARY_PATH=${READTHEDOCS_VIRTUALENV_PATH}/cuda-12.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} && PL_BACKEND="lightning_tensor" python scripts/configure_pyproject_toml.py && CMAKE_ARGS="-DPL_DISABLE_CUDA_SAFETY=1" python -m build + - python -m pip install --exists-action=w --no-cache-dir -r doc/requirements.txt + - PL_BACKEND="lightning_qubit" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build + - rm -rf ./build && PL_BACKEND="lightning_gpu" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build + - rm -rf ./build && PL_BACKEND="lightning_kokkos" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build + - rm -rf ./build && PL_BACKEND="lightning_tensor" python scripts/configure_pyproject_toml.py && SKIP_COMPILATION=True python -m build - python -m pip install ./dist/*.whl diff --git a/Makefile b/Makefile index 53afb80916..c9c454bb64 100644 --- a/Makefile +++ b/Makefile @@ -63,11 +63,15 @@ clean: rm -rf pennylane_lightning/*_ops* rm -rf *.egg-info -.PHONY: python +.PHONY: python python-skip-compile python: PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py pip install -e . --config-settings editable_mode=compat -vv +python-skip-compile: + PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py + SKIP_COMPILATION=True pip install -e . --config-settings editable_mode=compat -vv + .PHONY: wheel wheel: PL_BACKEND=$(PL_BACKEND) python scripts/configure_pyproject_toml.py diff --git a/doc/conf.py b/doc/conf.py index b5e4c5bc18..25890ae756 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -21,6 +21,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("")) +sys.path.insert(0, os.path.abspath(".")) sys.path.insert(0, os.path.abspath("_ext")) sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath("doc")), "doc")) @@ -189,6 +190,8 @@ def __getattr__(cls, name): # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +nbsphinx_execute = "never" + # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. show_authors = True diff --git a/doc/requirements.txt b/doc/requirements.txt index 94b2a1df82..07f3a33b9c 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,5 @@ +tomlkit +build breathe docutils==0.16 exhale>=0.3.3 diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 212f402ce0..64b949e092 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.39.0-dev18" +__version__ = "0.39.0-dev19"