Skip to content

Commit 6021c82

Browse files
committed
Add Aqua and fix some tests
1 parent 674a837 commit 6021c82

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

Project.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "MPSKit"
22
uuid = "bb1c41ca-d63c-52ed-829e-0820dda26502"
3-
authors = ["Maarten Van Damme", "Jutho Haegeman", "Lukas Devos", "Gertian Roose", "Markus Hauru", "Daan Maertens"]
3+
authors = "Lukas Devos, Maarten Van Damme and contributors"
44
version = "0.12.0"
55

66
[deps]
@@ -25,30 +25,38 @@ VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
2525

2626
[compat]
2727
Accessors = "0.1"
28+
Aqua = "0.8.9"
29+
BlockTensorKit = "0.1.1"
2830
FLoops = "0.1, 0.2"
2931
FastClosures = "0.3"
3032
FoldsThreads = "0.1"
3133
KrylovKit = "0.8.3"
3234
LinearAlgebra = "1.6"
3335
LoggingExtras = "~1.0"
3436
OptimKit = "0.3.1"
37+
Pkg = "1"
38+
Plots = "1.40"
3539
Preferences = "1"
3640
Printf = "1"
41+
Random = "1"
3742
RecipesBase = "1.1"
3843
TensorKit = "0.13"
3944
TensorKitManifolds = "0.7"
4045
TensorOperations = "5"
46+
Test = "1"
47+
TestExtras = "0.3"
4148
Transducers = "0.4"
4249
TupleTools = "1.6.0"
4350
VectorInterface = "0.2, 0.3, 0.4, 0.5"
4451
julia = "1.10"
4552

4653
[extras]
54+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
4755
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
4856
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
4957
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
5058
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5159
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
5260

5361
[targets]
54-
test = ["Pkg", "Test", "TestExtras", "Plots"]
62+
test = ["Aqua", "Pkg", "Test", "TestExtras", "Plots"]

src/MPSKit.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ export InfiniteMPS, FiniteMPS, WindowMPS, MPSMultiline
2222
export PeriodicArray, PeriodicVector, PeriodicMatrix, WindowArray
2323
export MPSTensor
2424
export QP, LeftGaugedQP, RightGaugedQP
25-
export leftorth,
26-
rightorth, leftorth!, rightorth!, poison!, uniform_leftorth, uniform_rightorth
2725
export r_LL, l_LL, r_RR, l_RR, r_RL, r_LR, l_RL, l_LR # should be properties
2826

2927
# useful utility functions?
@@ -49,8 +47,8 @@ export excitations, FiniteExcited, QuasiparticleAnsatz, ChepigaAnsatz, ChepigaAn
4947
export marek_gap, correlation_length, correlator
5048
export time_evolve, timestep!, timestep
5149
export TDVP, TDVP2, make_time_mpo, WI, WII, TaylorCluster
52-
export splitham, infinite_temperature, entanglement_spectrum, transfer_spectrum, variance
53-
export changebonds!, changebonds, VUMPSSvdCut, OptimalExpand, SvdCut, UnionTrunc, RandExpand
50+
export entanglement_spectrum, transfer_spectrum, variance
51+
export changebonds!, changebonds, VUMPSSvdCut, OptimalExpand, SvdCut, RandExpand
5452
export entropy
5553
export propagator, NaiveInvert, Jeckelmann, DynamicalDMRG
5654
export fidelity_susceptibility

src/algorithms/excitation/dmrgexcitation.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Variational optimization algorithm for excitations of finite Matrix Product Stat
1313
end
1414

1515
function excitations(H::FiniteMPOHamiltonian, alg::FiniteExcited,
16-
states::NTuple{N,T};
16+
states::FiniteMPS...;
1717
init=FiniteMPS([copy(first(states).AC[i])
1818
for i in 1:length(first(states))]),
19-
num=1) where {N,T<:FiniteMPS}
19+
num=1)
20+
T = eltype(states)
2021
num == 0 && return (scalartype(T)[], T[])
2122

2223
super_op = LinearCombination(tuple(H, ProjectionOperator.(states)...),

src/states/finitemps.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ struct FiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS
6161
B<:MPSBondTensor}
6262
return new{A,B}(ALs, ARs, ACs, CLs)
6363
end
64-
function FiniteMPS(ALs::Vector{Union{Missing,A}}, ARs::Vector{Union{Missing,A}},
65-
ACs::Vector{Union{Missing,A}},
66-
CLs::Vector{Union{Missing,B}}) where {A<:GenericMPSTensor,
67-
B<:MPSBondTensor}
64+
function FiniteMPS(ALs::Vector{A}, ARs::Vector{A},
65+
ACs::Vector{A},
66+
CLs::Vector{B}) where {A<:Union{Missing,GenericMPSTensor},
67+
B<:Union{Missing,MPSBondTensor}}
6868
length(ACs) == length(CLs) - 1 == length(ALs) == length(ARs) ||
6969
throw(DimensionMismatch("length mismatch of tensors"))
7070
sum(ismissing.(ACs)) + sum(ismissing.(CLs)) < length(ACs) + length(CLs) ||

test/other.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ using MPSKit
1111
using TensorKit
1212
using TensorKit:
1313
using Plots
14+
using Aqua
15+
16+
@testset "Aqua" begin
17+
Aqua.test_all(MPSKit; ambiguities=false, piracies=false)
18+
end
1419

1520
@testset "plot tests" begin
1621
ψ = InfiniteMPS([ℙ^2], [ℙ^5])

0 commit comments

Comments
 (0)