pdft.manifolds.classify_manifold#
- pdft.manifolds.classify_manifold(t)[source]#
Return the manifold appropriate to
tbased on its shape and unitarity.rank-2 unitary (d × d) →
UnitaryManifold(d=d)(2, 2, 2, 2) tensor whose 4×4 reshape is unitary →
Unitary2qManifoldotherwise →
PhaseManifold
Note:
OrthogonalManifoldandOrthogonal2qManifoldare defined in this module for callers that want an explicit O(d) constraint, but nothing selects them: not this function, and no basis or trainer in the package. A basis whose tensors are all exactly real stays real throughUnitaryManifoldunder a real objective (the Cayley retraction with a realWpreserves it), which is howRealRichBasistrains. One complex tensor in the circuit is enough to make the others complex.- Parameters:
t (Array)
- Return type: