Just a side comment to this question.
In the real world nothing is so obvious.
Try to define Hadamard gate in Ruby language.
Even when trying to define gate by using rational numbers which helps us sometimes to keep good precision the answer is that Hadamard is not unitary.
m = (1 / Math.sqrt(2)).to_r * Matrix[[1, 1],
results false and result of m*m multiplication is as below:
That means if we really want to be sure that something is 'true' as it should be, we need to double check existing feature in language and maybe fix/write own code when needed.