Skip to content

docs(itensorlike): improve documentation — layout, Complex64, API conventions #355

@shinaoka

Description

@shinaoka

Summary

Several documentation gaps identified during feature testing of tensor4all-itensorlike.

Issues

Missing documentation

  1. Column-major data layout not mentioned in crate README. Users need to know TensorDynLen::from_dense expects column-major data.
  2. No Complex64 examples in README — all examples use f64 only.
  3. Inner product conjugation convention (inner() computes <self|other> with conjugation on self) not prominently documented.
  4. with_nsweeps() convenience method not mentioned in README alongside with_nhalfsweeps().

API discoverability

  1. IndexLike trait must be imported for .dim() on DynIndex — consider re-exporting from tensor4all_itensorlike.
  2. DynIndex::new_bond vs new_dyn asymmetry (one returns Result, the other doesn't) unexplained.
  3. Relationship between CanonicalForm and TruncateAlg undocumented — truncate() implicitly sets canonical form based on algorithm.

Missing "Getting Started" content

  1. Add a complete import list example including tensor4all_core::{DynIndex, TensorDynLen, TensorLike, AnyScalar}.
  2. Show inner product workflow in README example.

Found by

Automated feature test (test-feature-20260327-itensorlike)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions