Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge developments in preparation for release v0.4 #121

Merged
merged 59 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
cd9a18f
Simplify `Tensor` struct (#99)
mofeing Sep 26, 2023
4af4b94
Remove `length` method for `TensorNetwork`
mofeing Sep 19, 2023
be2e2e9
Format code
mofeing Sep 26, 2023
146838d
Refactor `TensorNetwork` to `@class`
mofeing Oct 4, 2023
6f32e3d
Fix refactor in `ChainRulesCore`,`FiniteDifferences` extensions
mofeing Oct 4, 2023
dc00471
Fix `ProjectTo` to `TensorNetwork`
mofeing Oct 4, 2023
b5b3317
Import `EinExprs.inds` symbol
mofeing Oct 5, 2023
eb5094a
Fix invalidation of `EinExprs.inds` symbol import
mofeing Oct 5, 2023
2c91f0e
Fix refactor on `Makie` extension
mofeing Oct 5, 2023
a941fcd
Fix `Classes` import in `Makie` extension
mofeing Oct 6, 2023
270be2b
Split functionality from `append!(::TensorNetwork)` to `merge!`
mofeing Oct 6, 2023
79027fd
Autoimplement `copy` for `TensorNetwork` subtypes
mofeing Oct 6, 2023
7b48e03
Fix `replace!(::TensorNetwork)` for list of `Pair`s
mofeing Oct 6, 2023
e26b1f0
Fix mutation on `merge(::TensorNetwork)`
mofeing Oct 6, 2023
4e8ea4b
Refactor `Quantum` TNs
mofeing Oct 6, 2023
dac1cb8
Refactor `TNSampler` to new OOP architecture
mofeing Oct 7, 2023
7bcc2f7
Refactor `MatrixProduct`
mofeing Oct 7, 2023
462a161
Refactor `Quac` extension
mofeing Oct 9, 2023
2057a14
Test changes for MPO
mofeing Oct 9, 2023
ebcab1a
Refactor `replace`
mofeing Oct 9, 2023
f28bcf4
Refactor things for which I'm too lazy to name
mofeing Oct 9, 2023
64ed193
Fix `normalize!`
mofeing Oct 9, 2023
b872801
Remove legacy code
mofeing Oct 9, 2023
4ea6ab9
Update `ChainRules` extensions
mofeing Oct 9, 2023
e2e9721
Fix `copy` on `TensorNetwork`
mofeing Oct 9, 2023
62cce3b
Fix `PEP` constructor
mofeing Oct 9, 2023
b090cfc
Implement trace methods for `QuantumTensorNetwork` #110
mofeing Oct 9, 2023
7be0448
Fix docs
mofeing Oct 9, 2023
d3e4c11
Enable `norm` test on `MPO`
mofeing Oct 10, 2023
6567aa9
Fix `tensors` type in `TensorNetwork` constructor
mofeing Oct 10, 2023
86f3a05
Relax `Vector{Tensor}` conversion on `TensorNetwork` constructor
mofeing Oct 10, 2023
ecdc993
Update `contract` docstring
mofeing Oct 10, 2023
f1ae973
Trigger CI workflow on `develop` branch
mofeing Oct 10, 2023
41e4e7a
Remove legacy `Generate sysimage` workflow
mofeing Oct 10, 2023
d4d0f78
Merge pull request #103 from bsc-quantic/refactor/oop
arturgs Oct 25, 2023
43cf7c9
Fix type-unstability in `ImmutableVector`
mofeing Oct 16, 2023
4697c96
Set `develop` branch as "dev" branch for documentation
mofeing Oct 25, 2023
3891c62
Remove all references to `Infinite` trait (#111)
mofeing Oct 26, 2023
e7e5fae
Clean code
mofeing Oct 24, 2023
2089a76
Enhance `qr` function with `mode` argument (#114)
jofrevalles Oct 31, 2023
135b5ea
Format code (#119)
github-actions[bot] Nov 1, 2023
6057944
Remove `Quantum` TN code
mofeing Nov 3, 2023
28f0c32
Remove legacy QASM file
mofeing Nov 3, 2023
3424964
Remove `Classes` dependency
mofeing Nov 4, 2023
4322b45
Refactor `TensorNetwork` internals to incidence matrix representation…
mofeing Nov 10, 2023
1a23cd2
Fix "Inconsistent `node_attr` behavior for invisible "ghost" nodes in…
mofeing Nov 11, 2023
1524e56
Test `Makie.plot!` with node attrs
mofeing Nov 11, 2023
f2387db
Fix color type of ghost nodes in `Makie` code
mofeing Nov 11, 2023
005d8a4
Fix node color for ghost nodes in `Makie.plot`
mofeing Nov 11, 2023
5b3e11b
Refactor `select` method and add `getindex` function
mofeing Nov 11, 2023
c8669df
Refactor circle point calculation in
mofeing Nov 11, 2023
13742fb
Merge branch 'master' into develop
mofeing Nov 12, 2023
dd9b6d3
Add `lu` decomposition for `Tensor`s (#94)
jofrevalles Nov 13, 2023
aad0fe6
Format code
mofeing Nov 13, 2023
97ac71d
Add note of quantum code moving to Qrochet
mofeing Nov 13, 2023
6b29aaf
Remove checkboxes from feature list
mofeing Nov 13, 2023
069f118
Reorganize README
mofeing Nov 13, 2023
48f7dde
Set compat version of stdlibs
mofeing Nov 13, 2023
6ed272b
Remove unused bibliographic references
mofeing Nov 13, 2023
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
Prev Previous commit
Next Next commit
Format code (#119)
Co-authored-by: mofeing <[email protected]>
github-actions[bot] and mofeing authored Nov 1, 2023
commit 135b5eaaa5935995f8142ff1270a8c2263bfefe8
2 changes: 1 addition & 1 deletion ext/TenetChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
@@ -68,4 +68,4 @@ function ChainRulesCore.rrule(T::Type{<:absclass(TensorNetwork)}, tensors)
T(tensors), TensorNetwork_pullback
end

end
end
2 changes: 1 addition & 1 deletion ext/TenetChainRulesTestUtilsExt.jl
Original file line number Diff line number Diff line change
@@ -10,4 +10,4 @@ function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, x::T) where {T<:absc
return Tangent{T}(tensors = [ProjectTo(tensor)(rand_tangent.(Ref(rng), tensor)) for tensor in tensors(x)])
end

end
end
2 changes: 1 addition & 1 deletion ext/TenetFiniteDifferencesExt.jl
Original file line number Diff line number Diff line change
@@ -22,4 +22,4 @@ function FiniteDifferences.to_vec(x::T) where {T<:absclass(TensorNetwork)}
return x_vec, TensorNetwork_from_vec
end

end
end
8 changes: 7 additions & 1 deletion src/Numerics.jl
Original file line number Diff line number Diff line change
@@ -121,15 +121,21 @@ LinearAlgebra.qr(t::Tensor{<:Any,2}; kwargs...) = Base.@invoke qr(t::Tensor; lef

"""
LinearAlgebra.qr(t::Tensor, mode::Symbol = :reduced; left_inds = (), right_inds = (), virtualind::Symbol = Symbol(uuid4()), kwargs...

Perform QR factorization on a tensor.

# Arguments

- `t::Tensor`: tensor to be factorized

# Keyword Arguments

- `left_inds`: left indices to be used in the QR factorization. Defaults to all indices of `t` except `right_inds`.
- `right_inds`: right indices to be used in the QR factorization. Defaults to all indices of `t` except `left_inds`.
- `virtualind`: name of the virtual bond. Defaults to a random `Symbol`.
"""
function LinearAlgebra.qr(t::Tensor; left_inds = (), right_inds = (), virtualind::Symbol = Symbol(uuid4()), kwargs...) isdisjoint(left_inds, right_inds) ||
function LinearAlgebra.qr(t::Tensor; left_inds = (), right_inds = (), virtualind::Symbol = Symbol(uuid4()), kwargs...)
isdisjoint(left_inds, right_inds) ||
throw(ArgumentError("left ($left_inds) and right $(right_inds) indices must be disjoint"))

left_inds, right_inds =
2 changes: 1 addition & 1 deletion src/Quantum/Quantum.jl
Original file line number Diff line number Diff line change
@@ -255,4 +255,4 @@ Base.getproperty(obj::QTNSampler, name::Symbol) = name === :config ? getfield(ob
Base.get(obj::QTNSampler, name, default) = get(obj.config, name, default)

Base.rand(A::Type{<:Ansatz}; kwargs...) = rand(Random.default_rng(), A; kwargs...)
Base.rand(rng::AbstractRNG, A::Type{<:Ansatz}; kwargs...) = rand(rng, QTNSampler{A}(; kwargs...))
Base.rand(rng::AbstractRNG, A::Type{<:Ansatz}; kwargs...) = rand(rng, QTNSampler{A}(; kwargs...))