Skip to content

Commit

Permalink
cleanup (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov authored Jun 19, 2024
1 parent 2362ef9 commit e6aef01
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
version:
- '1'
- '1.9'
- '1.10'
os:
- ubuntu-latest
threads:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1.9']
version: ['1.10']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand All @@ -24,6 +24,7 @@ jobs:
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra,Statistics,Printf,Combinatorics,Random,PrecompileTools
strict: false
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# News

## v0.4.2 - dev

- Bump QuantumSymbolics compat bound and bump julia compat to 1.10.

## v0.4.1 - 2024-06-05

- Significant improvements to the performance of `query`.
Expand Down
9 changes: 4 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "QuantumSavory"
uuid = "2de2e421-972c-4cb5-a0c3-999c85908079"
authors = ["Stefan Krastanov <[email protected]>"]
version = "0.4.1"
version = "0.4.2-dev"

[deps]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Expand All @@ -14,7 +14,6 @@ GraphsMatching = "c3af3a8c-b79e-4b01-bf44-c718d7e0e0d6"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down Expand Up @@ -53,11 +52,11 @@ Printf = "1"
QuantumClifford = "0.8.20, 0.9"
QuantumInterface = "0.3.4"
QuantumOptics = "1.0.5"
QuantumOpticsBase = "0.4.18"
QuantumSymbolics = "0.2.5"
QuantumOpticsBase = "0.4.22"
QuantumSymbolics = "0.3"
Random = "1"
Reexport = "1.2.2"
ResumableFunctions = "0.6.9"
Statistics = "1"
SumTypes = "0.5.5"
julia = "1.9"
julia = "1.10"
10 changes: 7 additions & 3 deletions src/QuantumSavory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ using Reexport

using DocStringExtensions
using IterTools
using LinearAlgebra
import LinearAlgebra
using LinearAlgebra: tr, mul!, eigvecs, norm, normalize, dot
import Random
using Random: randperm
using Graphs
import ConcurrentSim
Expand All @@ -19,8 +21,9 @@ using ConcurrentSim: Environment, Simulation, Store, DelayQueue, Resource,
request, release, now, active_process, timeout, put, get
using ResumableFunctions
using Printf
using SumTypes: @sum_type, isvariant, @cases
import SumTypes
using SumTypes: @sum_type, isvariant, @cases
import Combinatorics
using Combinatorics: powerset

import QuantumInterface: basis, tensor, , apply!, traceout!, nsubsystems,
Expand All @@ -29,14 +32,15 @@ import QuantumInterface: basis, tensor, ⊗, apply!, traceout!, nsubsystems,
export apply!, traceout!, removebackref!, nsubsystems
export project_traceout! #TODO should move to QuantumInterface

@reexport using QuantumSymbolics
using QuantumSymbolics:
AbstractRepresentation, AbstractUse,
CliffordRepr, QuantumOpticsRepr, QuantumMCRepr,
metadata, istree, operation, arguments, Symbolic, # from Symbolics
HGate, XGate, YGate, ZGate, CPHASEGate, CNOTGate,
XBasisState, YBasisState, ZBasisState,
STensorOperator, SScaledOperator, SAddOperator
using QuantumSymbolics: I # to avoid ambiguity with LinearAlgebra.I
@reexport using QuantumSymbolics

export
StateRef, RegRef, Register,
Expand Down
6 changes: 3 additions & 3 deletions src/StatesZoo/StatesZoo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using QuantumSymbolics, QuantumOpticsBase
using QuantumSymbolics: withmetadata, @withmetadata, Metadata
import QuantumSymbolics: express_nolookup

using LinearAlgebra
import LinearAlgebra
import LinearAlgebra: tr

export SingleRailMidSwapBellW, SingleRailMidSwapBell, DualRailMidSwapBellW, DualRailMidSwapBell, ZALMSpinPairW, ZALMSpinPair, tr
Expand Down Expand Up @@ -52,9 +52,9 @@ const cascaded_source_basis = [0 0 0 0;
2 0 1 1;
2 0 2 0]


include("zalm_pair/zalm_pair.jl")
include("zalm_pair/ret_cxy.jl")
include("single_dual_rail_midswap/single_dual_rail_midswap.jl")

end # module
end # module
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Expand All @@ -32,3 +33,4 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ThreadTools = "dbf13d8f-d36e-4350-8970-f3a99faba1a8"
WignerSymbols = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b"
12 changes: 1 addition & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,4 @@ get(ENV,"QUANTUMSAVORY_PLOT_TEST","")=="true" && @doset "plotting_gl"
get(ENV,"QUANTUMSAVORY_PLOT_TEST","")=="true" && VERSION >= v"1.9" && @doset "doctests"

get(ENV,"JET_TEST","")=="true" && @doset "jet"

using Aqua
using QuantumClifford, QuantumOptics, Graphs
doset("aqua") && begin
Aqua.test_all(QuantumSavory,
ambiguities=false,
stale_deps=false, # TODO due to the package extensions being misidentified
piracies=false # TODO due to code that needs to be upstreamed
)
#Aqua.test_ambiguities([QuantumSavory,Core]) # otherwise Base causes false positives
end
@doset "aqua"
8 changes: 8 additions & 0 deletions test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Aqua
using QuantumSavory

Aqua.test_all(QuantumSavory,
ambiguities=(;broken=true),
piracies=(;broken=true),
stale_deps=(;ignore=[:NetworkLayout]) # needed by package extension but not a condition of its loading
)
3 changes: 3 additions & 0 deletions test/test_jet.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Test
using QuantumSavory, JET
using DiffEqBase, Graphs, JumpProcesses, Makie, ResumableFunctions, ConcurrentSim, QuantumOptics, QuantumOpticsBase, QuantumClifford, Symbolics, WignerSymbols

Expand Down Expand Up @@ -34,5 +35,7 @@ rep = report_package("QuantumSavory";
AnyFrameModule(WignerSymbols),
))

@show length(JET.get_reports(rep))
@show rep
@test length(JET.get_reports(rep)) <= 129
@test_broken length(JET.get_reports(rep)) == 0

0 comments on commit e6aef01

Please sign in to comment.