From 12853830316bff2475f6c9d2f2d2d843fb3e01a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 3 Jul 2024 19:21:45 +0200 Subject: [PATCH 1/2] fix `eps` types --- src/linear_algebra_ext.jl | 4 ++-- src/mps/canonise.jl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/linear_algebra_ext.jl b/src/linear_algebra_ext.jl index 9055125..32c629d 100644 --- a/src/linear_algebra_ext.jl +++ b/src/linear_algebra_ext.jl @@ -26,7 +26,7 @@ end function qr_fact( M::AbstractMatrix{T}, Dcut::Int = typemax(Int), - tol::T = eps(); + tol::T = eps(T); toGPU::Bool = true, kwargs..., ) where {T<:Real} @@ -44,7 +44,7 @@ end function rq_fact( M::AbstractMatrix{T}, Dcut::Int = typemax(Int), - tol::T = eps(); + tol::T = eps(T); toGPU::Bool = true, kwargs..., ) where {T<:Real} diff --git a/src/mps/canonise.jl b/src/mps/canonise.jl index bba1734..178d903 100644 --- a/src/mps/canonise.jl +++ b/src/mps/canonise.jl @@ -28,7 +28,7 @@ function truncate!( ψ::QMps{T}, s::Symbol, Dcut::Int = typemax(Int), - tolS::T = eps(); + tolS::T = eps(T); kwargs..., ) where {T<:Real} @assert s ∈ (:left, :right) @@ -46,12 +46,12 @@ canonise!(ψ::QMps, ::Val{:right}) = _left_sweep!(ψ, typemax(Int)) canonise!(ψ::QMps, ::Val{:left}) = _right_sweep!(ψ, typemax(Int)) function canonise_truncate!( - ψ::QMps, + ψ::QMps{T}, type::Symbol, Dcut::Int = typemax(Int), - tolS = eps(); + tolS::T = eps(T); kwargs..., -) +) where {T<:Real} if type == :right _left_sweep!(ψ, Dcut, tolS; kwargs...) elseif type == :left From 2dff9dc0e8e27f9067884b2422d42785511f306c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Wed, 3 Jul 2024 19:21:50 +0200 Subject: [PATCH 2/2] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 65ff91c..30f8a11 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SpinGlassTensors" uuid = "7584fc6a-5a23-4eeb-8277-827aab0146ea" authors = ["Anna Maria Dziubyna ", "Tomasz Śmierzchalski ", "Bartłomiej Gardas ", "Konrad Jałowiecki ", "Łukasz Pawela ", "Marek M. Rams "] -version = "1.1.1" +version = "1.1.2" [deps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"