In physics, does the order of authors on a paper matter?

Physics has two broad conventions: the closer you are to high energy physics/particle physics/string theory/mathematical physics, the more likely you are to see alphabetical ordering. However, within condensed matter and biophysics, you generally see "First author = trainee primarily responsible for work." (I think astrophysics is more mixed).

There is actually some empirical data on alphabetical authorship by field here: Waltman arxiv:1206.4863 which confirms this general impression.

In quantum information, you might be at the edge of the condensed matter and "mathematical physics" conventions. Take a look at your advisor's other papers - are they alphabetical? Or are grad students and postdocs within the group usually listed as first?

Also, within fields where author order matters, the implication of "second of two authors" can be very different than, say, "second of five authors." With two authors, there is often the presumption of nearly-equal contributions. However, someone who is second of many may have, e.g., provided a figure's worth of data.

Your description would be broadly consistent with being a first author in most fields. (This assumes that there are not other people who contributed, who you have not mentioned - sometimes undergraduates are not given the best picture of what contributions are there.)

If this does not clear things up, I think it is fine to ask your advisor why he set the author order the way he did.