Skip to content

tensor4all/quanticsgrids-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

quanticsgrids

Grid structures for efficient conversion between quantics representation, grid indices, and original coordinates. This is a Rust port of QuanticsGrids.jl.

Documentation

Features

  • InherentDiscreteGrid: Low-level grid for integer coordinates
  • DiscretizedGrid: High-level grid for continuous domains
  • UnfoldingScheme: Fused (default) or Interleaved index ordering
  • Efficient O(R * D) coordinate conversions

Usage

use quanticsgrids::{DiscretizedGrid, UnfoldingScheme};

// Create a 2D grid with 3 bits for x and 2 bits for y
let grid = DiscretizedGrid::builder(&[3, 2])
    .with_lower_bound(&[0.0, 0.0])
    .with_upper_bound(&[1.0, 2.0])
    .build()?;

// Convert coordinates to quantics indices
let quantics = grid.origcoord_to_quantics(&[0.5, 1.0])?;

// Convert back to coordinates
let coords = grid.quantics_to_origcoord(&quantics)?;

// Get local dimensions for TCI
let local_dims = grid.local_dimensions();

Coordinate Conversions

From To Method
Original coordinates Quantics indices origcoord_to_quantics()
Quantics indices Original coordinates quantics_to_origcoord()
Grid indices Quantics indices grididx_to_quantics()
Quantics indices Grid indices quantics_to_grididx()

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license

About

Quantics grid structures for efficient conversion between quantics, grid indices, and original coordinates

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors