Entanglement comes from a state that cannot be factored into single-qubit states

The hadamard gate takes

but normalized The p gate