From 3513f216dc18197fd7b4cd2c2162a853e7325069 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 2 Aug 2026 03:58:29 +0000 Subject: [PATCH 1/3] Add copyright and license headers --- .github/workflows/nightly.yaml | 14 ++++++++++++++ .github/workflows/ossf-scorecard.yaml | 14 ++++++++++++++ .github/workflows/pr.yaml | 14 ++++++++++++++ check/all | 13 +++++++++++++ check/autogenerate-notebooks | 13 +++++++++++++ check/experimental-rsqualtran | 13 +++++++++++++ check/format-incremental | 13 +++++++++++++ check/mypy | 13 +++++++++++++ check/mypy-dev-tools | 13 +++++++++++++ check/pytest | 13 +++++++++++++ check/pytest-and-incremental-coverage | 13 +++++++++++++ check/pytest-changed-files | 13 +++++++++++++ ...pytest-changed-files-and-incremental-coverage | 13 +++++++++++++ check/pytest-dev-tools | 13 +++++++++++++ check/pytest-full | 13 +++++++++++++ check/pytest-minimal-install | 14 ++++++++++++++ check/pytest-quick | 13 +++++++++++++ check/ruff | 13 +++++++++++++ dev_tools/pyproject.toml | 14 ++++++++++++++ docs/_static/fixes.css | 16 ++++++++++++++++ experimental/rsqualtran/Cargo.toml | 14 ++++++++++++++ experimental/rsqualtran/build.rs | 14 ++++++++++++++ .../rsqualtran/example_qlts/fastsim_cswap.sh | 14 ++++++++++++++ .../example_qlts/fastsim_negate_large.sh | 14 ++++++++++++++ .../rsqualtran/example_qlts/fastsim_product.sh | 14 ++++++++++++++ experimental/rsqualtran/pyproject.toml | 14 ++++++++++++++ experimental/rsqualtran/src/bin/qlt_fastsim.rs | 14 ++++++++++++++ experimental/rsqualtran/src/fastsim/compiler.rs | 14 ++++++++++++++ .../rsqualtran/src/fastsim/decompiler.rs | 14 ++++++++++++++ experimental/rsqualtran/src/fastsim/gates.rs | 14 ++++++++++++++ experimental/rsqualtran/src/fastsim/mod.rs | 14 ++++++++++++++ experimental/rsqualtran/src/fastsim/vm.rs | 14 ++++++++++++++ experimental/rsqualtran/src/lib.rs | 14 ++++++++++++++ experimental/rsqualtran/src/nodes.rs | 14 ++++++++++++++ experimental/rsqualtran/src/parser.rs | 14 ++++++++++++++ experimental/rsqualtran/src/python.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/bigint_tests.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/cli_tests.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/compiler_tests.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/gates_tests.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/parser_tests.rs | 14 ++++++++++++++ experimental/rsqualtran/tests/vm_tests.rs | 14 ++++++++++++++ .../bloqs/chemistry/hubbard_model/__init__.py | 14 ++++++++++++++ 43 files changed, 590 insertions(+) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 2b27aea35e..633b50d3dd 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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. + # 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 diff --git a/.github/workflows/ossf-scorecard.yaml b/.github/workflows/ossf-scorecard.yaml index 2caefebb37..172327be22 100644 --- a/.github/workflows/ossf-scorecard.yaml +++ b/.github/workflows/ossf-scorecard.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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. + # Summary: workflow for OSSF Scorecard (https://github.com/ossf/scorecard). # # Scorecard is an automated tool that assesses a number of important heuristics diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 72f130e9d2..6a5d092ee9 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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. + # 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 diff --git a/check/all b/check/all index 2c34837317..eea902a905 100755 --- a/check/all +++ b/check/all @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs repository checks: format-incremental, ruff, mypy, and pytest-quick. diff --git a/check/autogenerate-notebooks b/check/autogenerate-notebooks index 705aebe4f4..595335311c 100755 --- a/check/autogenerate-notebooks +++ b/check/autogenerate-notebooks @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Autogenerates the notebooks and reports whether there were any changes. diff --git a/check/experimental-rsqualtran b/check/experimental-rsqualtran index f6f7d64ff0..09ff0692b7 100755 --- a/check/experimental-rsqualtran +++ b/check/experimental-rsqualtran @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs Rust (cargo test) and Python (pytest) tests for experimental/rsqualtran. diff --git a/check/format-incremental b/check/format-incremental index 4f5a2003ce..f9100024bb 100755 --- a/check/format-incremental +++ b/check/format-incremental @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Formats python files that have been modified. diff --git a/check/mypy b/check/mypy index 8caee421c0..b4a75c1fa8 100755 --- a/check/mypy +++ b/check/mypy @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs mypy on the repository using a preconfigured mypy.ini file. diff --git a/check/mypy-dev-tools b/check/mypy-dev-tools index 5c1b17e909..3bc9d0568f 100755 --- a/check/mypy-dev-tools +++ b/check/mypy-dev-tools @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs mypy on the dev_tools/ folder using a preconfigured mypy.ini file. diff --git a/check/pytest b/check/pytest index 046fa1c60a..d84a85e1a6 100755 --- a/check/pytest +++ b/check/pytest @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs pytest on the repository. diff --git a/check/pytest-and-incremental-coverage b/check/pytest-and-incremental-coverage index 03928b9c85..67f1378dbc 100755 --- a/check/pytest-and-incremental-coverage +++ b/check/pytest-and-incremental-coverage @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Finds changed uncovered lines. diff --git a/check/pytest-changed-files b/check/pytest-changed-files index 7ed2e1deac..6721ad2c32 100755 --- a/check/pytest-changed-files +++ b/check/pytest-changed-files @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs pytest on files that have been modified. diff --git a/check/pytest-changed-files-and-incremental-coverage b/check/pytest-changed-files-and-incremental-coverage index ae9d6fafcf..5f6a72b197 100755 --- a/check/pytest-changed-files-and-incremental-coverage +++ b/check/pytest-changed-files-and-incremental-coverage @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Finds changed lines not covered by tests related to changed files. diff --git a/check/pytest-dev-tools b/check/pytest-dev-tools index c3d1ac296f..4293c72c52 100755 --- a/check/pytest-dev-tools +++ b/check/pytest-dev-tools @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs pytest on the dev_tools/ folder. diff --git a/check/pytest-full b/check/pytest-full index 4812ffb07c..d40a67e450 100755 --- a/check/pytest-full +++ b/check/pytest-full @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs the full pytest suite on the repository. diff --git a/check/pytest-minimal-install b/check/pytest-minimal-install index 528c056da5..ab34631504 100755 --- a/check/pytest-minimal-install +++ b/check/pytest-minimal-install @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. + # Run pytest on qualtran, verifying that only minimal dependencies are present. # # This script runs tests for the entire qualtran package, excluding directories diff --git a/check/pytest-quick b/check/pytest-quick index 2f7981a56d..1ee150bbbb 100755 --- a/check/pytest-quick +++ b/check/pytest-quick @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs the quick pytest suite on the repository. diff --git a/check/ruff b/check/ruff index abbd3d6727..e225b42d57 100755 --- a/check/ruff +++ b/check/ruff @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. ################################################################################ # Runs ruff on the repository using the configuration in pyproject.toml. diff --git a/dev_tools/pyproject.toml b/dev_tools/pyproject.toml index 9b8964ff97..ee1e8b32ba 100644 --- a/dev_tools/pyproject.toml +++ b/dev_tools/pyproject.toml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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. + [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" diff --git a/docs/_static/fixes.css b/docs/_static/fixes.css index f6c29fa560..87d9494028 100644 --- a/docs/_static/fixes.css +++ b/docs/_static/fixes.css @@ -1,3 +1,19 @@ +/** + * Copyright 2026 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 + * + * http://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. + */ + /* Args etc tables - increase width so it isn't centered in the middle of the page diff --git a/experimental/rsqualtran/Cargo.toml b/experimental/rsqualtran/Cargo.toml index d828a47d21..ad0c67d9b6 100644 --- a/experimental/rsqualtran/Cargo.toml +++ b/experimental/rsqualtran/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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] name = "rsqualtran" version = "0.1.0" diff --git a/experimental/rsqualtran/build.rs b/experimental/rsqualtran/build.rs index 38f2a3aff3..a43a1478ad 100644 --- a/experimental/rsqualtran/build.rs +++ b/experimental/rsqualtran/build.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + fn main() { if std::env::var("CARGO_FEATURE_PY").is_ok() { pyo3_build_config::add_extension_module_link_args(); diff --git a/experimental/rsqualtran/example_qlts/fastsim_cswap.sh b/experimental/rsqualtran/example_qlts/fastsim_cswap.sh index be121968ce..befead7e1f 100755 --- a/experimental/rsqualtran/example_qlts/fastsim_cswap.sh +++ b/experimental/rsqualtran/example_qlts/fastsim_cswap.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. + # Run qlt_fastsim of cswap.qlt with the test inputs from cswap.in.txt. # # CSwap is a simple routine that swaps two QAny(5) registers depending diff --git a/experimental/rsqualtran/example_qlts/fastsim_negate_large.sh b/experimental/rsqualtran/example_qlts/fastsim_negate_large.sh index 89e59ac52f..0a116d3593 100755 --- a/experimental/rsqualtran/example_qlts/fastsim_negate_large.sh +++ b/experimental/rsqualtran/example_qlts/fastsim_negate_large.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. + # Run qlt_fastsim of negate-large.qlt on the sample 2048-bit integer. # # This demonstrates large bitsize handling. You can inspect the result: diff --git a/experimental/rsqualtran/example_qlts/fastsim_product.sh b/experimental/rsqualtran/example_qlts/fastsim_product.sh index bd313c0fc2..b9f4329bcb 100755 --- a/experimental/rsqualtran/example_qlts/fastsim_product.sh +++ b/experimental/rsqualtran/example_qlts/fastsim_product.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright 2026 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 +# +# http://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. + # Run qlt_fastsim of product.qlt on sample inputs and check against the reference file. # # This does a simple diff of stdout to compare vs reference, which might not be great for diff --git a/experimental/rsqualtran/pyproject.toml b/experimental/rsqualtran/pyproject.toml index f0dd034798..3e0332c231 100644 --- a/experimental/rsqualtran/pyproject.toml +++ b/experimental/rsqualtran/pyproject.toml @@ -1,3 +1,17 @@ +# Copyright 2026 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 +# +# http://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. + [project] name = "rsqualtran" requires-python = ">=3.12" diff --git a/experimental/rsqualtran/src/bin/qlt_fastsim.rs b/experimental/rsqualtran/src/bin/qlt_fastsim.rs index 39a2a31ac4..77d11b0c3d 100644 --- a/experimental/rsqualtran/src/bin/qlt_fastsim.rs +++ b/experimental/rsqualtran/src/bin/qlt_fastsim.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! CLI binary for the qlt_fastsim quantum simulator. //! //! Usage: qlt_fastsim [--timing|--no-timing] diff --git a/experimental/rsqualtran/src/fastsim/compiler.rs b/experimental/rsqualtran/src/fastsim/compiler.rs index 37ab4fd95a..9407654510 100644 --- a/experimental/rsqualtran/src/fastsim/compiler.rs +++ b/experimental/rsqualtran/src/fastsim/compiler.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Compiler: translates an [`L1Module`] AST into a [`CompiledModule`] for the VM. //! //! The output is a dense `Vec` indexed by subroutine ID (`sub_id`). diff --git a/experimental/rsqualtran/src/fastsim/decompiler.rs b/experimental/rsqualtran/src/fastsim/decompiler.rs index 6b79d759bc..a92dd11780 100644 --- a/experimental/rsqualtran/src/fastsim/decompiler.rs +++ b/experimental/rsqualtran/src/fastsim/decompiler.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Decompiler: translates a [`CompiledModule`] into a human-readable text-based assembly. //! //! Intended for debugging purposes only. diff --git a/experimental/rsqualtran/src/fastsim/gates.rs b/experimental/rsqualtran/src/fastsim/gates.rs index 273c6b0e5f..abe4af3b7f 100644 --- a/experimental/rsqualtran/src/fastsim/gates.rs +++ b/experimental/rsqualtran/src/fastsim/gates.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Built-in gate implementations for the qlt_fastsim simulator. //! //! Each gate operates on a `SimState` (bit vector + phase exponent) given specific bit indices. diff --git a/experimental/rsqualtran/src/fastsim/mod.rs b/experimental/rsqualtran/src/fastsim/mod.rs index d64bcec474..42f5d4a4b1 100644 --- a/experimental/rsqualtran/src/fastsim/mod.rs +++ b/experimental/rsqualtran/src/fastsim/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! qlt_fastsim: A bytecode compiler and VM executor for simulating //! quantum programs in the Qualtran IR (.qlt) format on classical basis-state inputs. //! diff --git a/experimental/rsqualtran/src/fastsim/vm.rs b/experimental/rsqualtran/src/fastsim/vm.rs index 8e1fe116e1..782d9c2f23 100644 --- a/experimental/rsqualtran/src/fastsim/vm.rs +++ b/experimental/rsqualtran/src/fastsim/vm.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! VM executor: interprets compiled subroutines on a simulation state. //! //! The VM maintains a bit vector + phase exponent, and uses call frames with diff --git a/experimental/rsqualtran/src/lib.rs b/experimental/rsqualtran/src/lib.rs index 8501b036ac..854570f480 100644 --- a/experimental/rsqualtran/src/lib.rs +++ b/experimental/rsqualtran/src/lib.rs @@ -1,4 +1,18 @@ #![allow(dead_code)] +// Copyright 2026 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 +// +// http://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. + #![allow(unused_variables)] pub mod fastsim; diff --git a/experimental/rsqualtran/src/nodes.rs b/experimental/rsqualtran/src/nodes.rs index 79d6021a45..7e27ca220c 100644 --- a/experimental/rsqualtran/src/nodes.rs +++ b/experimental/rsqualtran/src/nodes.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + #[cfg(feature = "py")] use pyo3::prelude::*; #[cfg(feature = "wasm")] diff --git a/experimental/rsqualtran/src/parser.rs b/experimental/rsqualtran/src/parser.rs index fc48f10538..dfd419414f 100644 --- a/experimental/rsqualtran/src/parser.rs +++ b/experimental/rsqualtran/src/parser.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + use crate::nodes::{ AliasAssignmentNode, CArgNode, CObjectNode, CValueNode, L1Module, LiteralNode, LiteralVal, NestedQArgValue, QArgNode, QArgValueNode, QCallNode, QCastNode, QDTypeNode, QDefExternNode, diff --git a/experimental/rsqualtran/src/python.rs b/experimental/rsqualtran/src/python.rs index aed83889df..278e0543e4 100644 --- a/experimental/rsqualtran/src/python.rs +++ b/experimental/rsqualtran/src/python.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + use pyo3::exceptions::PyValueError; use pyo3::prelude::*; diff --git a/experimental/rsqualtran/tests/bigint_tests.rs b/experimental/rsqualtran/tests/bigint_tests.rs index dbf07c49fc..ce5c3ba471 100644 --- a/experimental/rsqualtran/tests/bigint_tests.rs +++ b/experimental/rsqualtran/tests/bigint_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Tests for big-integer and bit conversion functions. //! //! Covers roundtrips, consistency between u64/i64 and string-based paths, diff --git a/experimental/rsqualtran/tests/cli_tests.rs b/experimental/rsqualtran/tests/cli_tests.rs index 495254ae95..32ed8f4e98 100644 --- a/experimental/rsqualtran/tests/cli_tests.rs +++ b/experimental/rsqualtran/tests/cli_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! CLI integration tests for the qlt_fastsim binary. //! //! Tests batch execution, output formatting, error reporting, diff --git a/experimental/rsqualtran/tests/compiler_tests.rs b/experimental/rsqualtran/tests/compiler_tests.rs index 5f95504b0c..389615b73c 100644 --- a/experimental/rsqualtran/tests/compiler_tests.rs +++ b/experimental/rsqualtran/tests/compiler_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Compiler output verification tests. //! //! Tests that the compiler produces correct subroutine structures, register diff --git a/experimental/rsqualtran/tests/gates_tests.rs b/experimental/rsqualtran/tests/gates_tests.rs index 3d2dc55b7d..ba9cb122e8 100644 --- a/experimental/rsqualtran/tests/gates_tests.rs +++ b/experimental/rsqualtran/tests/gates_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Direct gate operation tests. //! //! Verifies correctness of individual quantum gates: X, CNOT, Z, S, T, diff --git a/experimental/rsqualtran/tests/parser_tests.rs b/experimental/rsqualtran/tests/parser_tests.rs index a1089ee46b..a9dcba6425 100644 --- a/experimental/rsqualtran/tests/parser_tests.rs +++ b/experimental/rsqualtran/tests/parser_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! Integration tests for the QLT parser. //! //! Verifies that example .qlt files parse without errors and produce diff --git a/experimental/rsqualtran/tests/vm_tests.rs b/experimental/rsqualtran/tests/vm_tests.rs index a57d31122d..885e3eec92 100644 --- a/experimental/rsqualtran/tests/vm_tests.rs +++ b/experimental/rsqualtran/tests/vm_tests.rs @@ -1,3 +1,17 @@ +// Copyright 2026 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 +// +// http://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. + //! VM executor integration tests. //! //! Tests the full parse → compile → execute pipeline for negate and cswap, diff --git a/qualtran/bloqs/chemistry/hubbard_model/__init__.py b/qualtran/bloqs/chemistry/hubbard_model/__init__.py index e69de29bb2..9f71a2dc3c 100644 --- a/qualtran/bloqs/chemistry/hubbard_model/__init__.py +++ b/qualtran/bloqs/chemistry/hubbard_model/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2026 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 +# +# http://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. + From 2b80b5dbdd844011f9b041e770418edf3c82af29 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 2 Aug 2026 03:59:22 +0000 Subject: [PATCH 2/3] Apply format-incremental --- qualtran/bloqs/chemistry/hubbard_model/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/qualtran/bloqs/chemistry/hubbard_model/__init__.py b/qualtran/bloqs/chemistry/hubbard_model/__init__.py index 9f71a2dc3c..58d482ea38 100644 --- a/qualtran/bloqs/chemistry/hubbard_model/__init__.py +++ b/qualtran/bloqs/chemistry/hubbard_model/__init__.py @@ -11,4 +11,3 @@ # 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. - From 6b45cab5724f676d539f32290f179353c6d8c6e2 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 2 Aug 2026 04:07:04 +0000 Subject: [PATCH 3/3] Don't change this workflow. --- .github/workflows/ossf-scorecard.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/ossf-scorecard.yaml b/.github/workflows/ossf-scorecard.yaml index 172327be22..2caefebb37 100644 --- a/.github/workflows/ossf-scorecard.yaml +++ b/.github/workflows/ossf-scorecard.yaml @@ -1,17 +1,3 @@ -# Copyright 2026 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 -# -# http://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. - # Summary: workflow for OSSF Scorecard (https://github.com/ossf/scorecard). # # Scorecard is an automated tool that assesses a number of important heuristics