QR iteration

A ={{1,2},{3,4}}; B = A; U = {{1,0},{0,1}}; k =20;Do[{Q,R}=N[QRDecomposition[B]]; B:=R.Q ; U=U.Q,{k}];

B

U.B.Transpose[U] (* should be = A *)

N[Eigenvalues[A]] (* equal to diagonal elements of B? *)