pdft.manifolds.classify_manifold

pdft.manifolds.classify_manifold#

pdft.manifolds.classify_manifold(t)[source]#

Return the manifold appropriate to t based on its shape and unitarity.

  • rank-2 unitary (d × d) → UnitaryManifold(d=d)

  • (2, 2, 2, 2) tensor whose 4×4 reshape is unitary → Unitary2qManifold

  • otherwise → PhaseManifold

Note: OrthogonalManifold and Orthogonal2qManifold are defined in this module for clients that want explicit O(d) constraints, but they are NOT auto-selected — selection is the basis class’s responsibility. Real-valued tensors going through UnitaryManifold stay real automatically (Cayley retraction with real W preserves real-ness).

Parameters:

t (Array)

Return type:

AbstractRiemannianManifold