Skip to content

Commit

Permalink
Add message about ITensorMPS.jl to News in README
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed May 9, 2024
2 parents 7f291e2 + 36da003 commit d8f6420
Show file tree
Hide file tree
Showing 22 changed files with 101 additions and 152 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
3 changes: 2 additions & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CompatHelper
on:
schedule:
- cron: '00 00 * * *'
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
Expand All @@ -12,4 +12,5 @@ jobs:
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "NDTensors"])'
57 changes: 57 additions & 0 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: IntegrationTest
on:
push:
branches: [main]
tags: [v*]
pull_request:

jobs:
test:
name: ${{ matrix.package.repo }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: [1]
os: [ubuntu-latest]
package:
- {user: ITensor, repo: ITensorGaussianMPS.jl}
- {user: ITensor, repo: ITensorTDVP.jl}
- {user: ITensor, repo: ITensorUnicodePlots.jl}
- {user: ITensor, repo: ITensorVisualizationBase.jl}

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: x64
- uses: julia-actions/julia-buildpkg@latest
- name: Clone Downstream
uses: actions/checkout@v4
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
path: downstream
- name: Load this and run the downstream tests
shell: julia --color=yes --project=downstream {0}
run: |
using Pkg
try
# force it to use this PR's version of the package
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
Pkg.update()
Pkg.test(coverage=true) # resolver may fail with test time deps
catch err
err isa Pkg.Resolve.ResolverError || rethrow()
# If we can't resolve that means this is incompatible by SemVer and this is fine
# It means we marked this as a breaking change, so we don't need to worry about
# Mistakenly introducing a breaking change, as we have intentionally made one
@info "Not compatible with this release. No problem." exception=err
exit(0) # Exit immediately, as a success
end
## - uses: julia-actions/julia-processcoverage@v1
## - uses: codecov/codecov-action@v4
## with:
## token: ${{ secrets.CODECOV_TOKEN }}
## file: lcov.info
## fail_ci_if_error: true
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
register:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: julia-actions/RegisterAction@latest
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ on:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/comment_trigger_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v1
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: Set latest commit status as pending
uses: myrotvorets/set-commit-status-action@master
Expand All @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
- name: Checkout PR branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
Expand All @@ -41,7 +41,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
- name: Add comment to PR
uses: actions/github-script@v6
uses: actions/github-script@v7
if: always()
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
name: "Format Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1
- name: Install JuliaFormatter and format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
Expand All @@ -15,7 +15,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_suggestions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# MacOS not available on x86
- {os: 'macOS-latest', arch: 'x86'}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_itensormps_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# MacOS not available on x86
- {os: 'macOS-latest', arch: 'x86'}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_itensors_base_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# MacOS not available on x86
- {os: 'macOS-latest', arch: 'x86'}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/test_itensortdvp_ubuntu.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test_ndtensors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.5.8"
version = "0.6.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Development of ITensor is supported by the Flatiron Institute, a division of the

- May 9, 2024: A new package ITensorMPS.jl has been released. We plan to move all of the MPS/MPO code in ITensors.jl to ITensorMPS.jl. For now, ITensorMPS.jl just re-exports the MPS/MPO functionality of ITensors.jl (as well as of [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl)), such as `dmrg`, `siteinds`, `MPS`, `MPO`, etc. To prepare for the change over to ITensorMPS.jl, please change `using ITensors` to `using ITensors, ITensorMPS` in any code that makes use of MPS/MPO functionality, and if you are using ITensorTDVP.jl change `using ITensorTDVP` to `using ITensorMPS` in your code.

- May 8, 2024: ITensors.jl v0.6 has been released. This version deletes the experimental "combine-contract" contraction backend, which was enabled by `ITensors.enable_combine_contract()`. This feature enabled performing ITensor contractions by first combining indices and then performing contractions as matrix multiplications, which potentially could lead to speedups for certain contractions involving higher-order QN-conserving tensors. However, the speedups weren't consistent with the current implementation, and this feature will be incorporated into the library in a more systematic way when we release our new non-abelian symmetric tensor backend.

- May 2, 2024: ITensors.jl v0.5 has been released. This version removes PackageCompiler.jl as a dependency and moves the package compilation functionality into a package extension. In order to use the `ITensors.compile()` function going forward, you need to install the PackageCompiler.jl package with `using Pkg: Pkg; Pkg.add("PackageCompiler")` and put `using PackageCompiler` together with `using ITensors` in your code.

- April 16, 2024: ITensors.jl v0.4 has been released. This version removes HDF5.jl as a dependency and moves the HDF5 read and write functions for ITensor, MPS, MPO, and other associated types into a package extension. To enable ITensor HDF5 features, install the HDF5.jl package with `using Pkg: Pkg; Pkg.add("HDF5")` and put `using HDF5` together with `using ITensors` in your code. Other recent changes include support for multiple GPU backends using package extensions.
Expand Down
3 changes: 0 additions & 3 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

# global_variables.jl
@deprecate disable_combine_contract!() ITensors.disable_combine_contract()
@deprecate disable_tblis!() ITensors.disable_tblis()
@deprecate disable_warn_order!() ITensors.disable_warn_order()
@deprecate enable_combine_contract!() ITensors.enable_combine_contract()
@deprecate enable_tblis!() ITensors.enable_tblis()
@deprecate reset_warn_order!() ITensors.reset_warn_order()
@deprecate set_warn_order!(N) ITensors.set_warn_order(N)
@deprecate use_combine_contract() ITensors.using_combine_contract()
@deprecate use_debug_checks() ITensors.using_debug_checks()

# index.jl
Expand Down
18 changes: 0 additions & 18 deletions src/global_variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,6 @@ $(NDTensors.enable_threaded_blocksparse_docstring(@__MODULE__))
"""
disable_threaded_blocksparse() = NDTensors._disable_threaded_blocksparse()

#
# Turn enable or disable combining QN ITensors before contracting
#

const _using_combine_contract = Ref(false)

using_combine_contract() = _using_combine_contract[]

function enable_combine_contract()
_using_combine_contract[] = true
return nothing
end

function disable_combine_contract()
_using_combine_contract[] = false
return nothing
end

#
# Turn debug checks on and off
#
Expand Down
34 changes: 1 addition & 33 deletions src/tensor_operations/tensor_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,6 @@ function _contract(A::ITensor, B::ITensor)::ITensor
return C
end

_contract(T::ITensor, ::Nothing) = T

function can_combine_contract(A::ITensor, B::ITensor)::Bool
return hasqns(A) &&
hasqns(B) &&
!iscombiner(A) &&
!iscombiner(B) &&
!isdiag(A) &&
!isdiag(B)
end

function combine_contract(A::ITensor, B::ITensor)::ITensor
# Combine first before contracting
C::ITensor = if can_combine_contract(A, B)
uniqueindsA = uniqueinds(A, B)
uniqueindsB = uniqueinds(B, A)
commonindsAB = commoninds(A, B)
combinerA = isempty(uniqueindsA) ? nothing : combiner(uniqueindsA)
combinerB = isempty(uniqueindsB) ? nothing : combiner(uniqueindsB)
combinerAB = isempty(commonindsAB) ? nothing : combiner(commonindsAB)
AC = _contract(_contract(A, combinerA), combinerAB)
BC = _contract(_contract(B, combinerB), dag(combinerAB))
CC = _contract(AC, BC)
_contract(_contract(CC, dag(combinerA)), dag(combinerB))
else
_contract(A, B)
end
return C
end

"""
A::ITensor * B::ITensor
contract(A::ITensor, B::ITensor)
Expand Down Expand Up @@ -100,10 +70,8 @@ function contract(A::ITensor, B::ITensor)::ITensor
return iscombiner(A) ? _contract(A, B) : A[] * B
elseif NB == 0
return iscombiner(B) ? _contract(B, A) : B[] * A
else
C = using_combine_contract() ? combine_contract(A, B) : _contract(A, B)
return C
end
return _contract(A, B)
end

function optimal_contraction_sequence(A::Union{Vector{<:ITensor},Tuple{Vararg{ITensor}}})
Expand Down
Loading

0 comments on commit d8f6420

Please sign in to comment.