Added self.reverse_states agrument to qc_temp in resolve_gates