Changed Qobj into new-style class.