Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Qiskit-Partners/marz

Repository files navigation

marz

Marz is a measurement and reset simplification routine that collapses measure + reset pairs of operations on into a single measurement followed by a conditional-x gate. This optimization is suitable for use on IBM Quantum systems where the reset operation is performed by a measurement followed by a conditional x-gate:

Screen Shot 2022-07-11 at 14 40 37

marz therefore saves one measurement per operation pair. Because measurements are the operations with the largest error rates on IBM Quantum systems, and each measurement takes ~2 CNOT gates worth of time, this optimization reduces error rates, and can reduce the duration (dephasing) of quantum circuits that impliment qubit reuse. It can also eliminate the dreaded BufferOverflow error where measurement results are beinging generated faster than they can be stored.

Installation

pip install marz

Usage

Marz is really easy to use as it has a single function:

import marz

optim_circ = marz.collapse_meas_reset_pairs(input_circ)

One can also pass a list of circuits and get a list of optimized circuits back.

About

Measure and reset simplification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages