diff --git a/examples/spinless_fermion_pairing.jl b/examples/spinless_fermion_pairing.jl index a357e6e..b1d477c 100644 --- a/examples/spinless_fermion_pairing.jl +++ b/examples/spinless_fermion_pairing.jl @@ -48,7 +48,7 @@ let end H = ITensors.MPO(os_h + os_p, sites) - #Get Ground state + #Get Ground state @assert ishermitian(h) e = eigvals(Hermitian(h)) @show e diff --git a/src/gmera.jl b/src/gmera.jl index a28cf88..2a84663 100644 --- a/src/gmera.jl +++ b/src/gmera.jl @@ -54,7 +54,7 @@ function correlation_matrix_to_gmps_brickwall_tailed( return Λ, V, indsnext, relinds end -# shift givens rotation indexes according to the inds +# shift givens rotation indexes according to the inds function shiftByInds!(G::Circuit, inds::Vector{Int}) for (n, g) in enumerate(G.rotations) G.rotations[n] = Givens(inds[g.i1], inds[g.i2], g.c, g.s) diff --git a/src/gmps.jl b/src/gmps.jl index d5b3591..7d39f01 100644 --- a/src/gmps.jl +++ b/src/gmps.jl @@ -198,7 +198,7 @@ function quadratic_operator(os::OpSum) sites[n] = ntuple(n -> ITensors.site(term[n]), Val(2)) nsites = max(nsites, maximum(sites[n])) end - # detect coefficient type + # detect coefficient type coef_type = mapreduce(typeof, promote_type, coefs) ElT = isreal(coefs) ? real(coef_type) : coef_type # fill Hamiltonian matrix with elements @@ -338,7 +338,7 @@ givens_rotations(v::ConservesNf) = return givens_rotations(v.data) """ givens_rotations(_v0::ConservesNfParity) - + For a vector ```julia v=_v0.data @@ -833,8 +833,8 @@ end """ slater_determinant_to_mps(s::Vector{<:Index}, Φ::AbstractMatrix; kwargs...) -Given indices and matrix of orbitals representing a Slater determinant, -compute a matrix product state (MPS) approximately having the same correlation +Given indices and matrix of orbitals representing a Slater determinant, +compute a matrix product state (MPS) approximately having the same correlation matrices as this Slater determinant. Optional keyword arguments: diff --git a/test/electron.jl b/test/electron.jl index 8441259..4d260d1 100644 --- a/test/electron.jl +++ b/test/electron.jl @@ -161,7 +161,7 @@ end end @testset "Electron - Pairing (currently inactive)" begin - # Keep this testset for when the Electron-sites + pairing bug is fixed + # Keep this testset for when the Electron-sites + pairing bug is fixed # But skip the tests for now. is_implemented = false if !is_implemented diff --git a/test/linalg.jl b/test/linalg.jl index 2fd03b3..5ea9df3 100644 --- a/test/linalg.jl +++ b/test/linalg.jl @@ -17,7 +17,7 @@ const GMPS = ITensorGaussianMPS H[1:N, 1:N] = -1 .* conj.(hd) H[(N + 1):end, (N + 1):end] = hd H = (H + H') ./ 2 - # compare spectrum, which can also accurately be computed via standard eigendecomposition + # compare spectrum, which can also accurately be computed via standard eigendecomposition d, U = GMPS._eigen_gaussian_blocked(Hermitian(H)) d2, _ = eigen(Hermitian(H)) d3, _ = GMPS.eigen_gaussian(Hermitian(GMPS.interleave(H))) @@ -30,7 +30,7 @@ end U = (x -> Matrix(qr(x).Q))(randn(ComplexF64, 3, 3)) AU = A * U B = GMPS.make_subspace_real_if_possible(AU) - # verify that same subspace is spanned by real eigenvectors B as original eigenvectors A or AU + # verify that same subspace is spanned by real eigenvectors B as original eigenvectors A or AU @test norm(((B * B' * A) .- A)) <= eps(Float64) * 10 @test norm(((B * B' * AU) .- AU)) <= eps(Float64) * 10 end