pdft.bases.cp_phases#
- pdft.bases.cp_phases(basis)[source]#
The angle of every controlled-phase gate, in stored order: the phase-only parameters.
A compact controlled-phase tensor is
[[1, 1], [1, exp(i*phi)]]; this readsphioff each one.with_cp_phasesis the way back. Together they are the view a phase-only model trains through: the angles are ordinary real parameters, the basis and its circuit stay what they are.The view is exact for tensors of that form, which is what every basis starts with and what
with_cp_phaseswrites. The package’s Riemannian trainers move all four entries of such a tensor around the unit circle (the phase manifold isU(1)^4); on a basis trained that way this reads one of the four phases, and writing it back resets the other three.cp_diagonalsis the view of all four.- Return type: