@@ -398,7 +398,7 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
398398 test_rrule(eigh′, H; atol, output_tangent=(ΔD, ΔU))
399399 end
400400
401- let (U, S, V, ϵ ) = tsvd(A)
401+ let (U, S, V) = tsvd(A)
402402 ΔU = randn(scalartype(U), space(U))
403403 ΔS = randn(scalartype(S), space(S))
404404 ΔV = randn(scalartype(V), space(V))
@@ -408,54 +408,54 @@ Vlist = ((ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
408408 mul!(block(ΔU, c), block(U, c), Diagonal(imag(diag(b))), -im, 1)
409409 end
410410 end
411- test_rrule(tsvd, A; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ))
411+ test_rrule(tsvd, A; atol, output_tangent=(ΔU, ΔS, ΔV))
412412
413413 allS = mapreduce(x -> diag(x[2]), vcat, blocks(S))
414414 truncval = (maximum(allS) + minimum(allS)) / 2
415- U, S, V, ϵ = tsvd(A; trunc=truncerr(truncval))
415+ U, S, V = tsvd(A; trunc=truncerr(truncval))
416416 ΔU = randn(scalartype(U), space(U))
417417 ΔS = randn(scalartype(S), space(S))
418418 ΔV = randn(scalartype(V), space(V))
419419 T <: Complex && remove_svdgauge_depence!(ΔU, ΔV, U, S, V)
420- test_rrule(tsvd, A; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ),
420+ test_rrule(tsvd, A; atol, output_tangent=(ΔU, ΔS, ΔV),
421421 fkwargs=(; trunc=truncerr(truncval)))
422422 end
423423
424- let (U, S, V, ϵ ) = tsvd(B)
424+ let (U, S, V) = tsvd(B)
425425 ΔU = randn(scalartype(U), space(U))
426426 ΔS = randn(scalartype(S), space(S))
427427 ΔV = randn(scalartype(V), space(V))
428428 T <: Complex && remove_svdgauge_depence!(ΔU, ΔV, U, S, V)
429- test_rrule(tsvd, B; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ))
429+ test_rrule(tsvd, B; atol, output_tangent=(ΔU, ΔS, ΔV))
430430
431431 Vtrunc = spacetype(S)(TensorKit.SectorDict(c => ceil(Int, size(b, 1) / 2)
432432 for (c, b) in blocks(S)))
433433
434- U, S, V, ϵ = tsvd(B; trunc=truncspace(Vtrunc))
434+ U, S, V = tsvd(B; trunc=truncspace(Vtrunc))
435435 ΔU = randn(scalartype(U), space(U))
436436 ΔS = randn(scalartype(S), space(S))
437437 ΔV = randn(scalartype(V), space(V))
438438 T <: Complex && remove_svdgauge_depence!(ΔU, ΔV, U, S, V)
439- test_rrule(tsvd, B; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ),
439+ test_rrule(tsvd, B; atol, output_tangent=(ΔU, ΔS, ΔV),
440440 fkwargs=(; trunc=truncspace(Vtrunc)))
441441 end
442442
443- let (U, S, V, ϵ ) = tsvd(C)
443+ let (U, S, V) = tsvd(C)
444444 ΔU = randn(scalartype(U), space(U))
445445 ΔS = randn(scalartype(S), space(S))
446446 ΔV = randn(scalartype(V), space(V))
447447 T <: Complex && remove_svdgauge_depence!(ΔU, ΔV, U, S, V)
448- test_rrule(tsvd, C; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ))
448+ test_rrule(tsvd, C; atol, output_tangent=(ΔU, ΔS, ΔV))
449449
450450 c, = TensorKit.MatrixAlgebra._argmax(x -> sqrt(dim(x[1])) * maximum(diag(x[2])),
451451 blocks(S))
452452 trunc = truncdim(round(Int, 2 * dim(c)))
453- U, S, V, ϵ = tsvd(C; trunc)
453+ U, S, V = tsvd(C; trunc)
454454 ΔU = randn(scalartype(U), space(U))
455455 ΔS = randn(scalartype(S), space(S))
456456 ΔV = randn(scalartype(V), space(V))
457457 T <: Complex && remove_svdgauge_depence!(ΔU, ΔV, U, S, V)
458- test_rrule(tsvd, C; atol, output_tangent=(ΔU, ΔS, ΔV, 0.0 ), fkwargs=(; trunc))
458+ test_rrule(tsvd, C; atol, output_tangent=(ΔU, ΔS, ΔV), fkwargs=(; trunc))
459459 end
460460
461461 let D = LinearAlgebra.eigvals(C)
0 commit comments