From 8a5aa31515631dcf71d25ac510ec63bc65b23efc Mon Sep 17 00:00:00 2001 From: Akira Kyle Date: Wed, 27 Nov 2024 16:42:35 -0700 Subject: [PATCH] Remove multiplicable --- src/bases.jl | 32 -------------------------------- src/linalg.jl | 1 - 2 files changed, 33 deletions(-) diff --git a/src/bases.jl b/src/bases.jl index f502b69..d5d27bb 100644 --- a/src/bases.jl +++ b/src/bases.jl @@ -221,38 +221,6 @@ function check_samebases(b) end end - -""" - multiplicable(a, b) - -Check if two objects are multiplicable. -""" -multiplicable(b1::Basis, b2::Basis) = b1==b2 - -function multiplicable(b1::CompositeBasis, b2::CompositeBasis) - if !equal_shape(b1.shape,b2.shape) - return false - end - for i=1:length(b1.shape) - if !multiplicable(b1.bases[i], b2.bases[i]) - return false - end - end - return true -end - -""" - check_multiplicable(a, b) - -Throw an [`IncompatibleBases`](@ref) error if the objects are -not multiplicable. -""" -function check_multiplicable(b1, b2) - if BASES_CHECK[] && !multiplicable(b1, b2) - throw(IncompatibleBases()) - end -end - """ reduced(a, indices) diff --git a/src/linalg.jl b/src/linalg.jl index 11d1f53..6888cc3 100644 --- a/src/linalg.jl +++ b/src/linalg.jl @@ -7,7 +7,6 @@ check_samebases(a::AbstractSuperOperator) = check_samebases(fullbasis(a))::Bool check_samebases(a::AbstractOperator, b::AbstractOperator) = check_samebases(fullbasis(a), fullbasis(b))::Bool check_samebases(a::AbstractSuperOperator, b::AbstractSuperOperator) = check_samebases(fullbasis(a), fullbasis(b))::Bool -multiplicable(a::AbstractOperator, b::AbstractOperator) = multiplicable(fullbasis(a).right, fullbasis(b).left) dagger(a::AbstractOperator) = arithmetic_unary_error("Hermitian conjugate", a) transpose(a::AbstractOperator) = arithmetic_unary_error("Transpose", a) directsum(a::AbstractOperator...) = reduce(directsum, a)