pdft.circuit.phase_gate

Contents

pdft.circuit.phase_gate#

pdft.circuit.phase_gate(parametrization)[source]#

The constructor gate(q_ctrl, q_tgt, phi) of a controlled phase in one of its two forms.

"cp" stores the gate as the compact diagonal tensor, trained on U(1)^4. "u4" stores the same operator as a dense two-qubit tensor, trained on U(4): both start equal for a given phi and differ only in the manifold they relax over.

Parameters:

parametrization (str)

Return type:

Callable[[int, int, float], Gate]