Docstrings
Tensor Train Vector (TTvector)
TensorTrainNumerics.TTvector — Type
A structure representing a Tensor Train (TT) vector.
Fields
N::Int64: The number of elements in the TT vector.ttv_vec::Vector{Array{T,3}}: A vector of 3-dimensional arrays representing the TT d.ttv_dims::NTuple{M,Int64}: A tuple containing the dimensions of the TT vector.ttv_rks::Vector{Int64}: A vector containing the TT ranks.ttv_ot::Vector{Int64}: A vector containing the orthogonalization information.
Type Parameters
T<:Number: The type of the elements in the TT vector.
Tensor Train Operator (TToperator)
TensorTrainNumerics.TToperator — Type
A structure representing a Tensor Train (TT) operator.
Fields
N::Int64: The number of dimensions of the TT operator.tto_vec::Array{Array{T,4},1}: A vector of 4-dimensional arrays representing the TT d.tto_dims::NTuple{M,Int64}: A tuple containing the dimensions of the TT operator.tto_rks::Array{Int64,1}: An array containing the TT ranks.tto_ot::Array{Int64,1}: An array containing the output dimensions of the TT operator.
Type Parameters
T<:Number: The type of the elements in the TT vector.
QTT Tools
TensorTrainNumerics.qtt_exp — Function
Constructs a Quantized Tensor Train (QTT) representation of the exponential function over a uniform grid in the interval [a, b] with 2^d points.
TensorTrainNumerics.qtt_sin — Function
Constructs a Quantized Tensor Train (QTT) representation of sin(λπx) over a uniform grid in the interval [a, b] with 2^d points.
TensorTrainNumerics.qtt_cos — Function
Constructs a Quantized Tensor Train (QTT) representation of cos(λπx) over a uniform grid in the interval [a, b] with 2^d points.
TensorTrainNumerics.qtt_polynom — Function
Constructs a Quantized Tensor Train (QTT) representation a polynomial with given coefficients over a uniform grid in the interval [a, b] with 2^d points.
TensorTrainNumerics.qtt_chebyshev — Function
Constructs a Quantized Tensor Train (QTT) representation of the Chebyshev polynomial of degree n over 2^d Chebyshev-Lobatto nodes.
Details
- The function uses the Gauss-Chebyshev-Lobatto nodes, shifted to the interval [0, 1].
TensorTrainNumerics.qtt_to_function — Function
Converts a quantized tensor train (QTT) vector qtt into a function representation.
TensorTrainNumerics.function_to_qtt — Function
Converts a univariate function f into its Quantized Tensor Train (QTT) representation.
TensorTrainNumerics.qtto_to_matrix — Function
Converts a quantics tensor train operator (TToperator) into its full matrix representation.
Operators
TensorTrainNumerics.toeplitz_to_qtto — Function
Constructs a tensor train operator (TTO) representation of a Toeplitz matrix parameterized by α, β, and γ over d dimensions.
TensorTrainNumerics.shift — Function
Constructs a tensor train operator (TTO) representation of the shift matrix
TensorTrainNumerics.∇ — Function
Constructs a tensor train operator (TTO) representation of the gradient matrix
TensorTrainNumerics.Δ — Function
Constructs a tensor train operator (TTO) representation of the Laplacian with Dirichlet-Dirichlet boundary conditions
TensorTrainNumerics.Δ_DN — Function
Constructs a tensor train operator (TTO) representation of the Laplacian with Dirichlet-Neumann boundary conditions
TensorTrainNumerics.Δ_ND — Function
Constructs a tensor train operator (TTO) representation of the Laplacian with Neumann-Dirichlet boundary conditions
TensorTrainNumerics.Δ_NN — Function
Constructs a tensor train operator (TTO) representation of the Laplacian with Neumann-Neumann boundary conditions
TensorTrainNumerics.Δ_P — Function
Constructs a tensor train operator (TTO) representation of the Laplacian with periodic boundary conditions
TensorTrainNumerics.Δ⁻¹_DN — Function
Constructs a tensor train operator (TTO) representation of the inverse Laplacian with Dirichlet-Neumann boundary conditions
TensorTrainNumerics.qtto_prolongation — Function
Constructs a tensor train operator (TTO) representation of the prolongation operator for multigrid methods
TensorTrainNumerics.id_tto — Function
id_tto(d; n_dim=2)Create an identity tensor train operator (TTO) of dimension d with optional keyword argument n_dim specifying the number of dimensions (default is 2).
Arguments
d::Int: The dimension of the identity tensor train operator.n_dim::Int: The number of dimensions of the identity tensor train operator (default is 2).
Returns
- An identity tensor train operator of the specified dimension and number of dimensions.
Operations
LinearAlgebra.dot — Function
dot(x, y)
x ⋅ yCompute the dot product between two vectors. For complex vectors, the first vector is conjugated.
dot also works on arbitrary iterable objects, including arrays of any dimension, as long as dot is defined on the elements.
dot is semantically equivalent to sum(dot(vx,vy) for (vx,vy) in zip(x, y)), with the added restriction that the arguments must have equal lengths.
x ⋅ y (where ⋅ can be typed by tab-completing \cdot in the REPL) is a synonym for dot(x, y).
Examples
julia> dot([1; 1], [2; 3])
5
julia> dot([im; im], [1; 1])
0 - 2im
julia> dot(1:5, 2:6)
70
julia> x = fill(2., (5,5));
julia> y = fill(3., (5,5));
julia> dot(x, y)
150.0TensorTrainNumerics.ttv_to_diag_tto — Function
Creates a diagonal TToperator from a TTvector.
TensorTrainNumerics.hadamard — Function
Computes the Hadamard product (element-wise multiplication) of two TTvectors and returns a new TTvector.