pdft.manifolds.UnitaryManifold#

class pdft.manifolds.UnitaryManifold(d=2)[source]#

Bases: object

U(d) unitary group manifold; tensors are d × d unitary matrices.

The d field defaults to 2 for backward compatibility with all pre-RichBasis call sites. Setting d is what makes U(2) and U(4) bucket into separate groups in group_by_manifold (without it, stack_tensors would try to stack mismatched shapes).

Mirror of upstream src/manifolds.jl:161-196.

Parameters:

d (int)

__init__(d=2)#
Parameters:

d (int)

Return type:

None

Methods

__init__([d])

project(U, G)

U * skew(U^H G) on (d, d, n).

retract(U, Xi, alpha, *[, I_batch])

Cayley retraction: (I - a/2 W)^{-1} (I + a/2 W) U, W = skew(Xi U^H).

transport(U_old, U_new, v)

Parallel transport via re-projection.

Attributes

d

d: int = 2#
project(U, G)[source]#

U * skew(U^H G) on (d, d, n).

Parameters:
Return type:

Array

retract(U, Xi, alpha, *, I_batch=None)[source]#

Cayley retraction: (I - a/2 W)^{-1} (I + a/2 W) U, W = skew(Xi U^H).

Mirror of upstream src/manifolds.jl:173-193. I_batch pre-allocates the batched identity; created on demand if None.

Parameters:
Return type:

Array

transport(U_old, U_new, v)[source]#

Parallel transport via re-projection. Upstream src/manifolds.jl:196.

Parameters:
Return type:

Array