pdft.bases.with_cp_phases#
- pdft.bases.with_cp_phases(basis, phases)[source]#
A copy of
basiswhose controlled-phase gates have the anglesphases.Every other tensor is kept. Traceable:
phasesmay 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)