Description
There is no public API to convert between TensorTrain<Complex64> (simplett) and TreeTN<TensorDynLen, usize> (treetn). This is the single largest usability barrier for the quanticstransform crate.
Every user who wants to apply a quantics operator must write ~100 lines of boilerplate to:
- Convert
TensorTrain to TreeTN (construct TensorDynLen with column-major layout, handle boundary tensors, create Index objects)
- Remap site indices to match operator input indices via
get_input_mapping
- Apply the operator
- Extract results from the output TreeTN
The integration test (crates/tensor4all-quanticstransform/tests/integration_test.rs) contains helper functions (tensortrain_to_treetn, contract_treetn_to_vector) that are copy-pasted by every user.
Additional gaps
- No
TensorTrain<f64> -> TensorTrain<Complex64> conversion (TCI produces f64, operators require Complex64)
- No
QuanticsOperator re-export from quanticstransform lib.rs
Suggested API
// In tensor4all-treetn or a bridging crate:
pub fn tensortrain_to_treetn(tt: &TensorTrain<Complex64>) -> (TreeTN<TensorDynLen, usize>, Vec<Index>);
// High-level convenience:
pub fn apply_operator_to_tensortrain(op: &QuanticsOperator, tt: &TensorTrain<Complex64>) -> Result<TensorTrain<Complex64>>;
Found by
Reported by 5 out of 6 automated test personas as the primary friction point.
Description
There is no public API to convert between
TensorTrain<Complex64>(simplett) andTreeTN<TensorDynLen, usize>(treetn). This is the single largest usability barrier for thequanticstransformcrate.Every user who wants to apply a quantics operator must write ~100 lines of boilerplate to:
TensorTraintoTreeTN(constructTensorDynLenwith column-major layout, handle boundary tensors, createIndexobjects)get_input_mappingThe integration test (
crates/tensor4all-quanticstransform/tests/integration_test.rs) contains helper functions (tensortrain_to_treetn,contract_treetn_to_vector) that are copy-pasted by every user.Additional gaps
TensorTrain<f64>->TensorTrain<Complex64>conversion (TCI produces f64, operators require Complex64)QuanticsOperatorre-export fromquanticstransformlib.rsSuggested API
Found by
Reported by 5 out of 6 automated test personas as the primary friction point.