\node (sq1_a00) at (-3, 1) {A};
\node (sq1_b10) at (-1, 1) {B};
\node (sq1_a01) at (-3, -1) {A};
\node (sq1_a11) at (-1, -1) {A};

\draw[dashed,->] (sq1_b10) -- node[midway] {h} (sq1_a11);
\draw[->] (sq1_a00) -- node[midway] {f} (sq1_b10);
\draw[->] (sq1_a00) -- node[midway,left] {1} (sq1_a01);
\draw[->] (sq1_a01) -- node[midway,below] {1} (sq1_a11);