From d952fd00773464286e4c292d2b6d024f9f2c8c49 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Sat, 16 Dec 2023 16:37:41 -0500 Subject: [PATCH] compat downgrade and spelling (#27) --- .github/workflows/downgrade.yml | 26 ++++++++++++++++++++++++++ .github/workflows/spelling.yml | 15 +++++++++++++++ .typos.toml | 2 ++ CHANGELOG.md | 4 ++++ Project.toml | 16 ++++++++-------- docs/src/index.md | 2 +- src/QSymbolicsBase/QSymbolicsBase.jl | 2 +- 7 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/downgrade.yml create mode 100644 .github/workflows/spelling.yml create mode 100644 .typos.toml diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml new file mode 100644 index 0000000..6dfc237 --- /dev/null +++ b/.github/workflows/downgrade.yml @@ -0,0 +1,26 @@ +name: Downgrade +on: + pull_request: + branches: [master, main] + paths-ignore: + - 'docs/**' + push: + branches: [master, main] + paths-ignore: + - 'docs/**' +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + version: ['1.9'] + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + - uses: cjdoris/julia-downgrade-compat-action@v1 + with: + skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 \ No newline at end of file diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 0000000..d9ee073 --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,15 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master + with: + config: .typos.toml \ No newline at end of file diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..7364886 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +ket = "ket" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c8ff4a..3ecfc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # News +## v0.2.6 - 2023-12-16 + +- Bumping compat bounds of multiple dependencies and checking minimal compats in CI + ## v0.2.5 - 2023-11-28 - Improvements to testing and documentation support. diff --git a/Project.toml b/Project.toml index bc197ba..f1b2737 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "QuantumSymbolics" uuid = "efa7fd63-0460-4890-beb7-be1bbdfbaeae" authors = ["QuantumSymbolics.jl contributors"] -version = "0.2.5" +version = "0.2.6" [deps] Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" @@ -23,14 +23,14 @@ QuantumCliffordExt = "QuantumClifford" QuantumOpticsExt = "QuantumOpticsBase" [compat] -Graphs = "1.7.3" +Graphs = "1.9" Latexify = "0.15, 0.16" LinearAlgebra = "1.9" -PrecompileTools = "1" -QuantumClifford = "0.8.14" -QuantumInterface = "0.3.0" -QuantumOpticsBase = "0.4.0" -SymbolicUtils = "1" -Symbolics = "5" +PrecompileTools = "1.2" +QuantumClifford = "0.8.19" +QuantumInterface = "0.3.3" +QuantumOpticsBase = "0.4.19" +SymbolicUtils = "1.5" +Symbolics = "5.13" TermInterface = "0.3" julia = "1.9" diff --git a/docs/src/index.md b/docs/src/index.md index 46585fc..2ce5bd4 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -202,4 +202,4 @@ express(MixedState(X1)/2+SProjector(Z1)/2, CliffordRepr()) !!! warning "Stabilizer state expressions" - The state writen as $\frac{|Z₁⟩⊗|Z₁⟩+|Z₂⟩⊗|Z₂⟩}{√2}$ is a well known stabilizer state, namely a Bell state. However, automatically expressing it as a stabilizer is a prohibitively expensive computational operation in general. We do not perform that computation automatically. If you want to ensure that states you define can be automatically converted to tableaux for Clifford simulations, avoid using sumation of kets. On the other hand, in all of our Clifford Monte-Carlo simulations, `⊗` is fully supported, as well as [`SProjector`](@ref), [`MixedState`](@ref), [`StabilizerState`](@ref), and sumation of density matrices. + The state written as $\frac{|Z₁⟩⊗|Z₁⟩+|Z₂⟩⊗|Z₂⟩}{√2}$ is a well known stabilizer state, namely a Bell state. However, automatically expressing it as a stabilizer is a prohibitively expensive computational operation in general. We do not perform that computation automatically. If you want to ensure that states you define can be automatically converted to tableaux for Clifford simulations, avoid using sumation of kets. On the other hand, in all of our Clifford Monte-Carlo simulations, `⊗` is fully supported, as well as [`SProjector`](@ref), [`MixedState`](@ref), [`StabilizerState`](@ref), and sumation of density matrices. diff --git a/src/QSymbolicsBase/QSymbolicsBase.jl b/src/QSymbolicsBase/QSymbolicsBase.jl index 5100907..e1f352c 100644 --- a/src/QSymbolicsBase/QSymbolicsBase.jl +++ b/src/QSymbolicsBase/QSymbolicsBase.jl @@ -98,7 +98,7 @@ function withmetadata(strct) # TODO this should really use MacroTools instead of if declaring_line.head == :where declaring_line = declaring_line.args[1] end - append!(declaring_line.args, args) # Adding them to the line declaring the constructor, i.e. adding them at the location of ? in `Constrcutor(?) = new(...)` + append!(declaring_line.args, args) # Adding them to the line declaring the constructor, i.e. adding them at the location of ? in `Constructor(?) = new(...)` new_call_args = constructor.args[end].args[end].args # The ? in `new(?)` append!(new_call_args, args) # Adding them to the `new` call push!(new_call_args, :(Metadata()))