Entanglement and quantum logical gates. Part I