Towards molecular energy calculations on a quantum computer