We investigate implementation of quantum computation by using spin and position degrees of freedom of electrons moving in the quantum wires. Such quantum wires can be realized in a two-dimensional electron gas, where electrons are assumed to move uniformly in either of two possible rails. We show, how one can combine two previous methods for performing quantum computation.