pdft.bases.with_cp_phases

Contents

pdft.bases.with_cp_phases#

pdft.bases.with_cp_phases(basis, phases)[source]#

A copy of basis whose controlled-phase gates have the angles phases.

Every other tensor is kept. Traceable: phases may be a traced array, so a loss can be differentiated with respect to the angles through the transforms of the returned basis.

Parameters:

phases (Array)