{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Tensor Network Renormalization Group for the 2D Ising model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the basic functions for the Ising model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define Kronecker Delta" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "using LinearAlgebra" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "using Plots" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "kronecker_delta (generic function with 1 method)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function kronecker_delta(i::Int,j::Int)\n", " \n", " res = 0.\n", " \n", " if i==j\n", " \n", " res = 1.\n", " \n", " end\n", " \n", " res\n", " \n", "end" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "kronecker_delta(1,1)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.0" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "kronecker_delta(1,2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the weight functions of Ising model" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "weight (generic function with 1 method)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function weight(beta::Float64,k::Int)\n", " \n", " res = 1/2 * (exp(beta) + (-1)^k * exp(-beta))\n", " \n", " res\n", " \n", "end" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.352409615243247" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "weight(1.5,0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the initial tensor" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "init_tensor (generic function with 1 method)" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function init_tensor(beta::Float64)\n", " \n", " tensor = zeros(2,2,2,2)\n", " \n", " for i in 1:2, j in 1:2, k in 1:2#, l in 1:2\n", " \n", " l = mod(i+j+k-3,2)+1\n", " \n", " tensor[i,j,k,l] = sqrt(weight(beta,i-1) * weight(beta,j-1) * weight(beta,k-1) * weight(beta,l-1)) #*\n", " #kronecker_delta(mod(i+j+l+k,2),0)\n", " \n", " end\n", " \n", " return tensor\n", " \n", "end" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2×2×2×2 Array{Float64,4}:\n", "[:, :, 1, 1] =\n", " 2.3811 0.0 \n", " 0.0 1.81343\n", "\n", "[:, :, 2, 1] =\n", " 0.0 1.81343\n", " 1.81343 0.0 \n", "\n", "[:, :, 1, 2] =\n", " 0.0 1.81343\n", " 1.81343 0.0 \n", "\n", "[:, :, 2, 2] =\n", " 1.81343 0.0 \n", " 0.0 1.3811" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tensor = init_tensor(1.0)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "length(tensor[:,1,1,1])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Splitting tensors for the singular value decomposition" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define an intermediate irrep / label K for the new coarse edge, by splitting the 4-valent delta function into two three valent delta functions. This K will be the new irrep on the coarse edge." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This new label K must be kept fixed during the SVD and it determines which fine configurations contribute." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This transformation will bring the matrix M we had before into a block diagonal form, where each block is labelled by K." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us define some basic indices that keep track of the allowed configurations with respect to K." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "compute_RangeB_S_Bf (generic function with 1 method)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function compute_RangeB_S_Bf()\n", "\n", " RangeB = zeros(Int64,2)\n", " S = zeros(Int64,2,2,2)\n", " Bf = zeros(Int64,2,2,2)\n", "\n", " for K in 1:2\n", " B = 1\n", " for k1 in 1:2, k2 in 1:2\n", " Bf[K,k1,k2] = 1\n", " if isodd(K + k1 + k2)\n", "\n", " RangeB[K] = B\n", "\n", " S[K,B,1] = k1\n", " S[K,B,2] = k2\n", "\n", " Bf[K,k1,k2] = B\n", "\n", " B += 1\n", " end\n", " end\n", " \n", " end\n", "\n", " return (RangeB,S,Bf)\n", "\n", "end" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "(RangeB,S,Bf) = compute_RangeB_S_Bf();" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2-element Array{Int64,1}:\n", " 2\n", " 2" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "RangeB" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2×2×2 Array{Int64,3}:\n", "[:, :, 1] =\n", " 1 2\n", " 1 2\n", "\n", "[:, :, 2] =\n", " 1 2\n", " 2 1" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "S" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2×2×2 Array{Int64,3}:\n", "[:, :, 1] =\n", " 1 1\n", " 1 2\n", "\n", "[:, :, 2] =\n", " 1 2\n", " 1 1" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bf" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "compute_SVD1 (generic function with 1 method)" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function compute_SVD1(tensor::Array{Float64,4})\n", " \n", " # We perform the SVD per label K.\n", " \n", " #length of tensor, we already know\n", " \n", " #len = length(tensor[:,1,1,1])\n", " \n", " S1 = zeros(2,2,2) # Here I make the choice to keep the same bond dimension\n", " S2 = zeros(2,2,2)\n", " \n", " Svlist = zeros(2) # I only keep one singular value per block\n", " \n", " for K in 1:2\n", " \n", " mat = zeros(RangeB[K],RangeB[K]) #B will also be the index of our matrix\n", " \n", " for B1 in 1:RangeB[K], B2 in 1:RangeB[K]\n", " \n", " # B1 -> (i,l)\n", " # B2 -> (j,k)\n", " \n", " (i,l) = S[K,B1,:]\n", " \n", " (j,k) = S[K,B2,:]\n", " \n", " mat[B1,B2] = tensor[i,j,k,l]\n", " \n", " end\n", " \n", " #Compute the SVD\n", " \n", " println(\"Compute SVD\")\n", " \n", " decomp = svd(mat)\n", " \n", " U = decomp.U\n", " Sv = decomp.S\n", " V = decomp.V' # Gives us V^\\dagger\n", " \n", " Svlist[K] = Sv[1] # here I make the choice to only keep the first singular value per \"block\"\n", " \n", " println(\"Print SVs\")\n", " \n", " println(Sv) #prints singular values\n", " \n", " #Define the new S1 and S2\n", " \n", " for B1 in 1:RangeB[K]\n", " \n", " (i,l) = S[K,B1,:]\n", " \n", " S1[i,l,K] = U[B1,1] * sqrt(Svlist[K] / Svlist[1])\n", " \n", " end\n", " \n", " for B2 in 1:RangeB[K]\n", " \n", " (j,k) = S[K,B2,:]\n", " \n", " S2[j,k,K] = sqrt(Svlist[K] / Svlist[1]) * V[1,B2]\n", " \n", " end\n", " \n", " end\n", " \n", " return (S1,S2,Svlist / Svlist[1])\n", " \n", "end " ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Compute SVD\n", "Print SVs\n", "[3.7622, 1.76648e-16]\n", "Compute SVD\n", "Print SVs\n", "[3.62686, 4.71028e-16]\n" ] } ], "source": [ "(S1test,S2test,Svlist1) = compute_SVD1(tensor);" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "compute_SVD2 (generic function with 1 method)" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function compute_SVD2(tensor::Array{Float64,4})\n", " \n", " # We perform the SVD per label K.\n", " \n", " #length of tensor, we already know\n", " \n", " #len = length(tensor[:,1,1,1])\n", " \n", " S3 = zeros(2,2,2) # Here I make the choice to keep the same bond dimension\n", " S4 = zeros(2,2,2)\n", " \n", " Svlist = zeros(2) # I only keep one singular value per block\n", " \n", " for K in 1:2\n", " \n", " mat = zeros(RangeB[K],RangeB[K])\n", " \n", " for B1 in 1:RangeB[K], B2 in 1:RangeB[K]\n", " \n", " #B1 -> (i,j)\n", " #B2 -> (k,l)\n", " \n", " (i,j) = S[K,B1,:]\n", " (k,l) = S[K,B2,:]\n", " \n", " mat[B1,B2] = tensor[i,j,k,l]\n", " \n", " end\n", " \n", " #Compute the SVD\n", " \n", " println(\"Compute SVD\")\n", " \n", " decomp = svd(mat)\n", " \n", " U = decomp.U\n", " Sv = decomp.S\n", " V = decomp.V' # Gives us V^\\dagger\n", " \n", " Svlist[K] = Sv[1] # here I make the choice to only keep the first singular value per \"block\"\n", " \n", " println(\"Print SVs\")\n", " \n", " println(Sv) #prints singular values\n", " \n", " #Define the new S3 and S4\n", " \n", " for B1 in 1:RangeB[K]\n", " \n", " (i,j) = S[K,B1,:] \n", " \n", " S3[i,j,K] = U[B1,1] * sqrt(Svlist[K] / Svlist[1])\n", " \n", " end\n", " \n", " for B2 in 1:RangeB[K]\n", " \n", " (k,l) = S[K,B2,:]\n", " \n", " S4[k,l,K] = sqrt(Svlist[K] / Svlist[1]) * V[1,B2]\n", " \n", " end\n", " \n", " end\n", " \n", " return (S3,S4,Svlist / Svlist[1])\n", " \n", "end " ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Compute SVD\n", "Print SVs\n", "[3.7622, 5.29943e-16]\n", "Compute SVD\n", "Print SVs\n", "[3.62686, 0.0]\n" ] } ], "source": [ "(S3test,S4test,Svlist2) = compute_SVD2(tensor);" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2×2×2 Array{Float64,3}:\n", "[:, :, 1] =\n", " -0.795551 0.0 \n", " 0.0 -0.605887\n", "\n", "[:, :, 2] =\n", " 0.0 -0.694272\n", " -0.694272 0.0 " ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "S3test" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2-element Array{Float64,1}:\n", " 1.0 \n", " 0.9640275800758171" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Svlist2" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "contract (generic function with 1 method)" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function contract(S1::Array{Float64,3},S2::Array{Float64,3},S3::Array{Float64,3},S4::Array{Float64,3})\n", " \n", " len_coarse = length(S1[1,1,:])\n", " \n", " len_fine = length(S1[:,1,1])\n", " \n", " new_ten = zeros(len_coarse,len_coarse,len_coarse,len_coarse)\n", " \n", " for p in 1:len_coarse, q in 1:len_coarse, r in 1:len_coarse#, s in 1:len_coarse\n", " \n", " s = mod(p+q+r-3,2)+1\n", " \n", " for i in 1:len_fine#, j in 1:len_fine, k in 1:len_fine, l in 1:len_fine\n", " \n", " #new_ten[p,q,r,s] += S1[i,j,p] * S2[l,k,r] * S3[k,j,q] * S4[i,l,s]\n", " new_ten[p,q,r,s] += S1[i,mod(i+p-2,2)+1,p] *\n", " S2[mod(i+p+q+r-4,2)+1,mod(i+p+q-3,2)+1,r] *\n", " S3[mod(i+p+q-3,2)+1,mod(i+p-2,2)+1,q] *\n", " S4[i,mod(i+p+q+r-4,2)+1,s]\n", " \n", " end\n", " \n", " end\n", " \n", " return new_ten\n", " \n", "end" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 0.151037 seconds (216.74 k allocations: 10.308 MiB)\n" ] }, { "data": { "text/plain": [ "2×2×2×2 Array{Float64,4}:\n", "[:, :, 1, 1] =\n", " 0.535325 0.0 \n", " 0.0 0.482014\n", "\n", "[:, :, 2, 1] =\n", " 0.0 0.482014\n", " 0.464675 0.0 \n", "\n", "[:, :, 1, 2] =\n", " 0.0 0.464675\n", " 0.482014 0.0 \n", "\n", "[:, :, 2, 2] =\n", " 0.482014 0.0 \n", " 0.0 0.464675" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "@time contract(S1test,S2test,S3test,S4test)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "main (generic function with 1 method)" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "function main(beta::Float64)\n", " \n", " iter = 30 #number of iterations\n", " \n", " svlist = zeros(iter,4)\n", " \n", " tensor = init_tensor(beta)\n", " \n", " for i in 1:iter\n", " \n", " println(\"Iteration \", i)\n", " \n", " println(\"Compute first SVD\")\n", " \n", " (S1,S2,sv1) = compute_SVD1(tensor);\n", " \n", " println(\"Compute second SVD\")\n", " \n", " (S3,S4,sv2) = compute_SVD2(tensor);\n", " \n", " svlist[i,1] = i\n", " svlist[i,2] = sv1[2]\n", " #svlist[i,3] = sv1[3]\n", " #svlist[i,4] = sv1[4]\n", " \n", " println(\"Compute new tensor\")\n", " \n", " tensor = contract(S1,S2,S3,S4)\n", " \n", " println()\n", " \n", " end\n", " \n", " return svlist\n", " \n", "end" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30297, 2.60923e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.835305, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30297, 2.60923e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.835305, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935294, 0.0647057]\n", "Compute SVD\n", "Print SVs\n", "[0.526028, 0.115049]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935294, 0.0647057]\n", "Compute SVD\n", "Print SVs\n", "[0.526028, 0.115049]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.844155, 0.0428819]\n", "Compute SVD\n", "Print SVs\n", "[0.488285, 0.0741349]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.844155, 0.0428819]\n", "Compute SVD\n", "Print SVs\n", "[0.488285, 0.0741349]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872306, 0.0486475]\n", "Compute SVD\n", "Print SVs\n", "[0.492218, 0.0862127]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872306, 0.0486475]\n", "Compute SVD\n", "Print SVs\n", "[0.492218, 0.0862127]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866026, 0.0465841]\n", "Compute SVD\n", "Print SVs\n", "[0.480272, 0.0840003]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866026, 0.0465841]\n", "Compute SVD\n", "Print SVs\n", "[0.480272, 0.0840003]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870227, 0.0464579]\n", "Compute SVD\n", "Print SVs\n", "[0.468226, 0.0863449]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870227, 0.0464579]\n", "Compute SVD\n", "Print SVs\n", "[0.468226, 0.0863449]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872802, 0.0453406]\n", "Compute SVD\n", "Print SVs\n", "[0.450135, 0.0879144]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872802, 0.0453406]\n", "Compute SVD\n", "Print SVs\n", "[0.450135, 0.0879144]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.877864, 0.0437203]\n", "Compute SVD\n", "Print SVs\n", "[0.425545, 0.0901915]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.877864, 0.0437203]\n", "Compute SVD\n", "Print SVs\n", "[0.425545, 0.0901915]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.885368, 0.0409873]\n", "Compute SVD\n", "Print SVs\n", "[0.392231, 0.0925189]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.885368, 0.0409873]\n", "Compute SVD\n", "Print SVs\n", "[0.392231, 0.0925189]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.896656, 0.0366858]\n", "Compute SVD\n", "Print SVs\n", "[0.348672, 0.0943423]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.896656, 0.0366858]\n", "Compute SVD\n", "Print SVs\n", "[0.348672, 0.0943423]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.912481, 0.0304342]\n", "Compute SVD\n", "Print SVs\n", "[0.29459, 0.0942688]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.912481, 0.0304342]\n", "Compute SVD\n", "Print SVs\n", "[0.29459, 0.0942688]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.932422, 0.0225143]\n", "Compute SVD\n", "Print SVs\n", "[0.232587, 0.0902579]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.932422, 0.0225143]\n", "Compute SVD\n", "Print SVs\n", "[0.232587, 0.0902579]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.953912, 0.0142543]\n", "Compute SVD\n", "Print SVs\n", "[0.168975, 0.0804694]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.953912, 0.0142543]\n", "Compute SVD\n", "Print SVs\n", "[0.168975, 0.0804694]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.972959, 0.0074944]\n", "Compute SVD\n", "Print SVs\n", "[0.112081, 0.0650576]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.972959, 0.0074944]\n", "Compute SVD\n", "Print SVs\n", "[0.112081, 0.0650576]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.986554, 0.00324957]\n", "Compute SVD\n", "Print SVs\n", "[0.068166, 0.0470304]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.986554, 0.00324957]\n", "Compute SVD\n", "Print SVs\n", "[0.068166, 0.0470304]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.994341, 0.00118385]\n", "Compute SVD\n", "Print SVs\n", "[0.0385949, 0.0305002]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.994341, 0.00118385]\n", "Compute SVD\n", "Print SVs\n", "[0.0385949, 0.0305002]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997958, 0.000375586]\n", "Compute SVD\n", "Print SVs\n", "[0.0207575, 0.0180571]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997958, 0.000375586]\n", "Compute SVD\n", "Print SVs\n", "[0.0207575, 0.0180571]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999351, 0.000108066]\n", "Compute SVD\n", "Print SVs\n", "[0.0108046, 0.00999532]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999351, 0.000108066]\n", "Compute SVD\n", "Print SVs\n", "[0.0108046, 0.00999532]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999813, 2.92156e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00551834, 0.00529329]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999813, 2.92156e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00551834, 0.00529329]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999949, 7.61537e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00278953, 0.00272984]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999949, 7.61537e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00278953, 0.00272984]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999987, 1.94553e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00140254, 0.00138714]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999987, 1.94553e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00140254, 0.00138714]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 4.91787e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000703233, 0.000699321]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 4.91787e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000703233, 0.000699321]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.23634e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.00035225, 0.000350984]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.23634e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000352436, 0.000350799]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.45704e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000301311, 4.83566e-5]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.45704e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000144307, 0.000100968]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.07375e-14]\n", "Compute SVD\n", "Print SVs\n", "[0.000208521, 2.91278e-10]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.05387e-14]\n", "Compute SVD\n", "Print SVs\n", "[5.95882e-7, 1.01595e-7]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.55935e-16]\n", "Compute SVD\n", "Print SVs\n", "[3.2873e-7, 7.78559e-10]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.55934e-16]\n", "Compute SVD\n", "Print SVs\n", "[1.11421e-5, 2.297e-11]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.73598e-27]\n", "Compute SVD\n", "Print SVs\n", "[3.56275e-13, 1.04862e-14]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.74967e-27]\n", "Compute SVD\n", "Print SVs\n", "[1.91383e-6, 1.95925e-21]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.74885e-32]\n", "Compute SVD\n", "Print SVs\n", "[8.25741e-10, 8.17308e-23]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.74893e-32]\n", "Compute SVD\n", "Print SVs\n", "[6.11172e-13, 1.10426e-19]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.4061e-53]\n", "Compute SVD\n", "Print SVs\n", "[2.24649e-11, 6.25909e-43]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.47035e-53]\n", "Compute SVD\n", "Print SVs\n", "[1.44658e-25, 1.01644e-28]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.39761e-79]\n", "Compute SVD\n", "Print SVs\n", "[8.4163e-25, 2.4565e-82]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.5579e-63]\n", "Compute SVD\n", "Print SVs\n", "[1.8027e-18, 2.52838e-45]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_38 = main(0.38);" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31994, 5.20387e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.861533, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31994, 5.20387e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.861533, 0.0]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.93459, 0.0654105]\n", "Compute SVD\n", "Print SVs\n", "[0.539366, 0.11334]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.93459, 0.0654105]\n", "Compute SVD\n", "Print SVs\n", "[0.539366, 0.11334]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841417, 0.0431539]\n", "Compute SVD\n", "Print SVs\n", "[0.505249, 0.0718664]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841417, 0.0431539]\n", "Compute SVD\n", "Print SVs\n", "[0.505249, 0.0718664]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869459, 0.0494871]\n", "Compute SVD\n", "Print SVs\n", "[0.517298, 0.0831764]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869459, 0.0494871]\n", "Compute SVD\n", "Print SVs\n", "[0.517298, 0.0831764]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861201, 0.0476514]\n", "Compute SVD\n", "Print SVs\n", "[0.515332, 0.0796329]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861201, 0.0476514]\n", "Compute SVD\n", "Print SVs\n", "[0.515332, 0.0796329]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86339, 0.0482293]\n", "Compute SVD\n", "Print SVs\n", "[0.518001, 0.0803874]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86339, 0.0482293]\n", "Compute SVD\n", "Print SVs\n", "[0.518001, 0.0803874]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862428, 0.0481163]\n", "Compute SVD\n", "Print SVs\n", "[0.520188, 0.0797728]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862428, 0.0481163]\n", "Compute SVD\n", "Print SVs\n", "[0.520188, 0.0797728]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862267, 0.0482226]\n", "Compute SVD\n", "Print SVs\n", "[0.523781, 0.0793857]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862267, 0.0482226]\n", "Compute SVD\n", "Print SVs\n", "[0.523781, 0.0793857]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861712, 0.0482795]\n", "Compute SVD\n", "Print SVs\n", "[0.528767, 0.0786793]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861712, 0.0482795]\n", "Compute SVD\n", "Print SVs\n", "[0.528767, 0.0786793]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861079, 0.0483564]\n", "Compute SVD\n", "Print SVs\n", "[0.53593, 0.0776942]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861079, 0.0483564]\n", "Compute SVD\n", "Print SVs\n", "[0.53593, 0.0776942]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.860256, 0.0484006]\n", "Compute SVD\n", "Print SVs\n", "[0.546158, 0.076236]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.860256, 0.0484006]\n", "Compute SVD\n", "Print SVs\n", "[0.546158, 0.076236]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859329, 0.0483449]\n", "Compute SVD\n", "Print SVs\n", "[0.560797, 0.0740805]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859329, 0.0483449]\n", "Compute SVD\n", "Print SVs\n", "[0.560797, 0.0740805]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858503, 0.048014]\n", "Compute SVD\n", "Print SVs\n", "[0.581743, 0.0708563]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858503, 0.048014]\n", "Compute SVD\n", "Print SVs\n", "[0.581743, 0.0708563]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858392, 0.0470287]\n", "Compute SVD\n", "Print SVs\n", "[0.611622, 0.0660033]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858392, 0.0470287]\n", "Compute SVD\n", "Print SVs\n", "[0.611622, 0.0660033]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.860471, 0.0446184]\n", "Compute SVD\n", "Print SVs\n", "[0.653798, 0.0587228]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.860471, 0.0446184]\n", "Compute SVD\n", "Print SVs\n", "[0.653798, 0.0587228]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867833, 0.0394602]\n", "Compute SVD\n", "Print SVs\n", "[0.711697, 0.0481172]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867833, 0.0394602]\n", "Compute SVD\n", "Print SVs\n", "[0.711697, 0.0481172]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.885479, 0.0301295]\n", "Compute SVD\n", "Print SVs\n", "[0.786149, 0.0339364]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.885479, 0.0301295]\n", "Compute SVD\n", "Print SVs\n", "[0.786149, 0.0339364]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917142, 0.0173511]\n", "Compute SVD\n", "Print SVs\n", "[0.869522, 0.0183013]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917142, 0.0173511]\n", "Compute SVD\n", "Print SVs\n", "[0.869522, 0.0183013]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.95643, 0.00620807]\n", "Compute SVD\n", "Print SVs\n", "[0.941774, 0.00630468]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.95643, 0.00620807]\n", "Compute SVD\n", "Print SVs\n", "[0.941774, 0.00630468]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.985939, 0.00110782]\n", "Compute SVD\n", "Print SVs\n", "[0.983566, 0.00111049]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.985939, 0.00110782]\n", "Compute SVD\n", "Print SVs\n", "[0.983566, 0.00111049]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997675, 7.83765e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.997515, 7.83891e-5]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997675, 7.83765e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.997515, 7.83891e-5]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999841, 1.64754e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.999838, 1.64755e-6]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999841, 1.64754e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.999838, 1.64755e-6]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 6.7023e-9]\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 6.7023e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 6.7023e-9]\n", "Compute SVD\n", "Print SVs\n", "[0.999997, 6.7023e-9]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.75967e-12]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.75967e-12]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.75967e-12]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.75963e-12]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.17757e-16]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.85046e-17]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.92523e-17]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_39 = main(0.39);" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30464, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.837913, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30464, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.837913, 0.0]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935218, 0.0647822]\n", "Compute SVD\n", "Print SVs\n", "[0.527372, 0.114882]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935218, 0.0647822]\n", "Compute SVD\n", "Print SVs\n", "[0.527372, 0.114882]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843862, 0.0429175]\n", "Compute SVD\n", "Print SVs\n", "[0.48999, 0.0739127]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843862, 0.0429175]\n", "Compute SVD\n", "Print SVs\n", "[0.48999, 0.0739127]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871988, 0.0487489]\n", "Compute SVD\n", "Print SVs\n", "[0.494729, 0.0859228]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871988, 0.0487489]\n", "Compute SVD\n", "Print SVs\n", "[0.494729, 0.0859228]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865481, 0.0467246]\n", "Compute SVD\n", "Print SVs\n", "[0.483764, 0.0835929]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865481, 0.0467246]\n", "Compute SVD\n", "Print SVs\n", "[0.483764, 0.0835929]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869425, 0.0466996]\n", "Compute SVD\n", "Print SVs\n", "[0.473141, 0.0858134]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869425, 0.0466996]\n", "Compute SVD\n", "Print SVs\n", "[0.473141, 0.0858134]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87155, 0.0457393]\n", "Compute SVD\n", "Print SVs\n", "[0.456963, 0.087237]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87155, 0.0457393]\n", "Compute SVD\n", "Print SVs\n", "[0.456963, 0.087237]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87593, 0.0443874]\n", "Compute SVD\n", "Print SVs\n", "[0.434913, 0.0893979]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87593, 0.0443874]\n", "Compute SVD\n", "Print SVs\n", "[0.434913, 0.0893979]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.882404, 0.0420773]\n", "Compute SVD\n", "Print SVs\n", "[0.404791, 0.0917244]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.882404, 0.0420773]\n", "Compute SVD\n", "Print SVs\n", "[0.404791, 0.0917244]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.892285, 0.0383766]\n", "Compute SVD\n", "Print SVs\n", "[0.364893, 0.0938438]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.892285, 0.0383766]\n", "Compute SVD\n", "Print SVs\n", "[0.364893, 0.0938438]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.906504, 0.0328098]\n", "Compute SVD\n", "Print SVs\n", "[0.314316, 0.0946251]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.906504, 0.0328098]\n", "Compute SVD\n", "Print SVs\n", "[0.314316, 0.0946251]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.925203, 0.025369]\n", "Compute SVD\n", "Print SVs\n", "[0.254514, 0.092221]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.925203, 0.025369]\n", "Compute SVD\n", "Print SVs\n", "[0.254514, 0.092221]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.946578, 0.0170187]\n", "Compute SVD\n", "Print SVs\n", "[0.190545, 0.0845444]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.946578, 0.0170187]\n", "Compute SVD\n", "Print SVs\n", "[0.190545, 0.0845444]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.966912, 0.00955941]\n", "Compute SVD\n", "Print SVs\n", "[0.130435, 0.0708637]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.966912, 0.00955941]\n", "Compute SVD\n", "Print SVs\n", "[0.130435, 0.0708637]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.982567, 0.00442542]\n", "Compute SVD\n", "Print SVs\n", "[0.0816316, 0.053267]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.982567, 0.00442542]\n", "Compute SVD\n", "Print SVs\n", "[0.0816316, 0.053267]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.992235, 0.00170599]\n", "Compute SVD\n", "Print SVs\n", "[0.0472688, 0.035811]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.992235, 0.00170599]\n", "Compute SVD\n", "Print SVs\n", "[0.0472688, 0.035811]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997052, 0.000565037]\n", "Compute SVD\n", "Print SVs\n", "[0.0258172, 0.0218215]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997052, 0.000565037]\n", "Compute SVD\n", "Print SVs\n", "[0.0258172, 0.0218215]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999025, 0.000167399]\n", "Compute SVD\n", "Print SVs\n", "[0.0135657, 0.0123278]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999025, 0.000167399]\n", "Compute SVD\n", "Print SVs\n", "[0.0135657, 0.0123278]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99971, 4.60793e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00696548, 0.00661347]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99971, 4.60793e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00696548, 0.00661347]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99992, 1.21352e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00353107, 0.00343643]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99992, 1.21352e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00353107, 0.00343643]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999979, 3.11753e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00177798, 0.00175337]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999979, 3.11753e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00177798, 0.00175337]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999995, 7.90331e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000892148, 0.000885869]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999995, 7.90331e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000892148, 0.000885869]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.98984e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000446872, 0.000445281]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.98984e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000446894, 0.000445259]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.82789e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000238757, 0.000202209]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.82789e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000258936, 0.000186451]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.27253e-13]\n", "Compute SVD\n", "Print SVs\n", "[0.000248637, 3.72934e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.24933e-13]\n", "Compute SVD\n", "Print SVs\n", "[1.35958e-6, 6.80309e-7]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.66541e-15]\n", "Compute SVD\n", "Print SVs\n", "[1.83392e-5, 2.54396e-10]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.66544e-15]\n", "Compute SVD\n", "Print SVs\n", "[1.31012e-6, 3.56108e-9]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.75213e-25]\n", "Compute SVD\n", "Print SVs\n", "[3.50497e-12, 2.49706e-13]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.70851e-25]\n", "Compute SVD\n", "Print SVs\n", "[4.90168e-6, 1.77664e-19]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.3436e-29]\n", "Compute SVD\n", "Print SVs\n", "[5.94049e-12, 3.94514e-18]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.34357e-29]\n", "Compute SVD\n", "Print SVs\n", "[4.1449e-9, 5.65411e-21]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.58458e-49]\n", "Compute SVD\n", "Print SVs\n", "[1.56916e-10, 4.83352e-39]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.20832e-48]\n", "Compute SVD\n", "Print SVs\n", "[2.31198e-23, 5.22636e-26]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[6.02318e-17, 6.9476e-90]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.50492e-58]\n", "Compute SVD\n", "Print SVs\n", "[6.11941e-23, 8.99584e-36]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_381 = main(0.381);" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30632, 5.21555e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.840523, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30632, 2.60777e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.840523, 0.0]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935143, 0.0648574]\n", "Compute SVD\n", "Print SVs\n", "[0.528713, 0.114714]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935143, 0.0648574]\n", "Compute SVD\n", "Print SVs\n", "[0.528713, 0.114714]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843573, 0.0429512]\n", "Compute SVD\n", "Print SVs\n", "[0.491693, 0.0736893]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843573, 0.0429512]\n", "Compute SVD\n", "Print SVs\n", "[0.491693, 0.0736893]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871678, 0.0488466]\n", "Compute SVD\n", "Print SVs\n", "[0.497239, 0.0856298]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871678, 0.0488466]\n", "Compute SVD\n", "Print SVs\n", "[0.497239, 0.0856298]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864949, 0.0468579]\n", "Compute SVD\n", "Print SVs\n", "[0.48726, 0.0831786]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864949, 0.0468579]\n", "Compute SVD\n", "Print SVs\n", "[0.48726, 0.0831786]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868648, 0.0469279]\n", "Compute SVD\n", "Print SVs\n", "[0.478073, 0.085267]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868648, 0.0469279]\n", "Compute SVD\n", "Print SVs\n", "[0.478073, 0.085267]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870339, 0.046114]\n", "Compute SVD\n", "Print SVs\n", "[0.463837, 0.0865277]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870339, 0.046114]\n", "Compute SVD\n", "Print SVs\n", "[0.463837, 0.0865277]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87406, 0.0450156]\n", "Compute SVD\n", "Print SVs\n", "[0.4444, 0.0885381]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87406, 0.0450156]\n", "Compute SVD\n", "Print SVs\n", "[0.4444, 0.0885381]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879519, 0.0431146]\n", "Compute SVD\n", "Print SVs\n", "[0.417635, 0.0907973]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879519, 0.0431146]\n", "Compute SVD\n", "Print SVs\n", "[0.417635, 0.0907973]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.887956, 0.0400244]\n", "Compute SVD\n", "Print SVs\n", "[0.381746, 0.0930984]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.887956, 0.0400244]\n", "Compute SVD\n", "Print SVs\n", "[0.381746, 0.0930984]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900387, 0.0352251]\n", "Compute SVD\n", "Print SVs\n", "[0.335335, 0.0945807]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900387, 0.0352251]\n", "Compute SVD\n", "Print SVs\n", "[0.335335, 0.0945807]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917425, 0.0284645]\n", "Compute SVD\n", "Print SVs\n", "[0.278752, 0.0936822]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917425, 0.0284645]\n", "Compute SVD\n", "Print SVs\n", "[0.278752, 0.0936822]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938114, 0.0202842]\n", "Compute SVD\n", "Print SVs\n", "[0.215569, 0.0882729]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938114, 0.0202842]\n", "Compute SVD\n", "Print SVs\n", "[0.215569, 0.0882729]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.959355, 0.0122521]\n", "Compute SVD\n", "Print SVs\n", "[0.15293, 0.0768596]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.959355, 0.0122521]\n", "Compute SVD\n", "Print SVs\n", "[0.15293, 0.0768596]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977154, 0.00611863]\n", "Compute SVD\n", "Print SVs\n", "[0.0990427, 0.0603663]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977154, 0.00611863]\n", "Compute SVD\n", "Print SVs\n", "[0.0990427, 0.0603663]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989135, 0.00252661]\n", "Compute SVD\n", "Print SVs\n", "[0.0589989, 0.0423595]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989135, 0.00252661]\n", "Compute SVD\n", "Print SVs\n", "[0.0589989, 0.0423595]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995618, 0.000883924]\n", "Compute SVD\n", "Print SVs\n", "[0.0328873, 0.0267596]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995618, 0.000883924]\n", "Compute SVD\n", "Print SVs\n", "[0.0328873, 0.0267596]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998476, 0.000272214]\n", "Compute SVD\n", "Print SVs\n", "[0.0175064, 0.0155257]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998476, 0.000272214]\n", "Compute SVD\n", "Print SVs\n", "[0.0175064, 0.0155257]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999529, 7.68045e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00905666, 0.00847646]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999529, 7.68045e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00905666, 0.00847646]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999867, 2.05215e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00460994, 0.00445098]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999867, 2.05215e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00460994, 0.00445098]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999964, 5.31405e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00232617, 0.00228439]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999964, 5.31405e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00232617, 0.00228439]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.35284e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00116849, 0.00115776]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.35284e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00116849, 0.00115776]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.41346e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000585609, 0.00058289]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.41346e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000585609, 0.00058289]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.57305e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000294803, 0.000290806]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.57305e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000293451, 0.000292146]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.94087e-9]\n", "Compute SVD\n", "Print SVs\n", "[0.000281955, 6.88362e-6]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.94087e-9]\n", "Compute SVD\n", "Print SVs\n", "[7.98328e-5, 2.43116e-5]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.08409e-14]\n", "Compute SVD\n", "Print SVs\n", "[2.31804e-7, 4.67674e-8]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.0838e-14]\n", "Compute SVD\n", "Print SVs\n", "[0.000150031, 7.22386e-11]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.71916e-18]\n", "Compute SVD\n", "Print SVs\n", "[6.1861e-8, 7.62864e-11]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.71916e-18]\n", "Compute SVD\n", "Print SVs\n", "[5.89694e-6, 8.00272e-13]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.17771e-28]\n", "Compute SVD\n", "Print SVs\n", "[6.03979e-7, 1.94992e-22]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.17875e-28]\n", "Compute SVD\n", "Print SVs\n", "[1.06068e-13, 1.11132e-15]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.25063e-35]\n", "Compute SVD\n", "Print SVs\n", "[2.53106e-10, 8.89203e-26]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.25063e-35]\n", "Compute SVD\n", "Print SVs\n", "[1.13804e-14, 1.97763e-21]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.29388e-56]\n", "Compute SVD\n", "Print SVs\n", "[1.7579e-26, 7.36039e-31]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.39874e-56]\n", "Compute SVD\n", "Print SVs\n", "[1.69719e-12, 8.24148e-45]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_382 = main(0.382);" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30801, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.843138, 0.0]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.30801, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.843138, 0.0]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935069, 0.0649313]\n", "Compute SVD\n", "Print SVs\n", "[0.530052, 0.114546]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.935069, 0.0649313]\n", "Compute SVD\n", "Print SVs\n", "[0.530052, 0.114546]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843289, 0.0429831]\n", "Compute SVD\n", "Print SVs\n", "[0.493394, 0.073465]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843289, 0.0429831]\n", "Compute SVD\n", "Print SVs\n", "[0.493394, 0.073465]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871374, 0.0489403]\n", "Compute SVD\n", "Print SVs\n", "[0.499749, 0.0853336]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871374, 0.0489403]\n", "Compute SVD\n", "Print SVs\n", "[0.499749, 0.0853336]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86443, 0.0469837]\n", "Compute SVD\n", "Print SVs\n", "[0.49076, 0.0827577]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86443, 0.0469837]\n", "Compute SVD\n", "Print SVs\n", "[0.49076, 0.0827577]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867895, 0.0471424]\n", "Compute SVD\n", "Print SVs\n", "[0.483021, 0.0847058]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867895, 0.0471424]\n", "Compute SVD\n", "Print SVs\n", "[0.483021, 0.0847058]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869172, 0.0464635]\n", "Compute SVD\n", "Print SVs\n", "[0.470756, 0.0857871]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869172, 0.0464635]\n", "Compute SVD\n", "Print SVs\n", "[0.470756, 0.0857871]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872262, 0.0456012]\n", "Compute SVD\n", "Print SVs\n", "[0.454001, 0.0876125]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872262, 0.0456012]\n", "Compute SVD\n", "Print SVs\n", "[0.454001, 0.0876125]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.876732, 0.0440888]\n", "Compute SVD\n", "Print SVs\n", "[0.430751, 0.0897365]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.876732, 0.0440888]\n", "Compute SVD\n", "Print SVs\n", "[0.430751, 0.0897365]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.883714, 0.0416045]\n", "Compute SVD\n", "Print SVs\n", "[0.399218, 0.0920962]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.883714, 0.0416045]\n", "Compute SVD\n", "Print SVs\n", "[0.399218, 0.0920962]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.894208, 0.0376342]\n", "Compute SVD\n", "Print SVs\n", "[0.357658, 0.0940922]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.894208, 0.0376342]\n", "Compute SVD\n", "Print SVs\n", "[0.357658, 0.0940922]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.909163, 0.0317548]\n", "Compute SVD\n", "Print SVs\n", "[0.305457, 0.0945149]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.909163, 0.0317548]\n", "Compute SVD\n", "Print SVs\n", "[0.305457, 0.0945149]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.928459, 0.0240783]\n", "Compute SVD\n", "Print SVs\n", "[0.244566, 0.0914097]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.928459, 0.0240783]\n", "Compute SVD\n", "Print SVs\n", "[0.244566, 0.0914097]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.949947, 0.0157402]\n", "Compute SVD\n", "Print SVs\n", "[0.180634, 0.0827771]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.949947, 0.0157402]\n", "Compute SVD\n", "Print SVs\n", "[0.180634, 0.0827771]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.969747, 0.00858033]\n", "Compute SVD\n", "Print SVs\n", "[0.121884, 0.068268]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.969747, 0.00858033]\n", "Compute SVD\n", "Print SVs\n", "[0.121884, 0.068268]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.984475, 0.00385452]\n", "Compute SVD\n", "Print SVs\n", "[0.0752755, 0.0504105]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.984475, 0.00385452]\n", "Compute SVD\n", "Print SVs\n", "[0.0752755, 0.0504105]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.993262, 0.00144737]\n", "Compute SVD\n", "Print SVs\n", "[0.0431314, 0.0333312]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.993262, 0.00144737]\n", "Compute SVD\n", "Print SVs\n", "[0.0431314, 0.0333312]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997501, 0.000469782]\n", "Compute SVD\n", "Print SVs\n", "[0.0233858, 0.0200381]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997501, 0.000469782]\n", "Compute SVD\n", "Print SVs\n", "[0.0233858, 0.0200381]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999189, 0.000137261]\n", "Compute SVD\n", "Print SVs\n", "[0.0122328, 0.0112117]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999189, 0.000137261]\n", "Compute SVD\n", "Print SVs\n", "[0.0122328, 0.0112117]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999762, 3.74591e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00626499, 0.00597769]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999762, 3.74591e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00626499, 0.00597769]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999935, 9.81635e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00317161, 0.00309487]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999935, 9.81635e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00317161, 0.00309487]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999983, 2.51505e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00159585, 0.00157597]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999983, 2.51505e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00159585, 0.00157597]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999996, 6.36699e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000800468, 0.000795406]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999996, 6.36699e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000800468, 0.000795406]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.60188e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000400941, 0.00039953]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.60188e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000401001, 0.00039947]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.03357e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000298186, 0.000101734]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.03357e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000189286, 0.000160264]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.54724e-13]\n", "Compute SVD\n", "Print SVs\n", "[0.000237573, 1.07219e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.5382e-13]\n", "Compute SVD\n", "Print SVs\n", "[1.31397e-6, 1.93171e-7]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.07889e-15]\n", "Compute SVD\n", "Print SVs\n", "[4.78389e-7, 2.25525e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.07887e-15]\n", "Compute SVD\n", "Print SVs\n", "[1.76616e-5, 6.10856e-11]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.5835e-26]\n", "Compute SVD\n", "Print SVs\n", "[1.56273e-12, 4.21281e-14]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.61368e-26]\n", "Compute SVD\n", "Print SVs\n", "[2.90674e-6, 2.27529e-20]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.19621e-30]\n", "Compute SVD\n", "Print SVs\n", "[2.1313e-9, 5.61258e-22]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.19625e-30]\n", "Compute SVD\n", "Print SVs\n", "[1.51218e-12, 7.91071e-19]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.37438e-51]\n", "Compute SVD\n", "Print SVs\n", "[5.67708e-11, 7.70536e-41]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.37706e-51]\n", "Compute SVD\n", "Print SVs\n", "[2.49592e-24, 1.75369e-27]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_383 = main(0.383);" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.3097, 2.60632e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.845756, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.3097, 2.60632e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.845756, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934996, 0.0650038]\n", "Compute SVD\n", "Print SVs\n", "[0.531389, 0.114376]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934996, 0.0650038]\n", "Compute SVD\n", "Print SVs\n", "[0.531389, 0.114376]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843009, 0.043013]\n", "Compute SVD\n", "Print SVs\n", "[0.495093, 0.0732396]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.843009, 0.043013]\n", "Compute SVD\n", "Print SVs\n", "[0.495093, 0.0732396]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871078, 0.0490302]\n", "Compute SVD\n", "Print SVs\n", "[0.502258, 0.0850344]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871078, 0.0490302]\n", "Compute SVD\n", "Print SVs\n", "[0.502258, 0.0850344]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863926, 0.0471021]\n", "Compute SVD\n", "Print SVs\n", "[0.494263, 0.0823301]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863926, 0.0471021]\n", "Compute SVD\n", "Print SVs\n", "[0.494263, 0.0823301]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867169, 0.0473426]\n", "Compute SVD\n", "Print SVs\n", "[0.487983, 0.0841301]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867169, 0.0473426]\n", "Compute SVD\n", "Print SVs\n", "[0.487983, 0.0841301]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868051, 0.0467867]\n", "Compute SVD\n", "Print SVs\n", "[0.477716, 0.0850155]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868051, 0.0467867]\n", "Compute SVD\n", "Print SVs\n", "[0.477716, 0.0850155]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870541, 0.0461407]\n", "Compute SVD\n", "Print SVs\n", "[0.463709, 0.0866219]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870541, 0.0461407]\n", "Compute SVD\n", "Print SVs\n", "[0.463709, 0.0866219]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.874064, 0.0449895]\n", "Compute SVD\n", "Print SVs\n", "[0.444126, 0.0885419]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.874064, 0.0449895]\n", "Compute SVD\n", "Print SVs\n", "[0.444126, 0.0885419]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879608, 0.0430896]\n", "Compute SVD\n", "Print SVs\n", "[0.417286, 0.0908296]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879608, 0.0430896]\n", "Compute SVD\n", "Print SVs\n", "[0.417286, 0.0908296]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.88807, 0.03998]\n", "Compute SVD\n", "Print SVs\n", "[0.38128, 0.0931206]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.88807, 0.03998]\n", "Compute SVD\n", "Print SVs\n", "[0.38128, 0.0931206]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900555, 0.0351595]\n", "Compute SVD\n", "Print SVs\n", "[0.334747, 0.0945879]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900555, 0.0351595]\n", "Compute SVD\n", "Print SVs\n", "[0.334747, 0.0945879]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917642, 0.0283777]\n", "Compute SVD\n", "Print SVs\n", "[0.278062, 0.0936502]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.917642, 0.0283777]\n", "Compute SVD\n", "Print SVs\n", "[0.278062, 0.0936502]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938359, 0.0201887]\n", "Compute SVD\n", "Print SVs\n", "[0.21484, 0.0881783]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938359, 0.0201887]\n", "Compute SVD\n", "Print SVs\n", "[0.21484, 0.0881783]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.959582, 0.0121694]\n", "Compute SVD\n", "Print SVs\n", "[0.152256, 0.0766964]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.959582, 0.0121694]\n", "Compute SVD\n", "Print SVs\n", "[0.152256, 0.0766964]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977324, 0.00606392]\n", "Compute SVD\n", "Print SVs\n", "[0.0985067, 0.0601625]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977324, 0.00606392]\n", "Compute SVD\n", "Print SVs\n", "[0.0985067, 0.0601625]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989237, 0.00249888]\n", "Compute SVD\n", "Print SVs\n", "[0.0586291, 0.0421632]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989237, 0.00249888]\n", "Compute SVD\n", "Print SVs\n", "[0.0586291, 0.0421632]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995667, 0.000872763]\n", "Compute SVD\n", "Print SVs\n", "[0.0326604, 0.0266065]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995667, 0.000872763]\n", "Compute SVD\n", "Print SVs\n", "[0.0326604, 0.0266065]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998495, 0.000268452]\n", "Compute SVD\n", "Print SVs\n", "[0.0173784, 0.0154242]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998495, 0.000268452]\n", "Compute SVD\n", "Print SVs\n", "[0.0173784, 0.0154242]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999536, 7.56837e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00898828, 0.00841635]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999536, 7.56837e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00898828, 0.00841635]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999869, 2.02126e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00457453, 0.00441793]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999869, 2.02126e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00457453, 0.00441793]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999965, 5.23271e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00230814, 0.00226699]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999965, 5.23271e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00230814, 0.00226699]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.33195e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00115939, 0.00114883]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.33195e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00115939, 0.00114883]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.36051e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000581038, 0.000578362]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.36051e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000581039, 0.000578362]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.43882e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000290994, 0.00029]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.43882e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.0002942, 0.00028684]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.32844e-9]\n", "Compute SVD\n", "Print SVs\n", "[0.00027223, 4.87985e-6]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.32843e-9]\n", "Compute SVD\n", "Print SVs\n", "[0.000106404, 1.24849e-5]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.21776e-15]\n", "Compute SVD\n", "Print SVs\n", "[0.000170195, 4.82845e-11]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.2258e-15]\n", "Compute SVD\n", "Print SVs\n", "[1.53051e-7, 5.37454e-8]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.7199e-18]\n", "Compute SVD\n", "Print SVs\n", "[6.82811e-8, 3.98338e-11]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.71991e-18]\n", "Compute SVD\n", "Print SVs\n", "[5.10332e-6, 5.32969e-13]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.77929e-29]\n", "Compute SVD\n", "Print SVs\n", "[7.12024e-14, 9.52115e-16]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 6.76291e-29]\n", "Compute SVD\n", "Print SVs\n", "[5.90305e-7, 1.14566e-22]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.49819e-36]\n", "Compute SVD\n", "Print SVs\n", "[2.05015e-10, 3.65739e-26]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 7.49811e-36]\n", "Compute SVD\n", "Print SVs\n", "[7.93762e-15, 9.4463e-22]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_384 = main(0.384);" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31139, 2.60559e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.848377, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31139, 2.60559e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.848377, 7.85046e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934925, 0.0650749]\n", "Compute SVD\n", "Print SVs\n", "[0.532724, 0.114206]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934925, 0.0650749]\n", "Compute SVD\n", "Print SVs\n", "[0.532724, 0.114206]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842733, 0.0430412]\n", "Compute SVD\n", "Print SVs\n", "[0.49679, 0.0730132]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842733, 0.0430412]\n", "Compute SVD\n", "Print SVs\n", "[0.49679, 0.0730132]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87079, 0.0491162]\n", "Compute SVD\n", "Print SVs\n", "[0.504767, 0.084732]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87079, 0.0491162]\n", "Compute SVD\n", "Print SVs\n", "[0.504767, 0.084732]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863435, 0.047213]\n", "Compute SVD\n", "Print SVs\n", "[0.49777, 0.0818961]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863435, 0.047213]\n", "Compute SVD\n", "Print SVs\n", "[0.49777, 0.0818961]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866469, 0.0475284]\n", "Compute SVD\n", "Print SVs\n", "[0.492959, 0.0835402]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866469, 0.0475284]\n", "Compute SVD\n", "Print SVs\n", "[0.492959, 0.0835402]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866979, 0.0470825]\n", "Compute SVD\n", "Print SVs\n", "[0.484715, 0.0842136]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866979, 0.0470825]\n", "Compute SVD\n", "Print SVs\n", "[0.484715, 0.0842136]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868907, 0.0466305]\n", "Compute SVD\n", "Print SVs\n", "[0.473518, 0.0855672]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868907, 0.0466305]\n", "Compute SVD\n", "Print SVs\n", "[0.473518, 0.0855672]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871536, 0.0458062]\n", "Compute SVD\n", "Print SVs\n", "[0.457744, 0.0872142]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871536, 0.0458062]\n", "Compute SVD\n", "Print SVs\n", "[0.457744, 0.0872142]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.875694, 0.0444507]\n", "Compute SVD\n", "Print SVs\n", "[0.435921, 0.089294]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.875694, 0.0444507]\n", "Compute SVD\n", "Print SVs\n", "[0.435921, 0.089294]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.882096, 0.0421936]\n", "Compute SVD\n", "Print SVs\n", "[0.406167, 0.0916344]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.882096, 0.0421936]\n", "Compute SVD\n", "Print SVs\n", "[0.406167, 0.0916344]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.891813, 0.0385567]\n", "Compute SVD\n", "Print SVs\n", "[0.366682, 0.0937744]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.891813, 0.0385567]\n", "Compute SVD\n", "Print SVs\n", "[0.366682, 0.0937744]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.90585, 0.0330695]\n", "Compute SVD\n", "Print SVs\n", "[0.316524, 0.0946406]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.90585, 0.0330695]\n", "Compute SVD\n", "Print SVs\n", "[0.316524, 0.0946406]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.924389, 0.0256923]\n", "Compute SVD\n", "Print SVs\n", "[0.257017, 0.0924051]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.924389, 0.0256923]\n", "Compute SVD\n", "Print SVs\n", "[0.257017, 0.0924051]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.94572, 0.0173464]\n", "Compute SVD\n", "Print SVs\n", "[0.193072, 0.0849675]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.94572, 0.0173464]\n", "Compute SVD\n", "Print SVs\n", "[0.193072, 0.0849675]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.966175, 0.00981711]\n", "Compute SVD\n", "Print SVs\n", "[0.132648, 0.0715056]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.966175, 0.00981711]\n", "Compute SVD\n", "Print SVs\n", "[0.132648, 0.0715056]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.98206, 0.00457966]\n", "Compute SVD\n", "Print SVs\n", "[0.0832995, 0.053992]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.98206, 0.00457966]\n", "Compute SVD\n", "Print SVs\n", "[0.0832995, 0.053992]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.991956, 0.00177747]\n", "Compute SVD\n", "Print SVs\n", "[0.0483674, 0.0364538]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.991956, 0.00177747]\n", "Compute SVD\n", "Print SVs\n", "[0.0483674, 0.0364538]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.996928, 0.000591831]\n", "Compute SVD\n", "Print SVs\n", "[0.0264682, 0.0222914]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.996928, 0.000591831]\n", "Compute SVD\n", "Print SVs\n", "[0.0264682, 0.0222914]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998979, 0.00017598]\n", "Compute SVD\n", "Print SVs\n", "[0.0139246, 0.0126252]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998979, 0.00017598]\n", "Compute SVD\n", "Print SVs\n", "[0.0139246, 0.0126252]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999695, 4.85529e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00715465, 0.00678413]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999695, 4.85529e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00715465, 0.00678413]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999916, 1.28036e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00362831, 0.00352852]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999916, 1.28036e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00362831, 0.00352852]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999978, 3.29162e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00182729, 0.00180132]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999978, 3.29162e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00182729, 0.00180132]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999994, 8.34783e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000916983, 0.000910352]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999994, 8.34783e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000916983, 0.000910352]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 2.10217e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000459333, 0.000457656]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 2.10217e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000459333, 0.000457656]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.26778e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000237972, 0.000221362]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.26778e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000229778, 0.000229255]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.79511e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.000105675, 2.64501e-6]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.79513e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.000208578, 1.34009e-6]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.8687e-15]\n", "Compute SVD\n", "Print SVs\n", "[7.59644e-8, 3.77637e-8]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 2.8648e-15]\n", "Compute SVD\n", "Print SVs\n", "[0.000148463, 1.92963e-11]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.55367e-19]\n", "Compute SVD\n", "Print SVs\n", "[3.35817e-6, 4.62654e-14]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.55366e-19]\n", "Compute SVD\n", "Print SVs\n", "[2.45734e-8, 6.32255e-12]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.21008e-30]\n", "Compute SVD\n", "Print SVs\n", "[2.87266e-7, 2.85801e-23]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 8.23334e-30]\n", "Compute SVD\n", "Print SVs\n", "[3.35477e-14, 2.45422e-16]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_385 = main(0.385);" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31309, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.851001, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31309, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.851001, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934855, 0.0651447]\n", "Compute SVD\n", "Print SVs\n", "[0.534056, 0.114035]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934855, 0.0651447]\n", "Compute SVD\n", "Print SVs\n", "[0.534056, 0.114035]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842462, 0.0430674]\n", "Compute SVD\n", "Print SVs\n", "[0.498486, 0.0727857]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842462, 0.0430674]\n", "Compute SVD\n", "Print SVs\n", "[0.498486, 0.0727857]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870509, 0.0491983]\n", "Compute SVD\n", "Print SVs\n", "[0.507275, 0.0844267]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870509, 0.0491983]\n", "Compute SVD\n", "Print SVs\n", "[0.507275, 0.0844267]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862959, 0.0473162]\n", "Compute SVD\n", "Print SVs\n", "[0.501278, 0.0814556]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862959, 0.0473162]\n", "Compute SVD\n", "Print SVs\n", "[0.501278, 0.0814556]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865796, 0.0476993]\n", "Compute SVD\n", "Print SVs\n", "[0.497947, 0.0829363]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865796, 0.0476993]\n", "Compute SVD\n", "Print SVs\n", "[0.497947, 0.0829363]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865958, 0.0473499]\n", "Compute SVD\n", "Print SVs\n", "[0.49175, 0.0833819]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865958, 0.0473499]\n", "Compute SVD\n", "Print SVs\n", "[0.49175, 0.0833819]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867365, 0.0470673]\n", "Compute SVD\n", "Print SVs\n", "[0.483418, 0.0844497]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.867365, 0.0470673]\n", "Compute SVD\n", "Print SVs\n", "[0.483418, 0.0844497]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869167, 0.0465284]\n", "Compute SVD\n", "Print SVs\n", "[0.471586, 0.0857552]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869167, 0.0465284]\n", "Compute SVD\n", "Print SVs\n", "[0.471586, 0.0857552]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872029, 0.0456575]\n", "Compute SVD\n", "Print SVs\n", "[0.455084, 0.0874886]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872029, 0.0456575]\n", "Compute SVD\n", "Print SVs\n", "[0.455084, 0.0874886]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.876433, 0.0441965]\n", "Compute SVD\n", "Print SVs\n", "[0.432256, 0.089612]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.876433, 0.0441965]\n", "Compute SVD\n", "Print SVs\n", "[0.432256, 0.089612]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.883239, 0.0417775]\n", "Compute SVD\n", "Print SVs\n", "[0.401234, 0.0919652]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.883239, 0.0417775]\n", "Compute SVD\n", "Print SVs\n", "[0.401234, 0.0919652]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.893509, 0.0379043]\n", "Compute SVD\n", "Print SVs\n", "[0.360268, 0.0940073]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.893509, 0.0379043]\n", "Compute SVD\n", "Print SVs\n", "[0.360268, 0.0940073]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.908202, 0.0321364]\n", "Compute SVD\n", "Print SVs\n", "[0.308642, 0.0945637]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.908202, 0.0321364]\n", "Compute SVD\n", "Print SVs\n", "[0.308642, 0.0945637]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.927291, 0.0245409]\n", "Compute SVD\n", "Print SVs\n", "[0.248124, 0.0917146]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.927291, 0.0245409]\n", "Compute SVD\n", "Print SVs\n", "[0.248124, 0.0917146]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.94875, 0.0161929]\n", "Compute SVD\n", "Print SVs\n", "[0.184154, 0.0834248]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.94875, 0.0161929]\n", "Compute SVD\n", "Print SVs\n", "[0.184154, 0.0834248]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968751, 0.00892228]\n", "Compute SVD\n", "Print SVs\n", "[0.124898, 0.0692042]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968751, 0.00892228]\n", "Compute SVD\n", "Print SVs\n", "[0.124898, 0.0692042]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.983812, 0.00405117]\n", "Compute SVD\n", "Print SVs\n", "[0.0774996, 0.0514273]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.983812, 0.00405117]\n", "Compute SVD\n", "Print SVs\n", "[0.0774996, 0.0514273]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.992909, 0.00153539]\n", "Compute SVD\n", "Print SVs\n", "[0.0445704, 0.0342044]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.992909, 0.00153539]\n", "Compute SVD\n", "Print SVs\n", "[0.0445704, 0.0342044]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997349, 0.000501898]\n", "Compute SVD\n", "Print SVs\n", "[0.0242278, 0.0206609]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.997349, 0.000501898]\n", "Compute SVD\n", "Print SVs\n", "[0.0242278, 0.0206609]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999134, 0.000147356]\n", "Compute SVD\n", "Print SVs\n", "[0.012693, 0.0115991]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999134, 0.000147356]\n", "Compute SVD\n", "Print SVs\n", "[0.012693, 0.0115991]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999745, 4.03346e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00650648, 0.00619756]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999745, 4.03346e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00650648, 0.00619756]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99993, 1.0588e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00329542, 0.00321272]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99993, 1.0588e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00329542, 0.00321272]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999982, 2.71527e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00165855, 0.0016371]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999982, 2.71527e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00165855, 0.0016371]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999995, 6.8772e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000832025, 0.000826558]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999995, 6.8772e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000832025, 0.000826558]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.73068e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000416706, 0.000415322]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 1.73068e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000416749, 0.000415279]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.06415e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000250289, 0.000162378]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.06415e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000232695, 0.000174656]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.42997e-13]\n", "Compute SVD\n", "Print SVs\n", "[0.00024133, 1.42128e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.41357e-13]\n", "Compute SVD\n", "Print SVs\n", "[7.27367e-7, 4.69305e-7]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.6556e-15]\n", "Compute SVD\n", "Print SVs\n", "[2.11362e-6, 2.20266e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.65559e-15]\n", "Compute SVD\n", "Print SVs\n", "[1.30793e-5, 3.55951e-10]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.23077e-25]\n", "Compute SVD\n", "Print SVs\n", "[8.73247e-13, 1.40941e-13]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 1.20054e-25]\n", "Compute SVD\n", "Print SVs\n", "[5.25782e-6, 2.28334e-20]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_386 = main(0.386);" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31479, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.853629, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31479, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.853629, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934787, 0.0652132]\n", "Compute SVD\n", "Print SVs\n", "[0.535387, 0.113862]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934787, 0.0652132]\n", "Compute SVD\n", "Print SVs\n", "[0.535387, 0.113862]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842194, 0.0430918]\n", "Compute SVD\n", "Print SVs\n", "[0.50018, 0.0725573]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.842194, 0.0430918]\n", "Compute SVD\n", "Print SVs\n", "[0.50018, 0.0725573]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870235, 0.0492765]\n", "Compute SVD\n", "Print SVs\n", "[0.509782, 0.0841185]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870235, 0.0492765]\n", "Compute SVD\n", "Print SVs\n", "[0.509782, 0.0841185]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862497, 0.0474117]\n", "Compute SVD\n", "Print SVs\n", "[0.504789, 0.081009]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862497, 0.0474117]\n", "Compute SVD\n", "Print SVs\n", "[0.504789, 0.081009]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865151, 0.0478552]\n", "Compute SVD\n", "Print SVs\n", "[0.502946, 0.0823188]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865151, 0.0478552]\n", "Compute SVD\n", "Print SVs\n", "[0.502946, 0.0823188]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864991, 0.0475879]\n", "Compute SVD\n", "Print SVs\n", "[0.498818, 0.0825212]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864991, 0.0475879]\n", "Compute SVD\n", "Print SVs\n", "[0.498818, 0.0825212]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865924, 0.0474478]\n", "Compute SVD\n", "Print SVs\n", "[0.493404, 0.0832709]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865924, 0.0474478]\n", "Compute SVD\n", "Print SVs\n", "[0.493404, 0.0832709]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86698, 0.047146]\n", "Compute SVD\n", "Print SVs\n", "[0.485633, 0.0841677]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86698, 0.047146]\n", "Compute SVD\n", "Print SVs\n", "[0.485633, 0.0841677]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868675, 0.0466797]\n", "Compute SVD\n", "Print SVs\n", "[0.474726, 0.0854164]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.868675, 0.0466797]\n", "Compute SVD\n", "Print SVs\n", "[0.474726, 0.0854164]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871243, 0.0459031]\n", "Compute SVD\n", "Print SVs\n", "[0.45945, 0.0870449]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.871243, 0.0459031]\n", "Compute SVD\n", "Print SVs\n", "[0.45945, 0.0870449]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.875222, 0.0446086]\n", "Compute SVD\n", "Print SVs\n", "[0.438267, 0.0890838]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.875222, 0.0446086]\n", "Compute SVD\n", "Print SVs\n", "[0.438267, 0.0890838]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.881375, 0.042455]\n", "Compute SVD\n", "Print SVs\n", "[0.409335, 0.0914136]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.881375, 0.042455]\n", "Compute SVD\n", "Print SVs\n", "[0.409335, 0.0914136]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.890735, 0.0389692]\n", "Compute SVD\n", "Print SVs\n", "[0.370822, 0.0936062]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.890735, 0.0389692]\n", "Compute SVD\n", "Print SVs\n", "[0.370822, 0.0936062]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.904339, 0.0336676]\n", "Compute SVD\n", "Print SVs\n", "[0.321652, 0.0946578]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.904339, 0.0336676]\n", "Compute SVD\n", "Print SVs\n", "[0.321652, 0.0946578]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.922494, 0.0264455]\n", "Compute SVD\n", "Print SVs\n", "[0.262872, 0.0928052]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.922494, 0.0264455]\n", "Compute SVD\n", "Print SVs\n", "[0.262872, 0.0928052]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.943698, 0.018122]\n", "Compute SVD\n", "Print SVs\n", "[0.199034, 0.0859233]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.943698, 0.018122]\n", "Compute SVD\n", "Print SVs\n", "[0.199034, 0.0859233]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.964411, 0.010438]\n", "Compute SVD\n", "Print SVs\n", "[0.137921, 0.0729881]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.964411, 0.010438]\n", "Compute SVD\n", "Print SVs\n", "[0.137921, 0.0729881]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.980829, 0.00495812]\n", "Compute SVD\n", "Print SVs\n", "[0.0873138, 0.0556964]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.980829, 0.00495812]\n", "Compute SVD\n", "Print SVs\n", "[0.0873138, 0.0556964]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.991269, 0.00195569]\n", "Compute SVD\n", "Print SVs\n", "[0.051033, 0.0379874]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.991269, 0.00195569]\n", "Compute SVD\n", "Print SVs\n", "[0.051033, 0.0379874]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.996617, 0.000659478]\n", "Compute SVD\n", "Print SVs\n", "[0.0280575, 0.023425]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.996617, 0.000659478]\n", "Compute SVD\n", "Print SVs\n", "[0.0280575, 0.023425]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998862, 0.00019784]\n", "Compute SVD\n", "Print SVs\n", "[0.014804, 0.0133487]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998862, 0.00019784]\n", "Compute SVD\n", "Print SVs\n", "[0.014804, 0.0133487]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999658, 5.48896e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00761933, 0.00720153]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999658, 5.48896e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00761933, 0.00720153]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999905, 1.45217e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00386747, 0.00375447]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999905, 1.45217e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00386747, 0.00375447]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999975, 3.73993e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00194866, 0.00191918]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999975, 3.73993e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00194866, 0.00191918]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999993, 9.49363e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000978125, 0.000970588]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999993, 9.49363e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000978125, 0.000970588]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 2.39185e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000490019, 0.000488113]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 2.39185e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.00049002, 0.000488112]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.99828e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000250029, 0.000239903]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 5.99828e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000249605, 0.000240311]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.80863e-11]\n", "Compute SVD\n", "Print SVs\n", "[0.000249664, 1.5255e-7]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 3.80827e-11]\n", "Compute SVD\n", "Print SVs\n", "[6.44875e-6, 5.90545e-6]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.27363e-14]\n", "Compute SVD\n", "Print SVs\n", "[4.45779e-6, 9.58689e-9]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 4.27361e-14]\n", "Compute SVD\n", "Print SVs\n", "[3.98767e-5, 1.07171e-9]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_387 = main(0.387);" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.3165, 2.6034e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.85626, 7.85046e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.3165, 2.6034e-17]\n", "Compute SVD\n", "Print SVs\n", "[0.85626, 7.85046e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.93472, 0.0652803]\n", "Compute SVD\n", "Print SVs\n", "[0.536716, 0.113689]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.93472, 0.0652803]\n", "Compute SVD\n", "Print SVs\n", "[0.536716, 0.113689]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841931, 0.0431144]\n", "Compute SVD\n", "Print SVs\n", "[0.501872, 0.072328]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841931, 0.0431144]\n", "Compute SVD\n", "Print SVs\n", "[0.501872, 0.072328]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869969, 0.0493506]\n", "Compute SVD\n", "Print SVs\n", "[0.512289, 0.0838073]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.869969, 0.0493506]\n", "Compute SVD\n", "Print SVs\n", "[0.512289, 0.0838073]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86205, 0.0474995]\n", "Compute SVD\n", "Print SVs\n", "[0.508302, 0.0805562]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86205, 0.0474995]\n", "Compute SVD\n", "Print SVs\n", "[0.508302, 0.0805562]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864534, 0.0479956]\n", "Compute SVD\n", "Print SVs\n", "[0.507956, 0.0816879]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864534, 0.0479956]\n", "Compute SVD\n", "Print SVs\n", "[0.507956, 0.0816879]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864078, 0.0477955]\n", "Compute SVD\n", "Print SVs\n", "[0.505916, 0.0816323]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864078, 0.0477955]\n", "Compute SVD\n", "Print SVs\n", "[0.505916, 0.0816323]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864589, 0.047769]\n", "Compute SVD\n", "Print SVs\n", "[0.503465, 0.0820325]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864589, 0.047769]\n", "Compute SVD\n", "Print SVs\n", "[0.503465, 0.0820325]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864995, 0.0476494]\n", "Compute SVD\n", "Print SVs\n", "[0.499862, 0.0824558]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.864995, 0.0476494]\n", "Compute SVD\n", "Print SVs\n", "[0.499862, 0.0824558]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865692, 0.0474877]\n", "Compute SVD\n", "Print SVs\n", "[0.494793, 0.0830847]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.865692, 0.0474877]\n", "Compute SVD\n", "Print SVs\n", "[0.494793, 0.0830847]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866701, 0.0472259]\n", "Compute SVD\n", "Print SVs\n", "[0.487618, 0.0839402]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.866701, 0.0472259]\n", "Compute SVD\n", "Print SVs\n", "[0.487618, 0.0839402]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86823, 0.0468056]\n", "Compute SVD\n", "Print SVs\n", "[0.47751, 0.0851041]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86823, 0.0468056]\n", "Compute SVD\n", "Print SVs\n", "[0.47751, 0.0851041]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870565, 0.0461135]\n", "Compute SVD\n", "Print SVs\n", "[0.463338, 0.0866427]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.870565, 0.0461135]\n", "Compute SVD\n", "Print SVs\n", "[0.463338, 0.0866427]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87417, 0.04496]\n", "Compute SVD\n", "Print SVs\n", "[0.443634, 0.0885927]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.87417, 0.04496]\n", "Compute SVD\n", "Print SVs\n", "[0.443634, 0.0885927]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879753, 0.0430365]\n", "Compute SVD\n", "Print SVs\n", "[0.416612, 0.0908796]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.879753, 0.0430365]\n", "Compute SVD\n", "Print SVs\n", "[0.416612, 0.0908796]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.888294, 0.0398958]\n", "Compute SVD\n", "Print SVs\n", "[0.38039, 0.0931655]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.888294, 0.0398958]\n", "Compute SVD\n", "Print SVs\n", "[0.38039, 0.0931655]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900874, 0.0350337]\n", "Compute SVD\n", "Print SVs\n", "[0.333625, 0.0946001]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.900874, 0.0350337]\n", "Compute SVD\n", "Print SVs\n", "[0.333625, 0.0946001]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.918059, 0.0282119]\n", "Compute SVD\n", "Print SVs\n", "[0.276747, 0.0935878]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.918059, 0.0282119]\n", "Compute SVD\n", "Print SVs\n", "[0.276747, 0.0935878]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938826, 0.0200068]\n", "Compute SVD\n", "Print SVs\n", "[0.213452, 0.087996]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.938826, 0.0200068]\n", "Compute SVD\n", "Print SVs\n", "[0.213452, 0.087996]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.960015, 0.0120125]\n", "Compute SVD\n", "Print SVs\n", "[0.150977, 0.0763838]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.960015, 0.0120125]\n", "Compute SVD\n", "Print SVs\n", "[0.150977, 0.0763838]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977646, 0.00596067]\n", "Compute SVD\n", "Print SVs\n", "[0.097491, 0.059774]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.977646, 0.00596067]\n", "Compute SVD\n", "Print SVs\n", "[0.097491, 0.059774]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989428, 0.00244678]\n", "Compute SVD\n", "Print SVs\n", "[0.0579298, 0.0417904]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.989428, 0.00244678]\n", "Compute SVD\n", "Print SVs\n", "[0.0579298, 0.0417904]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995758, 0.000851856]\n", "Compute SVD\n", "Print SVs\n", "[0.0322322, 0.0263167]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.995758, 0.000851856]\n", "Compute SVD\n", "Print SVs\n", "[0.0322322, 0.0263167]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998531, 0.000261423]\n", "Compute SVD\n", "Print SVs\n", "[0.0171372, 0.0152323]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.998531, 0.000261423]\n", "Compute SVD\n", "Print SVs\n", "[0.0171372, 0.0152323]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999548, 7.35928e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00885945, 0.00830295]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999548, 7.35928e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00885945, 0.00830295]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999872, 1.96369e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00450783, 0.00435563]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999872, 1.96369e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.00450783, 0.00435563]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999966, 5.0812e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00227418, 0.00223422]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999966, 5.0812e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00227418, 0.00223422]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.29305e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00114226, 0.001132]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999991, 1.29305e-6]\n", "Compute SVD\n", "Print SVs\n", "[0.00114226, 0.001132]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.26193e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000572433, 0.000569835]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999998, 3.26193e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.000572433, 0.000569835]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.18983e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000290296, 0.00028212]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 8.18983e-8]\n", "Compute SVD\n", "Print SVs\n", "[0.000288529, 0.000283847]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_388 = main(0.388);" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31822, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.858895, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31822, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.858895, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934654, 0.0653461]\n", "Compute SVD\n", "Print SVs\n", "[0.538042, 0.113515]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934654, 0.0653461]\n", "Compute SVD\n", "Print SVs\n", "[0.538042, 0.113515]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841672, 0.0431351]\n", "Compute SVD\n", "Print SVs\n", "[0.503561, 0.0720977]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841672, 0.0431351]\n", "Compute SVD\n", "Print SVs\n", "[0.503561, 0.0720977]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86971, 0.0494209]\n", "Compute SVD\n", "Print SVs\n", "[0.514794, 0.0834933]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86971, 0.0494209]\n", "Compute SVD\n", "Print SVs\n", "[0.514794, 0.0834933]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861618, 0.0475794]\n", "Compute SVD\n", "Print SVs\n", "[0.511817, 0.0800975]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861618, 0.0475794]\n", "Compute SVD\n", "Print SVs\n", "[0.511817, 0.0800975]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863947, 0.0481204]\n", "Compute SVD\n", "Print SVs\n", "[0.512974, 0.081044]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863947, 0.0481204]\n", "Compute SVD\n", "Print SVs\n", "[0.512974, 0.081044]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863223, 0.0479719]\n", "Compute SVD\n", "Print SVs\n", "[0.513041, 0.0807158]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863223, 0.0479719]\n", "Compute SVD\n", "Print SVs\n", "[0.513041, 0.0807158]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863368, 0.0480281]\n", "Compute SVD\n", "Print SVs\n", "[0.513594, 0.0807367]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863368, 0.0480281]\n", "Compute SVD\n", "Print SVs\n", "[0.513594, 0.0807367]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863233, 0.0480298]\n", "Compute SVD\n", "Print SVs\n", "[0.514248, 0.0806242]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863233, 0.0480298]\n", "Compute SVD\n", "Print SVs\n", "[0.514248, 0.0806242]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863141, 0.0480544]\n", "Compute SVD\n", "Print SVs\n", "[0.515219, 0.0805052]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863141, 0.0480544]\n", "Compute SVD\n", "Print SVs\n", "[0.515219, 0.0805052]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862983, 0.0480819]\n", "Compute SVD\n", "Print SVs\n", "[0.516589, 0.0803228]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862983, 0.0480819]\n", "Compute SVD\n", "Print SVs\n", "[0.516589, 0.0803228]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86277, 0.0481208]\n", "Compute SVD\n", "Print SVs\n", "[0.518543, 0.0800652]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86277, 0.0481208]\n", "Compute SVD\n", "Print SVs\n", "[0.518543, 0.0800652]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862473, 0.0481715]\n", "Compute SVD\n", "Print SVs\n", "[0.521327, 0.079694]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862473, 0.0481715]\n", "Compute SVD\n", "Print SVs\n", "[0.521327, 0.079694]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862066, 0.0482353]\n", "Compute SVD\n", "Print SVs\n", "[0.525297, 0.079159]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862066, 0.0482353]\n", "Compute SVD\n", "Print SVs\n", "[0.525297, 0.079159]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86152, 0.0483085]\n", "Compute SVD\n", "Print SVs\n", "[0.530964, 0.0783834]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86152, 0.0483085]\n", "Compute SVD\n", "Print SVs\n", "[0.530964, 0.0783834]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86081, 0.0483767]\n", "Compute SVD\n", "Print SVs\n", "[0.539059, 0.0772515]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86081, 0.0483767]\n", "Compute SVD\n", "Print SVs\n", "[0.539059, 0.0772515]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859943, 0.0483989]\n", "Compute SVD\n", "Print SVs\n", "[0.550637, 0.0755856]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859943, 0.0483989]\n", "Compute SVD\n", "Print SVs\n", "[0.550637, 0.0755856]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859012, 0.048275]\n", "Compute SVD\n", "Print SVs\n", "[0.567208, 0.0731103]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859012, 0.048275]\n", "Compute SVD\n", "Print SVs\n", "[0.567208, 0.0731103]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858333, 0.0477762]\n", "Compute SVD\n", "Print SVs\n", "[0.590905, 0.0693984]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858333, 0.0477762]\n", "Compute SVD\n", "Print SVs\n", "[0.590905, 0.0693984]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858748, 0.0464117]\n", "Compute SVD\n", "Print SVs\n", "[0.624625, 0.0638078]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858748, 0.0464117]\n", "Compute SVD\n", "Print SVs\n", "[0.624625, 0.0638078]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862198, 0.0432281]\n", "Compute SVD\n", "Print SVs\n", "[0.671895, 0.0554718]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862198, 0.0432281]\n", "Compute SVD\n", "Print SVs\n", "[0.671895, 0.0554718]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872487, 0.0367493]\n", "Compute SVD\n", "Print SVs\n", "[0.735699, 0.0435821]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872487, 0.0367493]\n", "Compute SVD\n", "Print SVs\n", "[0.735699, 0.0435821]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.89485, 0.0259312]\n", "Compute SVD\n", "Print SVs\n", "[0.81474, 0.0284809]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.89485, 0.0259312]\n", "Compute SVD\n", "Print SVs\n", "[0.81474, 0.0284809]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.930644, 0.0129772]\n", "Compute SVD\n", "Print SVs\n", "[0.897012, 0.0134638]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.930644, 0.0129772]\n", "Compute SVD\n", "Print SVs\n", "[0.897012, 0.0134638]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968577, 0.00374325]\n", "Compute SVD\n", "Print SVs\n", "[0.960085, 0.00377636]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968577, 0.00374325]\n", "Compute SVD\n", "Print SVs\n", "[0.960085, 0.00377636]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99178, 0.000498602]\n", "Compute SVD\n", "Print SVs\n", "[0.990734, 0.000499128]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99178, 0.000498602]\n", "Compute SVD\n", "Print SVs\n", "[0.990734, 0.000499128]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99897, 2.40847e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.998922, 2.40859e-5]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99897, 2.40847e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.998922, 2.40859e-5]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.3342e-14]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.32635e-14]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.33027e-14]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.3185e-14]\n", "Compute new tensor\n", "\n" ] } ], "source": [ "res0_389 = main(0.389);" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Iteration 1\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31822, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.858895, 3.92523e-17]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.31822, 0.0]\n", "Compute SVD\n", "Print SVs\n", "[0.858895, 3.92523e-17]\n", "Compute new tensor\n", "\n", "Iteration 2\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934654, 0.0653461]\n", "Compute SVD\n", "Print SVs\n", "[0.538042, 0.113515]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.934654, 0.0653461]\n", "Compute SVD\n", "Print SVs\n", "[0.538042, 0.113515]\n", "Compute new tensor\n", "\n", "Iteration 3\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841672, 0.0431351]\n", "Compute SVD\n", "Print SVs\n", "[0.503561, 0.0720977]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.841672, 0.0431351]\n", "Compute SVD\n", "Print SVs\n", "[0.503561, 0.0720977]\n", "Compute new tensor\n", "\n", "Iteration 4\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86971, 0.0494209]\n", "Compute SVD\n", "Print SVs\n", "[0.514794, 0.0834933]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86971, 0.0494209]\n", "Compute SVD\n", "Print SVs\n", "[0.514794, 0.0834933]\n", "Compute new tensor\n", "\n", "Iteration 5\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861618, 0.0475794]\n", "Compute SVD\n", "Print SVs\n", "[0.511817, 0.0800975]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.861618, 0.0475794]\n", "Compute SVD\n", "Print SVs\n", "[0.511817, 0.0800975]\n", "Compute new tensor\n", "\n", "Iteration 6\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863947, 0.0481204]\n", "Compute SVD\n", "Print SVs\n", "[0.512974, 0.081044]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863947, 0.0481204]\n", "Compute SVD\n", "Print SVs\n", "[0.512974, 0.081044]\n", "Compute new tensor\n", "\n", "Iteration 7\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863223, 0.0479719]\n", "Compute SVD\n", "Print SVs\n", "[0.513041, 0.0807158]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863223, 0.0479719]\n", "Compute SVD\n", "Print SVs\n", "[0.513041, 0.0807158]\n", "Compute new tensor\n", "\n", "Iteration 8\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863368, 0.0480281]\n", "Compute SVD\n", "Print SVs\n", "[0.513594, 0.0807367]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863368, 0.0480281]\n", "Compute SVD\n", "Print SVs\n", "[0.513594, 0.0807367]\n", "Compute new tensor\n", "\n", "Iteration 9\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863233, 0.0480298]\n", "Compute SVD\n", "Print SVs\n", "[0.514248, 0.0806242]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863233, 0.0480298]\n", "Compute SVD\n", "Print SVs\n", "[0.514248, 0.0806242]\n", "Compute new tensor\n", "\n", "Iteration 10\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863141, 0.0480544]\n", "Compute SVD\n", "Print SVs\n", "[0.515219, 0.0805052]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.863141, 0.0480544]\n", "Compute SVD\n", "Print SVs\n", "[0.515219, 0.0805052]\n", "Compute new tensor\n", "\n", "Iteration 11\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862983, 0.0480819]\n", "Compute SVD\n", "Print SVs\n", "[0.516589, 0.0803228]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862983, 0.0480819]\n", "Compute SVD\n", "Print SVs\n", "[0.516589, 0.0803228]\n", "Compute new tensor\n", "\n", "Iteration 12\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86277, 0.0481208]\n", "Compute SVD\n", "Print SVs\n", "[0.518543, 0.0800652]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86277, 0.0481208]\n", "Compute SVD\n", "Print SVs\n", "[0.518543, 0.0800652]\n", "Compute new tensor\n", "\n", "Iteration 13\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862473, 0.0481715]\n", "Compute SVD\n", "Print SVs\n", "[0.521327, 0.079694]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862473, 0.0481715]\n", "Compute SVD\n", "Print SVs\n", "[0.521327, 0.079694]\n", "Compute new tensor\n", "\n", "Iteration 14\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862066, 0.0482353]\n", "Compute SVD\n", "Print SVs\n", "[0.525297, 0.079159]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862066, 0.0482353]\n", "Compute SVD\n", "Print SVs\n", "[0.525297, 0.079159]\n", "Compute new tensor\n", "\n", "Iteration 15\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86152, 0.0483085]\n", "Compute SVD\n", "Print SVs\n", "[0.530964, 0.0783834]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86152, 0.0483085]\n", "Compute SVD\n", "Print SVs\n", "[0.530964, 0.0783834]\n", "Compute new tensor\n", "\n", "Iteration 16\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86081, 0.0483767]\n", "Compute SVD\n", "Print SVs\n", "[0.539059, 0.0772515]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.86081, 0.0483767]\n", "Compute SVD\n", "Print SVs\n", "[0.539059, 0.0772515]\n", "Compute new tensor\n", "\n", "Iteration 17\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859943, 0.0483989]\n", "Compute SVD\n", "Print SVs\n", "[0.550637, 0.0755856]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859943, 0.0483989]\n", "Compute SVD\n", "Print SVs\n", "[0.550637, 0.0755856]\n", "Compute new tensor\n", "\n", "Iteration 18\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859012, 0.048275]\n", "Compute SVD\n", "Print SVs\n", "[0.567208, 0.0731103]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.859012, 0.048275]\n", "Compute SVD\n", "Print SVs\n", "[0.567208, 0.0731103]\n", "Compute new tensor\n", "\n", "Iteration 19\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858333, 0.0477762]\n", "Compute SVD\n", "Print SVs\n", "[0.590905, 0.0693984]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858333, 0.0477762]\n", "Compute SVD\n", "Print SVs\n", "[0.590905, 0.0693984]\n", "Compute new tensor\n", "\n", "Iteration 20\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858748, 0.0464117]\n", "Compute SVD\n", "Print SVs\n", "[0.624625, 0.0638078]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.858748, 0.0464117]\n", "Compute SVD\n", "Print SVs\n", "[0.624625, 0.0638078]\n", "Compute new tensor\n", "\n", "Iteration 21\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862198, 0.0432281]\n", "Compute SVD\n", "Print SVs\n", "[0.671895, 0.0554718]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.862198, 0.0432281]\n", "Compute SVD\n", "Print SVs\n", "[0.671895, 0.0554718]\n", "Compute new tensor\n", "\n", "Iteration 22\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872487, 0.0367493]\n", "Compute SVD\n", "Print SVs\n", "[0.735699, 0.0435821]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.872487, 0.0367493]\n", "Compute SVD\n", "Print SVs\n", "[0.735699, 0.0435821]\n", "Compute new tensor\n", "\n", "Iteration 23\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.89485, 0.0259312]\n", "Compute SVD\n", "Print SVs\n", "[0.81474, 0.0284809]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.89485, 0.0259312]\n", "Compute SVD\n", "Print SVs\n", "[0.81474, 0.0284809]\n", "Compute new tensor\n", "\n", "Iteration 24\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.930644, 0.0129772]\n", "Compute SVD\n", "Print SVs\n", "[0.897012, 0.0134638]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.930644, 0.0129772]\n", "Compute SVD\n", "Print SVs\n", "[0.897012, 0.0134638]\n", "Compute new tensor\n", "\n", "Iteration 25\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968577, 0.00374325]\n", "Compute SVD\n", "Print SVs\n", "[0.960085, 0.00377636]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.968577, 0.00374325]\n", "Compute SVD\n", "Print SVs\n", "[0.960085, 0.00377636]\n", "Compute new tensor\n", "\n", "Iteration 26\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99178, 0.000498602]\n", "Compute SVD\n", "Print SVs\n", "[0.990734, 0.000499128]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99178, 0.000498602]\n", "Compute SVD\n", "Print SVs\n", "[0.990734, 0.000499128]\n", "Compute new tensor\n", "\n", "Iteration 27\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99897, 2.40847e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.998922, 2.40859e-5]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.99897, 2.40847e-5]\n", "Compute SVD\n", "Print SVs\n", "[0.998922, 2.40859e-5]\n", "Compute new tensor\n", "\n", "Iteration 28\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute SVD\n", "Print SVs\n", "[0.999951, 3.04152e-7]\n", "Compute new tensor\n", "\n", "Iteration 29\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute SVD\n", "Print SVs\n", "[0.999999, 6.11033e-10]\n", "Compute new tensor\n", "\n", "Iteration 30\n", "Compute first SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.3342e-14]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.32635e-14]\n", "Compute second SVD\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.33027e-14]\n", "Compute SVD\n", "Print SVs\n", "[1.0, 9.3185e-14]\n", "Compute new tensor\n", "\n", " 0.025338 seconds (42.32 k allocations: 1.296 MiB)\n" ] } ], "source": [ "@time main(0.389);" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "11-element Array{Array{Float64,1},1}:\n", " [0.641077, 0.56242, 0.578431, 0.564273, 0.55457, 0.53805, 0.515736, 0.48475, 0.443015, 0.388859 … 0.00140255, 0.000703236, 0.000352251, 0.000301311, 0.000208521, 3.2873e-7, 3.56275e-13, 8.25741e-10, 2.24649e-11, 8.4163e-25] \n", " [0.642253, 0.563902, 0.580652, 0.567357, 0.558954, 0.5442, 0.524311, 0.496515, 0.458736, 0.408942 … 0.00177802, 0.000892153, 0.000446873, 0.000238757, 0.000248637, 1.83392e-5, 3.50497e-12, 5.94049e-12, 1.56916e-10, 6.02318e-17]\n", " [0.643427, 0.565382, 0.582869, 0.570439, 0.56334, 0.550365, 0.532938, 0.508432, 0.474844, 0.429915 … 0.00232625, 0.0011685, 0.00058561, 0.000294803, 0.000281955, 2.31804e-7, 6.1861e-8, 6.03979e-7, 2.53106e-10, 1.7579e-26] \n", " [0.644597, 0.566859, 0.585082, 0.573518, 0.567727, 0.556543, 0.541614, 0.520488, 0.491314, 0.45175 … 0.00317181, 0.00159587, 0.000800471, 0.000400942, 0.000298186, 0.000237573, 4.78389e-7, 1.56273e-12, 2.1313e-9, 5.67708e-11] \n", " [0.645765, 0.568332, 0.587292, 0.576593, 0.572113, 0.562731, 0.550331, 0.532668, 0.508116, 0.4744 … 0.00457513, 0.00230822, 0.0011594, 0.00058104, 0.000290994, 0.00027223, 0.000170195, 6.82811e-8, 7.12024e-14, 2.05015e-10] \n", " [0.646929, 0.569803, 0.589499, 0.579666, 0.576499, 0.568929, 0.559085, 0.544958, 0.525215, 0.497801 … 0.00715683, 0.00362862, 0.00182734, 0.000916988, 0.000459333, 0.000237972, 0.000105675, 7.59644e-8, 3.35817e-6, 2.87266e-7] \n", " [0.648091, 0.571272, 0.591702, 0.582734, 0.580883, 0.575132, 0.567868, 0.557341, 0.542572, 0.521868 … 0.012704, 0.00650814, 0.00329565, 0.00165858, 0.000832029, 0.000416707, 0.000250289, 0.00024133, 2.11362e-6, 8.73247e-13] \n", " [0.649249, 0.572737, 0.593901, 0.585798, 0.585265, 0.581339, 0.576675, 0.5698, 0.560143, 0.546495 … 0.0281527, 0.0148209, 0.00762194, 0.00386784, 0.00194871, 0.000978132, 0.00049002, 0.000250029, 0.000249664, 4.45779e-6] \n", " [0.650405, 0.5742, 0.596096, 0.588859, 0.589644, 0.587548, 0.585498, 0.582317, 0.577878, 0.571558 … 0.0997202, 0.0585488, 0.0323695, 0.0171624, 0.00886346, 0.0045084, 0.00227426, 0.00114227, 0.000572435, 0.000290296] \n", " [0.651557, 0.575659, 0.598287, 0.591914, 0.594018, 0.593756, 0.594331, 0.594873, 0.595724, 0.596911 … 0.779281, 0.843221, 0.910476, 0.963862, 0.991233, 0.998946, 0.999951, 0.999999, 1.0, 1.0] \n", " [0.652707, 0.577116, 0.600474, 0.594965, 0.598388, 0.599961, 0.603167, 0.607447, 0.613624, 0.622394 … 0.99984, 0.999997, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] " ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y = [res0_38[:,2],res0_381[:,2],res0_382[:,2],res0_383[:,2],res0_384[:,2],\n", " res0_385[:,2],res0_386[:,2],res0_387[:,2],res0_388[:,2],res0_389[:,2],res0_39[:,2]]" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "5\n", "\n", "\n", "10\n", "\n", "\n", "15\n", "\n", "\n", "20\n", "\n", "\n", "25\n", "\n", "\n", "30\n", "\n", "\n", "0.00\n", "\n", "\n", "0.25\n", "\n", "\n", "0.50\n", "\n", "\n", "0.75\n", "\n", "\n", "1.00\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "y1\n", "\n", "\n", "\n", "y2\n", "\n", "\n", "\n", "y3\n", "\n", "\n", "\n", "y4\n", "\n", "\n", "\n", "y5\n", "\n", "\n", "\n", "y6\n", "\n", "\n", "\n", "y7\n", "\n", "\n", "\n", "y8\n", "\n", "\n", "\n", "y9\n", "\n", "\n", "\n", "y10\n", "\n", "\n", "\n", "y11\n", "\n", "\n" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plot(res0_39[:,1],y)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Julia 1.0.1", "language": "julia", "name": "julia-1.0" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.0.1" } }, "nbformat": 4, "nbformat_minor": 2 }