Hopefully is a word that many British academics dislike, in one of its common usages. This is when it is used to mean 'I hope' - as an adverb qualifying the whole sentence. Pedantically speaking, 'The student opened the exam paper hopefully' is acceptable, because the adverb hopefully describes the way in which the student carried out the action of the verb. It tells about the emotion the student felt while opening the paper.
On the other hand, 'Hopefully, the United States will sign the Treaty' is felt to be wrong, because the United States will not
hope in any sense at all. The adverb means to say that the writer - or reader, or indeed public opinion - hopes that the USA will sign the Treaty.
Such a usage is acceptable in other languages, such as German. It is more acceptable in American English than in British academic English. In AWE's judgement, it should be acceptable. It follows the usage of a number of other sentence adverbials like obviously and apparently. But if you want to sound academic, avoid it.
Hopefully you will! - or, in more academically acceptable style, I hope that you will. In even more footling academic formality, it is to be hoped that the reader will avoid this error in future.