Fix writing qubit params to file.

--BRJ