diff --git a/Dockerfile b/Dockerfile index 418b53f25..c83ecb780 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Base OS FROM ubuntu:24.04 AS qsim-base diff --git a/WORKSPACE b/WORKSPACE index 4b91c549d..a8a435fa1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( diff --git a/apps/BUILD b/apps/BUILD index 9e12ad913..804afad08 100644 --- a/apps/BUILD +++ b/apps/BUILD @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # TODO: remove reliance on getopt (unistd.h) to allow apps to run on Windows. cc_binary( diff --git a/circuits/BUILD b/circuits/BUILD index f7b69bb46..e1907e58e 100644 --- a/circuits/BUILD +++ b/circuits/BUILD @@ -1,5 +1,19 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + exports_files([ "circuit_q24", "circuit_q30", "circuit_q40", -]) \ No newline at end of file +]) diff --git a/docker-compose.yml b/docker-compose.yml index 0cffe39ae..4801581fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + services: qsim-base-image: image: qsim-base diff --git a/docs/_book.yaml b/docs/_book.yaml index 05c862b3d..2e045ddea 100644 --- a/docs/_book.yaml +++ b/docs/_book.yaml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + upper_tabs: # Dropdown menu - name: "Software" @@ -65,5 +79,3 @@ upper_tabs: - include: /reference/cc/qsim/_doxygen.yaml - include: /_book/upper_tabs_right.yaml - - diff --git a/docs/tutorials/multinode/noise3.py b/docs/tutorials/multinode/noise3.py index f3abbdd52..a5617d2d5 100644 --- a/docs/tutorials/multinode/noise3.py +++ b/docs/tutorials/multinode/noise3.py @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import cirq, qsimcirq # Create a Bell state, |00) + |11) diff --git a/docs/tutorials/multinode/noiseless3.py b/docs/tutorials/multinode/noiseless3.py index f35dcb5c3..9f0e4d85b 100644 --- a/docs/tutorials/multinode/noiseless3.py +++ b/docs/tutorials/multinode/noiseless3.py @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import cirq, qsimcirq # Create a Bell state, |00) + |11) diff --git a/install/tests/Dockerfile b/install/tests/Dockerfile index 5e0ec5327..b3e510205 100644 --- a/install/tests/Dockerfile +++ b/install/tests/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Base OS FROM ubuntu:24.04 @@ -23,7 +37,7 @@ COPY ./ /qsim/ WORKDIR /qsim/ # Create venv to avoid collision between system packages and what we install. -RUN python3 -m venv --upgrade-deps /qsim/test_env +RUN python3 -m venv --upgrade-deps /qsim/test_env # Activate the venv. ENV PATH="/qsim/test_env/bin:$PATH" diff --git a/install/tests/docker-compose.yml b/install/tests/docker-compose.yml index 1a38b77f1..cf76827e3 100644 --- a/install/tests/docker-compose.yml +++ b/install/tests/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + services: # Verifies that installing from the `qsimcirq` PyPI package works correctly. # To ensure that users do not need to clone the qsim repository in order to diff --git a/jupyter/Dockerfile b/jupyter/Dockerfile index b058d8351..d9d599499 100644 --- a/jupyter/Dockerfile +++ b/jupyter/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Base OS FROM ubuntu:24.04 USER root diff --git a/lib/BUILD b/lib/BUILD index 64ffd0fc7..6462d301d 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library") package(default_visibility = ["//visibility:public"]) diff --git a/pybind_interface/Dockerfile b/pybind_interface/Dockerfile index d22ba9911..b606596b2 100644 --- a/pybind_interface/Dockerfile +++ b/pybind_interface/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Base OS FROM qsim-base AS qsim-py-tests diff --git a/pybind_interface/GetPybind11.cmake b/pybind_interface/GetPybind11.cmake index b2182b45d..dbd8d00c0 100644 --- a/pybind_interface/GetPybind11.cmake +++ b/pybind_interface/GetPybind11.cmake @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + include(FetchContent) set(MIN_PYBIND_VERSION "2.13.6") diff --git a/qsimcirq/__init__.py b/qsimcirq/__init__.py index d9c5504da..f290e723a 100644 --- a/qsimcirq/__init__.py +++ b/qsimcirq/__init__.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import importlib from qsimcirq import qsim_decide diff --git a/qsimcirq/_version.py b/qsimcirq/_version.py index 7090a5b13..9a704a02d 100644 --- a/qsimcirq/_version.py +++ b/qsimcirq/_version.py @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """The version number defined here is read automatically in setup.py.""" __version__ = "0.23.0.dev0" diff --git a/qsimcirq_tests/__init__.py b/qsimcirq_tests/__init__.py index 7cebe92f2..c3541ec72 100644 --- a/qsimcirq_tests/__init__.py +++ b/qsimcirq_tests/__init__.py @@ -1 +1,15 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Root module of test package""" diff --git a/tests/BUILD b/tests/BUILD index 2d53d51a1..edf5be81f 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Options for testing different simulator types. avx_copts = ['-mavx2', '-mfma'] avx512_copts = ['-march=native'] diff --git a/tests/Dockerfile b/tests/Dockerfile index 2e37212c6..ad712c2dd 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Base OS FROM qsim-base AS qsim-cxx-tests diff --git a/third_party/cuquantum/BUILD.tpl b/third_party/cuquantum/BUILD.tpl index 1081bba8f..15aaa8cb9 100644 --- a/third_party/cuquantum/BUILD.tpl +++ b/third_party/cuquantum/BUILD.tpl @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + package(default_visibility = ["//visibility:public"]) cc_library( diff --git a/third_party/cuquantum/cuquantum_configure.bzl b/third_party/cuquantum/cuquantum_configure.bzl index 19feb5572..6864bd16c 100644 --- a/third_party/cuquantum/cuquantum_configure.bzl +++ b/third_party/cuquantum/cuquantum_configure.bzl @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Setup cuQuantum as external dependency""" _CUQUANTUM_ROOT = "CUQUANTUM_ROOT" @@ -175,7 +189,7 @@ def _symlink_genrule_for_dir( src_files = files.splitlines() command = [] outs = [] - + for i in range(len(dest_files)): if dest_files[i] != "": # If we have only one file to link we do not want to use the dest_dir, as @@ -234,7 +248,7 @@ def _cuquantum_pip_impl(repository_ctx): "%{CUQUANTUM_HEADER_GENRULE}": cuquantum_header_rule, "%{CUSTATEVEC_SHARED_LIBRARY_GENRULE}": custatevec_shared_library_rule, }) - + cuquantum_configure = repository_rule( implementation = _cuquantum_pip_impl,