Skip to main content

quantics_fourier_operator

Function quantics_fourier_operator 

Source
pub fn quantics_fourier_operator(
    r: usize,
    options: FourierOptions,
) -> Result<LinearOperator<TensorDynLen, usize>>
Expand description

Create a Quantics Fourier Transform operator.

This implements the Chen & Lindsey construction of the DFT as a matrix product operator. The resulting operator transforms a quantics tensor train representing a function to its Fourier transform in quantics tensor train form.

§Index ordering

Before the Fourier transform, the leftmost index corresponds to the most significant bit (largest length scale). After transformation, the leftmost index corresponds to the least significant bit (smallest length scale) - this allows for a small bond dimension construction.

§Arguments

  • r - Number of bits
  • options - Fourier transform options

§Returns

LinearOperator representing the QFT

§Examples

use tensor4all_quanticstransform::{quantics_fourier_operator, FourierOptions};

// Create a forward QFT operator for 4-bit quantics representation
let op = quantics_fourier_operator(4, FourierOptions::forward()).unwrap();

// The operator has one MPO tensor per bit
assert_eq!(op.mpo.node_count(), 4);