Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 5 additions & 30 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,26 @@
name: Tests
name: CI

on:
push:
branches:
- 'master'
- 'main'
- 'release-'
tags: '*'
paths-ignore:
- 'docs/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel intermediate builds: only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
tests:
name: "Tests"
strategy:
fail-fast: false
matrix:
version:
- 'lts' # minimal supported version
- '1'
group:
- bp
- types
- ctmrg
- boundarymps
- gradients
- examples
- utility
- bondenv
- timeevol
- toolbox
os:
- ubuntu-latest
- macOS-latest
- windows-latest
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/Tests.yml@main"
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/TestGroups.yml@main"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
os: "${{ matrix.os }}"
fast: "${{ github.event.pull_request.draft == true }}"
timeout-minutes: 120
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

19 changes: 3 additions & 16 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PEPSKit"
uuid = "52969e89-939e-4361-9b68-9bc7cde4bdeb"
authors = ["Paul Brehmer", "Lander Burgelman", "Zhengyuan Yue", "Lukas Devos <ldevos98@gmail.com>"]
version = "0.7.0"
authors = ["Paul Brehmer", "Lander Burgelman", "Zhengyuan Yue", "Lukas Devos <ldevos98@gmail.com>"]

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand All @@ -28,11 +28,8 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
[compat]
Accessors = "0.1"
ChainRulesCore = "1.0"
ChainRulesTestUtils = "1.13"
SafeTestsets = "0.1"
Compat = "3.46, 4.2"
DocStringExtensions = "0.9.3"
FiniteDifferences = "0.12"
KrylovKit = "0.9.5, 0.10"
LinearAlgebra = "1"
LoggingExtras = "1"
Expand All @@ -42,23 +39,13 @@ MatrixAlgebraKit = "0.6.5"
OhMyThreads = "0.7, 0.8"
OptimKit = "0.4"
Printf = "1"
QuadGK = "2.11.1"
Random = "1"
Statistics = "1"
TensorKit = "0.16.2"
TensorOperations = "5"
TestExtras = "0.3"
VectorInterface = "0.4, 0.5"
Zygote = "0.6, 0.7"
julia = "1.10"

[extras]
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"

[targets]
test = ["Test", "TestExtras", "SafeTestsets", "ChainRulesTestUtils", "FiniteDifferences", "QuadGK"]
[workspace]
projects = ["test", "docs"]
32 changes: 32 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name = "PEPSKitTests"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MatrixAlgebraKit = "6c742aac-3347-4629-af66-fc926824e5e4"
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502"
MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab"
OptimKit = "77e91f04-9b3b-57a6-a776-40b61faaebe0"
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
PEPSKit = "52969e89-939e-4361-9b68-9bc7cde4bdeb"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ChainRulesTestUtils = "1.13"
FiniteDifferences = "0.12"
ParallelTestRunner = "2.6.0"
QuadGK = "2.11.1"
Test = "1"
TestExtras = "0.3"

[sources]
PEPSKit = {path = ".."}
1 change: 0 additions & 1 deletion test/ctmrg/contractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ using Test
using Random
using PEPSKit
using TensorKit
using TensorOperations: tensorcontract

using PEPSKit: eachcoordinate, _next_coordinate
using PEPSKit: EnlargedCorner, HalfInfiniteEnv, FullInfiniteEnv
Expand Down
165 changes: 9 additions & 156 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,159 +1,12 @@
using SafeTestsets
using ParallelTestRunner
using PEPSKit

# check if user supplied args
pat = r"(?:--group=)(\w+)"
arg_id = findfirst(contains(pat), ARGS)
const GROUP = if isnothing(arg_id)
uppercase(get(ENV, "GROUP", "ALL"))
else
uppercase(only(match(pat, ARGS[arg_id]).captures))
end
# --fast to indicate a smaller set of tests
args = parse_args(ARGS; custom = ["fast"])
fast = !isnothing(args.custom["fast"])

