Skip to content

chore: add Apache 2.0 license, CLA, and SPDX header tooling - #84

Merged
Roger-luo merged 1 commit into
mainfrom
chore/license-and-cla
May 18, 2026
Merged

Roger-luo merged 1 commit into
mainfrom
chore/license-and-cla

Conversation

@Roger-luo

Copy link
Copy Markdown
Collaborator

Summary

  • Adopt Apache License 2.0 for the project (was previously unlicensed); add LICENSE and NOTICE.
  • Add CLA.md, an Individual CLA adapted from the Apache ICLA v2.2, so contributors grant explicit copyright + patent licenses and the project retains the right to relicense.
  • Wire up CLA Assistant Lite (contributor-assistant/github-action) — signatures stored in .github/cla-signatures.json in this repo, not on a third-party server.
  • Wire up hawkeye for per-file SPDX header enforcement: local prek hook + CI workflow, with the tool itself managed by mise (github:korandoru/hawkeye).
  • Backfill SPDX-FileCopyrightText / SPDX-License-Identifier headers across all in-scope sources (crates/**/*.rs, ppvm-python/src/**/*.py) — 156 files.
  • Update README and the docs-site footer (docs/src/layouts/Base.astro) to reflect Apache 2.0 instead of "MIT-style".

Test plan

  • Verify mise exec -- hawkeye check passes locally on this branch (passed in pre-commit).
  • Verify the new License headers CI job passes on this PR.
  • Verify the CLA Assistant workflow runs and posts the sign-CLA comment on this PR (since I haven't signed yet on this repo).
  • After merge, in Settings → Branches → main, add CLA Assistant / CLAAssistant and License headers / hawkeye check as required status checks.
  • Sanity-check the docs-site footer in a local npx astro dev run.

🤖 Generated with Claude Code

Adds Apache License 2.0 (with NOTICE), an Apache-ICLA-derived CLA, and
wires up CLA Assistant Lite plus a hawkeye-based SPDX header check so
contributor IP and per-file provenance are explicit going forward. Also
backfills SPDX-FileCopyrightText / SPDX-License-Identifier headers
across crates/**/*.rs and ppvm-python/src/**/*.py.

- LICENSE, NOTICE: Apache-2.0, (c) 2026 QuEra Computing Inc.
- CLA.md: Individual CLA adapted from Apache ICLA v2.2
- .github/workflows/cla.yml: contributor-assistant/github-action,
  signatures stored in .github/cla-signatures.json
- licenserc.toml + licenserc.header.txt: hawkeye config and template
- .github/workflows/license-headers.yml: CI hawkeye check
- prek.toml: local hawkeye check hook
- mise.toml: github:korandoru/hawkeye for reproducible tool install
- README.md, docs Base.astro footer: reflect Apache 2.0
- All in-scope source files: SPDX header backfill (156 files)
Copilot AI review requested due to automatic review settings May 18, 2026 23:28
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://QuEraComputing.github.io/ppvm/pr-preview/pr-84/

Built to branch gh-pages at 2026-05-18 23:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR formalizes project licensing and contribution governance by adopting Apache-2.0, adding a CLA, and introducing automated enforcement for SPDX license headers (local pre-commit via prek + CI via GitHub Actions). It also backfills SPDX headers across Rust and Python sources and updates user-facing docs to reflect the new license.

Changes:

  • Add Apache-2.0 licensing artifacts (LICENSE, NOTICE) and update README/docs footer to reference Apache-2.0.
  • Add an Individual CLA (CLA.md) and a CLA Assistant workflow (.github/workflows/cla.yml).
  • Add hawkeye-based SPDX header enforcement in CI and local prek, plus hawkeye tool management via mise.toml and repo config (licenserc.*).

Reviewed changes

Copilot reviewed 167 out of 167 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Add License + Contributing sections referencing Apache-2.0 and CLA.
prek.toml Add local prek hook to run hawkeye check.
mise.toml Add hawkeye tool installation via mise.
licenserc.toml Add SPDX header policy config (includes/excludes + properties).
licenserc.header.txt Add SPDX header template text.
LICENSE Add Apache License 2.0 text.
NOTICE Add Apache NOTICE file.
CLA.md Add Individual CLA document.
.github/workflows/license-headers.yml Add CI job running hawkeye header checks.
.github/workflows/cla.yml Add CLA Assistant workflow configuration.
docs/src/layouts/Base.astro Update footer text to Apache License 2.0.
ppvm-python/src/ppvm/init.py Add SPDX headers.
ppvm-python/src/ppvm/generalized_tableau.py Add SPDX headers.
ppvm-python/src/ppvm/mixins.py Add SPDX headers.
ppvm-python/src/ppvm/paulisum.py Add SPDX headers.
ppvm-python/src/ppvm/types.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/init.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/_interp.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/device.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/qubit.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/impls/init.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/impls/gate.py Add SPDX headers.
ppvm-python/src/ppvm/squin_interpreter/impls/noise.py Add SPDX headers.
crates/stim-parser/src/lib.rs Add SPDX headers.
crates/stim-parser/src/ast.rs Add SPDX headers.
crates/stim-parser/src/display.rs Add SPDX headers.
crates/stim-parser/src/extended/ast.rs Add SPDX headers.
crates/stim-parser/src/extended/interpret.rs Add SPDX headers.
crates/stim-parser/src/extended/mod.rs Add SPDX headers.
crates/stim-parser/src/extended/parser.rs Add SPDX headers.
crates/stim-parser/src/grammar.rs Add SPDX headers.
crates/stim-parser/src/line_map.rs Add SPDX headers.
crates/stim-parser/src/parser.rs Add SPDX headers.
crates/stim-parser/src/table.rs Add SPDX headers.
crates/stim-parser/tests/errors.rs Add SPDX headers.
crates/stim-parser/tests/extended.rs Add SPDX headers.
crates/stim-parser/tests/gates.rs Add SPDX headers.
crates/stim-parser/tests/measure.rs Add SPDX headers.
crates/stim-parser/tests/noise.rs Add SPDX headers.
crates/stim-parser/tests/proptest_ast.rs Add SPDX headers.
crates/stim-parser/tests/proptest_parse.rs Add SPDX headers.
crates/stim-parser/tests/proptest_roundtrip.rs Add SPDX headers.
crates/stim-parser/tests/roundtrip.rs Add SPDX headers.
crates/stim-parser/tests/syntax.rs Add SPDX headers.
crates/stim-parser/tests/tags.rs Add SPDX headers.
crates/ppvm-tableau/src/lib.rs Add SPDX headers.
crates/ppvm-tableau/src/data.rs Add SPDX headers.
crates/ppvm-tableau/src/display.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/clifford.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/mod.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/reset.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/rot1.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/rot2.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/tgate.rs Add SPDX headers.
crates/ppvm-tableau/src/gates/u3.rs Add SPDX headers.
crates/ppvm-tableau/src/measure.rs Add SPDX headers.
crates/ppvm-tableau/src/noise.rs Add SPDX headers.
crates/ppvm-tableau/src/sparsevec.rs Add SPDX headers.
crates/ppvm-tableau/src/tableau_index.rs Add SPDX headers.
crates/ppvm-tableau/src/tableau_like.rs Add SPDX headers.
crates/ppvm-tableau/tests/gates.rs Add SPDX headers.
crates/ppvm-tableau/tests/measure.rs Add SPDX headers.
crates/ppvm-tableau/tests/msd_batch.rs Add SPDX headers.
crates/ppvm-tableau/tests/tableau.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_breakdown.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_combined.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_measure.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_msd.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_rayon.rs Add SPDX headers.
crates/ppvm-tableau/examples/profile_scaling.rs Add SPDX headers.
crates/ppvm-tableau/benches/micro.rs Add SPDX headers.
crates/ppvm-tableau/benches/measure-scaling.rs Add SPDX headers.
crates/ppvm-tableau/benches/tableau.rs Add SPDX headers.
crates/ppvm-tableau/benches/tableau-msd.rs Add SPDX headers.
crates/ppvm-tableau/benches/tableau-msd-fused.rs Add SPDX headers.
crates/ppvm-sym/src/lib.rs Add SPDX headers.
crates/ppvm-sym/src/add.rs Add SPDX headers.
crates/ppvm-sym/src/coeff.rs Add SPDX headers.
crates/ppvm-sym/src/display.rs Add SPDX headers.
crates/ppvm-sym/src/eval.rs Add SPDX headers.
crates/ppvm-sym/src/mul.rs Add SPDX headers.
crates/ppvm-sym/src/term.rs Add SPDX headers.
crates/ppvm-stim/src/lib.rs Add SPDX headers.
crates/ppvm-stim/src/executor.rs Add SPDX headers.
crates/ppvm-stim/src/prepare.rs Add SPDX headers.
crates/ppvm-stim/tests/executor.rs Add SPDX headers.
crates/ppvm-stim/tests/prepare.rs Add SPDX headers.
crates/ppvm-stim/tests/run.rs Add SPDX headers.
crates/ppvm-stim/tests/stim_corpus.rs Add SPDX headers.
crates/ppvm-stim/benches/tableau-msd-stim.rs Add SPDX headers.
crates/ppvm-runtime/src/lib.rs Add SPDX headers.
crates/ppvm-runtime/src/char.rs Add SPDX headers.
crates/ppvm-runtime/src/config/dashmap.rs Add SPDX headers.
crates/ppvm-runtime/src/config/fx64hash.rs Add SPDX headers.
crates/ppvm-runtime/src/config/fxhash.rs Add SPDX headers.
crates/ppvm-runtime/src/config/gxhash.rs Add SPDX headers.
crates/ppvm-runtime/src/config/indexmap.rs Add SPDX headers.
crates/ppvm-runtime/src/config/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/loss/clifford.rs Add SPDX headers.
crates/ppvm-runtime/src/loss/data.rs Add SPDX headers.
crates/ppvm-runtime/src/loss/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/loss/trace.rs Add SPDX headers.
crates/ppvm-runtime/src/map/dashmap.rs Add SPDX headers.
crates/ppvm-runtime/src/map/hashmap.rs Add SPDX headers.
crates/ppvm-runtime/src/map/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/contains.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/data.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/display.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/enumerate.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/from.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/parse.rs Add SPDX headers.
crates/ppvm-runtime/src/pattern/trace.rs Add SPDX headers.
crates/ppvm-runtime/src/phase/clifford.rs Add SPDX headers.
crates/ppvm-runtime/src/phase/data.rs Add SPDX headers.
crates/ppvm-runtime/src/phase/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/phase/mul.rs Add SPDX headers.
crates/ppvm-runtime/src/strategy.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/approx.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/clifford.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/data.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/display.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/noise.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/ops.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/proj.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/rot1.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/rot2.rs Add SPDX headers.
crates/ppvm-runtime/src/sum/trace.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/crx.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/proj.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/rot1.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/rot2.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/tgate.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/branch/u3.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/clifford.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/coefficient.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/map.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/measure.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/noise.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/ptm.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/reset.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/storage.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/strategy.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/trace.rs Add SPDX headers.
crates/ppvm-runtime/src/traits/word_trait.rs Add SPDX headers.
crates/ppvm-runtime/src/word/clifford.rs Add SPDX headers.
crates/ppvm-runtime/src/word/data.rs Add SPDX headers.
crates/ppvm-runtime/src/word/mod.rs Add SPDX headers.
crates/ppvm-runtime/src/word/mul.rs Add SPDX headers.
crates/ppvm-runtime/src/word/trace.rs Add SPDX headers.
crates/ppvm-runtime/tests/cnot.rs Add SPDX headers.
crates/ppvm-runtime/tests/ghz.rs Add SPDX headers.
crates/ppvm-runtime/tests/loss.rs Add SPDX headers.
crates/ppvm-runtime/tests/noise.rs Add SPDX headers.
crates/ppvm-runtime/tests/strategy.rs Add SPDX headers.
crates/ppvm-runtime/benches/gate.rs Add SPDX headers.
crates/ppvm-runtime/benches/micro.rs Add SPDX headers.
crates/ppvm-runtime/benches/random-circuit.rs Add SPDX headers.
crates/ppvm-runtime/benches/trotter.rs Add SPDX headers.
crates/ppvm-runtime/benches/trotter-scaling.rs Add SPDX headers.
crates/ppvm-python-native/src/interface.rs Add SPDX headers.
crates/ppvm-python-native/src/interface_tableau.rs Add SPDX headers.
crates/ppvm-python-native/src/lib.rs Add SPDX headers.
crates/ppvm-python-native/src/stim_program.rs Add SPDX headers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread prek.toml
Comment on lines +72 to +82
# License headers: hawkeye (Rust-based SPDX header checker)
# Install once with: cargo install hawkeye (or: cargo binstall hawkeye)
# Run `hawkeye format` manually to apply headers to new files.
[[repos]]
repo = "local"
[[repos.hooks]]
id = "hawkeye"
name = "hawkeye license header check"
language = "system"
entry = "hawkeye check"
pass_filenames = false
Comment thread CLA.md
Comment on lines +11 to +12
your commits as described in the "How to accept this Agreement" section
below, or by signing electronically when prompted on a pull request.
Comment thread .github/workflows/cla.yml
Comment on lines +3 to +8
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

Comment thread .github/workflows/cla.yml
types: [opened, closed, synchronize]

permissions:
actions: write
Comment thread .github/workflows/cla.yml
Comment on lines +24 to +27
with:
path-to-signatures: '.github/cla-signatures.json'
path-to-document: 'https://github.com/QuEraComputing/ppvm/blob/main/CLA.md'
branch: 'main'
@Roger-luo
Roger-luo merged commit f7128a3 into main May 18, 2026
13 checks passed
@Roger-luo
Roger-luo deleted the chore/license-and-cla branch May 18, 2026 23:33
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants