%kata T1_ApplyY

operation ApplyY (q : Qubit) : Unit is Adj+Ctl {
    Y(q); // As simple as that
}

%kata T2_GlobalPhaseI

operation GlobalPhaseI (q : Qubit) : Unit is Adj+Ctl {
    Z(q);
    Y(q);
    X(q);
}

%kata T3_SignFlipOnZero

operation SignFlipOnZero (q : Qubit) : Unit is Adj+Ctl {
    X(q); // Flip the qubit
    Z(q); // Apply negative phase on the |1> state
    X(q); // Flip the qubit back
}

%kata T4_PrepareMinus

operation PrepareMinus (q : Qubit) : Unit is Adj+Ctl {
    X(q); // Turn |0> into |1>
    H(q); // Turn |1> into |->
}

%kata T5_ThreeQuatersPiPhase

operation ThreeQuatersPiPhase (q : Qubit) : Unit is Adj+Ctl {
    S(q);
    T(q);
}

%kata T6_PrepareRotatedState

open Microsoft.Quantum.Math;

operation PrepareRotatedState (alpha : Double, beta : Double, q : Qubit) : Unit is Adj+Ctl {
    Rx(2.0 * ArcTan2(beta, alpha), q);
}

%kata T7_PrepareArbitraryState

open Microsoft.Quantum.Math;

operation PrepareArbitraryState (alpha : Double, beta : Double, theta : Double, q : Qubit) : Unit is Adj+Ctl {
    Ry(2.0 * ArcTan2(beta, alpha), q); // Step 1
    R1(theta, q); // Step 2
}