Deterministic quantum network for distributed entanglement and quantum computation