Skip to content

Commit

Permalink
small update and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Jun 4, 2024
1 parent 1f96764 commit a5dc61c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TensorKit"
uuid = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
authors = ["Jutho Haegeman"]
version = "0.12.3"
version = "0.12.4"

[deps]
HalfIntegers = "f0d1745a-41c9-11e9-1dd9-e5d34d218721"
Expand Down
16 changes: 1 addition & 15 deletions src/tensors/indexmanipulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,25 +229,11 @@ end
twist!(t::AbstractTensorMap, i::Int; inv::Bool=false) -> t
twist!(t::AbstractTensorMap, is; inv::Bool=false) -> t
Apply a twist to the `i`th index of `t`, storing the result in `t`.
Apply a twist to the `i`th index of `t`, or all indices in `is`, storing the result in `t`.
If `inv=true`, use the inverse twist.
See [`twist`](@ref) for creating a new tensor.
"""
function twist!(t::AbstractTensorMap, i::Int; inv::Bool=false)
if i > numind(t)
msg = "Can't twist index $i of a tensor with only $(numind(t)) indices."
throw(ArgumentError(msg))
end
BraidingStyle(sectortype(t)) == Bosonic() && return t
N₁ = numout(t)
for (f₁, f₂) in fusiontrees(t)
θ = i <= N₁ ? twist(f₁.uncoupled[i]) : twist(f₂.uncoupled[i - N₁])
inv &&= θ')
rmul!(t[f₁, f₂], θ)
end
return t
end
function twist!(t::AbstractTensorMap, is; inv::Bool=false)
if !all(in(allind(t)), is)
msg = "Can't twist indices $is of a tensor with only $(numind(t)) indices."
Expand Down

2 comments on commit a5dc61c

@Jutho
Copy link
Owner Author

@Jutho Jutho commented on a5dc61c Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/108293

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.4 -m "<description of version>" a5dc61cd002a8bfb59e7de62732a4962f2e18255
git push origin v0.12.4

Please sign in to comment.