Thread is the inappropriate tool here as it does not hold its arguments, i.e. it does not have the attribute HoldAll:
Attributes@Thread
(* {Protected} *)
So, ConjugateTranspose[v].H.v evaluates before Thread can operate on it. Also, Thread will attempt to thread across H, as well, which is clearly not what you want. The correct tool to use here is Map:
Conjugate[#].H.#& /@ v
where v is the list containing your basis vectors.
Edit: Sometimes you look at one of your own answers and wonder why you are doing it the hard way, and using Map is most definitely the hard way. It is functionally correct, but it can be made simpler. First, we need to understand how vector multiplication is interpreted by Mathematica to ensure we get it right. When you enter
H.v
it is interpreted as
$$\pmatrix{H_{11} & H_{12} & \cdots \\ H_{11} & H_{12} & \cdots \\ \vdots & \vdots & \ddots}.\pmatrix{v_1 \\ v_2 \\ \vdots}$$
and
v.H
is interpreted as $v^{T}\cdot H$. So, if you have a list of vectors that you want to left multiply by a matrix, you must Transpose the list. So, using
H = {{1, 0, I}, {0, 3, 0}, {-I, 0, 1}};
{evals, evecs} = Eigensystem@H
(* {{3, 2, 0}, {{0, 1, 0}, {I, 0, 1}, {-I, 0, 1}}} *)
as our input, to get $v_i^\dagger \cdot H \cdot v_i$, we use
With[{v = Transpose@Orthogonalize@evecs},
ConjugateTranspose[v].H.v
]
(* {{3, 0, 0}, {0, 2, 0}, {0, 0, 0}} *)
Mapauto compiles, andDotandConjugateare on the list of functions that are compilable. This won't give a speed boost, though, if the matrix or vectors are symbolic. Are they? – rcollyer Apr 02 '14 at 19:41