From 2938e27df9f78a24bd36d72d2c8ab56886c74676 Mon Sep 17 00:00:00 2001 From: Akira Kyle Date: Tue, 12 Nov 2024 13:13:49 -0700 Subject: [PATCH] Bump compat for Symbolics to 6 and fix maketerm arguments --- Project.toml | 2 +- src/QSymbolicsBase/QSymbolicsBase.jl | 2 +- src/QSymbolicsBase/basic_ops_inhomogeneous.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index fd0be53..0b09c39 100644 --- a/Project.toml +++ b/Project.toml @@ -31,6 +31,6 @@ QuantumClifford = "0.8.19, 0.9" QuantumInterface = "0.3.3" QuantumOpticsBase = "0.4.22, 0.5" SymbolicUtils = "2.0.2, 3" -Symbolics = "5.30.3" +Symbolics = "5.30.3, 6" TermInterface = "0.4, 0.5, 1, 2" julia = "1.10" diff --git a/src/QSymbolicsBase/QSymbolicsBase.jl b/src/QSymbolicsBase/QSymbolicsBase.jl index d707c49..955a40d 100644 --- a/src/QSymbolicsBase/QSymbolicsBase.jl +++ b/src/QSymbolicsBase/QSymbolicsBase.jl @@ -99,7 +99,7 @@ Base.:(-)(x::SymQObj) = (-1)*x Base.:(-)(x::SymQObj,y::SymQObj) = x + (-y) Base.hash(x::SymQObj, h::UInt) = isexpr(x) ? hash((head(x), arguments(x)), h) : hash((typeof(x),symbollabel(x),basis(x)), h) -maketerm(::Type{<:SymQObj}, f, a, t, m) = f(a...) +maketerm(::Type{<:SymQObj}, f, a, m) = f(a...) function Base.isequal(x::X,y::Y) where {X<:SymQObj, Y<:SymQObj} if X==Y diff --git a/src/QSymbolicsBase/basic_ops_inhomogeneous.jl b/src/QSymbolicsBase/basic_ops_inhomogeneous.jl index 7cc77f9..4b5989d 100644 --- a/src/QSymbolicsBase/basic_ops_inhomogeneous.jl +++ b/src/QSymbolicsBase/basic_ops_inhomogeneous.jl @@ -100,7 +100,7 @@ Base.:(*)(b::Symbolic{AbstractBra}, k::SZeroKet) = 0 Base.:(*)(b::SZeroBra, k::SZeroKet) = 0 Base.show(io::IO, x::SBraKet) = begin print(io,x.bra); print(io,x.ket) end Base.hash(x::SBraKet, h::UInt) = hash((head(x), arguments(x)), h) -maketerm(::Type{SBraKet}, f, a, t, m) = f(a...) +maketerm(::Type{SBraKet}, f, a, m) = f(a...) Base.isequal(x::SBraKet, y::SBraKet) = isequal(x.bra, y.bra) && isequal(x.ket, y.ket) """Symbolic outer product of a ket and a bra.