def Z(q, *args, **kwargs):
    """
    (q, *args, **kwargs) -> qubit
    Applies Z to qubit and returns the qubit to be used for having a functional like programming, but not necessary as the qubit is modified in place.
    """
    q.Z(*args, **kwargs); return q