We investigate the performance of error mitigation via measurement of
conserved symmetries on near-term devices. We present two protocols to measure
conserved symmetries during the bulk of an experiment, and develop a zero-cost
post-processing protocol which is equivalent to a variant of the quantum
subspace expansion. We develop methods for inserting global and local symetries
into quantum algorithms, and for adjusting natural symmetries of the problem to
boost their mitigation against different error channels. We demonstrate these
techniques on two- and four-qubit simulations of the hydrogen molecule (using a
classical density-matrix simulator), finding up to an order of magnitude
reduction of the error in obtaining the ground state dissociation curve.Comment: Published versio