Skip to content

"Near-Clifford rounding" fidelity calculation

Compare
Choose a tag to compare
@WrathfulSpatula WrathfulSpatula released this 10 Jan 19:25

QUnit already offered GetUnitaryFidelity() (or, in PyQrack, get_unitary_fidelity()) to automatically estimate overall fidelity reduction during SDRP algorithm application. Similarly, when using using Clifford+RZ gate set, QStabilizerHybrid can be instructed via QRACK_NONCLIFFORD_ROUNDING_THRESHOLD environment variable to round non-Clifford phase gates with smaller angles to "no-operation," but it wasn't immediately obvious how this should quantitatively affect overall fidelity. Now, under the assumption that non-Clifford phase gates will only be buffered at all when applied to states that are originally in maximal superposition, Qrack automatically calculates the effect on the single-qubit reduced density matrix:

fidelity *= 0.25 * norm(1.0 + phaseFac)

where phaseFac is the unit-norm phase factor of the gate "rounded away." This produces a maximum infidelity for a T gate, of 3/8 compounded infidelity. (Note that, if you're using variational RZ gates in an RCS benchmark, compounded infidelity per rounding event might typically be much less than 3/8, and it's quite possible to set the rounding parameter to maximum yet still see approximately 1.0 fidelity at the end of the circuit.)

SHA256 sums:
7912e583616677ff7b42aaaa652a646b549f1a633b2949a0618bce66a659cbad pyqrack-1.25.0-py3-none-any.whl
1f7a82afc98075029d8a2bcbceda472309884ad40f4b2f983b55928f81b35156 pyqrack-1.25.0-py3-none-linux_aarch64.whl
617cd31d26f48c377555991fa733ba9c956ac3d68bc5735f7021719fa1d19022 pyqrack-1.25.0-py3-none-linux_armv7l.whl
e93f3c1f7e3dc8a49604805a85973ef48a93dd8c0ad1aacaaf60910a1dafaae7 pyqrack-1.25.0-py3-none-macosx_10_4_universal2.whl
e3a98f69627610d4d7b52057f769e9a7d91ec2aa5b9ea5da6a684ccefd6daf22 pyqrack-1.25.0-py3-none-manylinux2014_x86_64.whl
cb135bf27c0ce9b89acf714071c8d6af835c86e102d406c91188ed7620d2f505 pyqrack-1.25.0-py3-none-manylinux_2_35_x86_64.whl
536de922583ffffde0dfb018c3d4cf99238c99c3252ceb4c866d85de519dd9b7 pyqrack-1.25.0-py3-none-win_amd64.whl
4b277afa149250ed74116df2d51aeea1b80b812d2b9f3346e0a140b3352b8083 pyqrack-1.25.0.tar.gz