  The finite-temperature Hartree-Fock-Bogoliubov (HFB) approximation often
breaks symmetries of the underlying many-body Hamiltonian. Restricting the
calculation of the HFB partition function to a subspace with good quantum
numbers through projection after variation restores some of the correlations
lost in breaking these symmetries, although effects of the broken symmetries
such as sharp kinks at phase transitions remain. However, the most general
projection after variation formula in the finite-temperature HFB approximation
is limited by a sign ambiguity. Here, we extend the Pfaffian formula for the
many-body traces of HFB density operators introduced by L. M. Robledo in Ref.
[1] to eliminate this sign ambiguity and evaluate the more complicated
many-body traces required in projection after variation in the most general HFB
case. We validate our method through a proof-of-principle calculation of the
particle-number-projected HFB thermal energy in a simple model.
