pdft.circuit.u4_from_phase#
- pdft.circuit.u4_from_phase(phi)[source]#
Return the 2-qubit (2, 2, 2, 2)-shaped tensor matching the 4×4 controlled- phase gate diag(1, 1, 1, exp(iφ)).
This is the strict warm-start for a learnable U(4) gate that should behave initially like a fixed CP. Axis order: (out_ctrl, out_tgt, in_ctrl, in_tgt).