Skip to main content

Crate tensor4all_quanticstransform

Crate tensor4all_quanticstransform 

Source
Expand description

Quantics transformation operators for tensor train methods.

This crate provides LinearOperator constructors for various transformations in Quantics representation. It is a Rust port of transformation functionality from Quantics.jl.

§Overview

All transformations return LinearOperator from tensor4all-treetn for consistent operator application to tensor train states.

§Available Transformations

  • Flip: f(x) = g(2^R - x)
  • Shift: f(x) = g(x + offset) mod 2^R
  • Phase Rotation: f(x) = exp(iθx) * g(x)
  • Cumulative Sum: y_i = Σ_{j<i} x_j
  • Fourier Transform: Quantics Fourier Transform (QFT)
  • Affine Transform: y = A*x + b with rational coefficients

§Example

use tensor4all_quanticstransform::{flip_operator, BoundaryCondition};

// Create a flip operator for 8-bit quantics representation
let op = flip_operator(8, BoundaryCondition::Periodic).unwrap();
assert_eq!(op.mpo.node_count(), 8);

Structs§

AffineParams
Affine transformation parameters.
FTCore
Convenience wrapper for forward/backward Fourier transform.
FourierOptions
Options for Fourier transform construction.
UnfusedTensorInfo
Information about the unfused tensor structure.

Enums§

BoundaryCondition
Boundary condition for quantics transformations.
CarryDirection
Direction for carry propagation in binary arithmetic operations.
TriangleType
Type of triangular matrix for cumsum-like operators.

Functions§

affine_operator
Create the operator that realizes the coordinate map y = A * x + b.
affine_transform_matrix
Compute the full affine transformation matrix directly (for verification).
affine_transform_tensors_unfused
Create unfused affine transformation tensors.
cumsum_operator
Create a cumulative sum operator: y_i = Σ_{j < i} x_j
flip_operator
Create a flip operator: f(x) = g(2^R - x)
flip_operator_multivar
Create a flip operator for one variable in a multi-variable system.
phase_rotation_operator
Create a phase rotation operator: f(x) = exp(iθx) * g(x)
phase_rotation_operator_multivar
Create a phase rotation operator for one variable in a multi-variable system.
quantics_fourier_operator
Create a Quantics Fourier Transform operator.
shift_operator
Create a shift operator: f(x) = g(x + offset) mod 2^R
shift_operator_multivar
Create a shift operator for one variable in a multi-variable system.
triangle_operator
Create a triangular matrix operator with the specified triangle type.