@time begin
if GROUP == "ALL" || GROUP == "TYPES"
@time @safetestset "InfiniteSquareNetwork" begin
include("types/infinitesquarenetwork.jl")
end
@time @safetestset "InfinitePartitionFunction" begin
include("types/infinitepartitionfunction.jl")
end
@time @safetestset "SUWeight" begin
include("types/suweight.jl")
end
@time @safetestset "LocalOperator" begin
include("types/localoperator.jl")
end
@time @safetestset "LocalCircuit" begin
include("types/localcircuit.jl")
end
end
if GROUP == "ALL" || GROUP == "CTMRG"
@time @safetestset "Gauge Fixing" begin
include("ctmrg/gaugefix.jl")
end
@time @safetestset "Unit cell" begin
include("ctmrg/unitcell.jl")
end
@time @safetestset ":fixed CTMRG iteration scheme" begin
include("ctmrg/fixed_iterscheme.jl")
end
@time @safetestset "SUWeight conversion" begin
include("ctmrg/suweight.jl")
end
@time @safetestset "Flavors" begin
include("ctmrg/flavors.jl")
end
@time @safetestset "Jacobian real linearity" begin
include("ctmrg/jacobian_real_linear.jl")
end
@time @safetestset "Partition function" begin
include("ctmrg/partition_function.jl")
end
@time @safetestset "PEPO" begin
include("ctmrg/pepo.jl")
end
@time @safetestset "correlation length" begin
include("ctmrg/correlation_length.jl")
end
@time @safetestset "Contractions" begin
include("ctmrg/contractions.jl")
end
end
if GROUP == "ALL" || GROUP == "BP"
@time @safetestset "Unit cell bond matching" begin
include("bp/unitcell.jl")
end
@time @safetestset "Expectation values" begin
include("bp/expvals.jl")
end
@time @safetestset "Rotation of BPEnv" begin
include("bp/rotation.jl")
end
@time @safetestset "Gauge-fixing iPEPS" begin
include("bp/gaugefix.jl")
end
end
if GROUP == "ALL" || GROUP == "GRADIENTS"
@time @safetestset "CTMRG gradients" begin
include("gradients/ctmrg_gradients.jl")
end
@time @safetestset "C4v CTMRG gradients" begin
include("gradients/c4v_ctmrg_gradients.jl")
end
end
if GROUP == "ALL" || GROUP == "BOUNDARYMPS"
@time @safetestset "VUMPS" begin
include("boundarymps/vumps.jl")
end
end
if GROUP == "ALL" || GROUP == "BONDENV"
@time @safetestset "Iterative optimization after truncation" begin
include("bondenv/bond_truncate.jl")
end
@time @safetestset "Gauge fixing" begin
include("bondenv/benv_gaugefix.jl")
end
@time @safetestset "Full update bond environment" begin
include("bondenv/benv_ctm.jl")
end
end
if GROUP == "ALL" || GROUP == "TIMEEVOL"
@time @safetestset "`timestep` function" begin
include("timeevol/timestep.jl")
end
@time @safetestset "Cluster truncation with projectors" begin
include("timeevol/cluster_projectors.jl")
end
@time @safetestset "Fixed-space and site-dependent truncation" begin
include("timeevol/sitedep_truncation.jl")
end
@time @safetestset "Transverse field Ising model at finite temperature" begin
include("timeevol/tf_ising_finiteT.jl")
end
@time @safetestset "J1-J2 model at finite temperature" begin
include("timeevol/j1j2_finiteT.jl")
end
end
if GROUP == "ALL" || GROUP == "TOOLBOX"
@time @safetestset "Density matrix from double-layer PEPO" begin
include("toolbox/densitymatrices.jl")
end
end
if GROUP == "ALL" || GROUP == "UTILITY"
@time @safetestset "Eigh wrapper" begin
include("utility/eigh_wrapper.jl")
end
@time @safetestset "SVD wrapper" begin
include("utility/svd_wrapper.jl")
end
@time @safetestset "Symmetrization" begin
include("utility/symmetrization.jl")
end
@time @safetestset "Differentiable tmap" begin
include("utility/diff_maps.jl")
end
@time @safetestset "Norm-preserving retractions" begin
include("utility/retractions.jl")
end
@time @safetestset "Correlators" begin
include("utility/correlator.jl")
end
end
if GROUP == "ALL" || GROUP == "EXAMPLES"
@time @safetestset "Transverse field Ising model" begin
include("examples/tf_ising.jl")
end
@time @safetestset "Heisenberg model" begin
include("examples/heisenberg.jl")
end
@time @safetestset "J1-J2 model" begin
include("examples/j1j2_model.jl")
end
@time @safetestset "P-wave superconductor" begin
include("examples/pwave.jl")
end
@time @safetestset "U1-symmetric Bose-Hubbard model" begin
include("examples/bose_hubbard.jl")
end
end
const init_code = quote
const fast_tests = $fast
end

ParallelTestRunner.runtests(PEPSKit, args; init_code)
Loading
Loading