pdft.manifolds.EuclideanManifold#

class pdft.manifolds.EuclideanManifold(shape)[source]#

Bases: object

Flat space: arrays of shape whose entries are free numbers.

Not in upstream. The tangent space at every point is the space itself, so there is nothing to project onto, nothing to retract to and nothing to transport: a step is points + alpha * tangent. On real parameters RiemannianAdam is then Adam as Kingma and Ba state it. (A complex array is not treated as two real ones: its real and imaginary parts share one second moment.) It is the geometry of parameters that are not gate tensors, such as the angles a ParameterView reads off the controlled-phase gates.

classify_manifold never returns it, since values cannot tell a free array from a phase tensor: name it through group_by_manifold’s manifolds. shape takes part in equality, as UnitaryManifold’s d does, so arrays of different shapes fall into separate groups (a group is stacked into one array).

Parameters:

shape (tuple[int, ...])

__init__(shape)#
Parameters:

shape (tuple[int, ...])

Return type:

None

Methods

__init__(shape)

project(points, grads)

retract(points, tangent, alpha, *[, I_batch])

transport(old, new, vec)

Attributes

shape: tuple[int, ...]#
project(points, grads)[source]#
Parameters:
Return type:

Array

retract(points, tangent, alpha, *, I_batch=None)[source]#
Parameters:
Return type:

Array

transport(old, new, vec)[source]#
Parameters:
Return type:

Array