The S gate rotates around the x-y plane by 90 degrees (π/2 radians).
In Python it can be written as follows:
S=np.matrix([[1,0],[0,np.e**(i_*np.pi/2.)]])
We can see the S gate has no effect on |"0"> with the plot_bloch(S*zero_qubit) statement:
But if we pick a qubit in the x-y plane, say |"+">, we can see the 90 degree rotation with the plot_bloch(S*plus_qubit) statement:
Here, we see S|"+"> has rotated the |"+"> qubit 90 degrees around the z axis to become . If we again apply the S gate, we will get another rotation, as can be seen with the plot_bloch(S*S*plus_qubit) statement:
Two applications of the S gate have rotated the |"+"> qubit by 90° + 90° = 180°, turning it into the |"-"> qubit. Four applications of the S gate to the |"+"> qubit would rotate us 90° * 4 = 360°, right back to where we started.