It was not an act of war since Afghanistan didn't have an official government - in practice the Taliban ran things - but the attacks were carried out by the Al Qaeda which was spread over the Middle East. The Taliban might have been sympathetic to it but they were not actively supporting them or had any official collaboration with them.
Acts of war are between nations, not between governments.