In this work, we present constructions of quantum circuits to implement general measurements on quantum hardware. Firstly, we investigate a quantum circuit ansatz by following the Naimark extension with a universal set of gates, such as controlled-NOT and single-qubit gates; we call it a {\it Naimark measurement}. We present a circuit ansatz framed by the Naimark extension, leaving single-qubit gates with parameters, and apply a classical optimizer to determine their parameters to approximate a desired quantum measurement. Secondly, we relax the Naimark measurement with quantum neural-network (QNN) circuits, employing parameterized quantum circuits. We present hybrid Naimark-QNN measurements by incorporating QNN circuits into Naimark measurements. Thirdly, we also consider fully QNN measurements with shallow parameterized circuits. Then, we compare the constructed measurement circuits, Naimark, hybrid Naimark-QNN, and fully QNN measurements, for strategies of state discrimination, such as minimum-error and maximum-confidence measurements. We demonstrate that QNN circuits can efficiently and effectively achieve near-optimal quantum measurements with fewer training iterations.
Mid-circuit measurements and measurement-controlled gates are supported by an increasing number of quantum hardware platforms and will become more relevant as an essential building block for quantum error correction. However, mid-circuit measurements impose significant demands on the quantum hardware due to the required signal analysis and classical feedback loop. This work presents a static circuit optimization algorithm that can substitute some of these measurements with an equivalent circuit with stochastic applications of gates. Our method uses ideas from constant propagation to classically precompute measurement outcome probabilities. Our proposed optimization is efficient, as its runtime scales polynomially on the number of qubits and gates of the circuit.
In this paper we introduce the new model for Quantum Logic Synthesis. The innovation consists in designing circuits with the measurement process together with the computing circuit. The Measurement is used as a part of the entire computational process. We demonstrate the method to synthesize quantum circuits from examples (examples are cares of the quantum truth table) such that the synthesis process converts the don't knows (minterms not given as examples) to the entangled quantum output values which are measurement dependent. We extended the logic synthesis approach to measurement-based quantum circuits synthesis from incompletely specified or completely specified function specifications.
Quantum programs that use temporary values, known as \emph{ancilla} qubits, must explicitly \emph{uncompute} each ancilla back to zero to ensure that the program produces correct outputs. Conventional uncomputation uses unitary quantum gates, whereas leading quantum algorithms now leverage \emph{measurement-based uncomputation} (MBU), which replaces costly unitary
T gates with cheaper measurements and phase corrections.
Current quantum programming frameworks can use measurement to uncompute specific gates such as Toffoli. No automatic transformation, however, accepts an arbitrary circuit whose ancillas are computed and uncomputed via the standard approach and converts the circuit to use MBU\@. Researchers instead apply MBU to individual circuit designs by hand, which limits algorithm development and compiler optimization.
Such a transformation has not existed due to two fundamental unknowns: where MBU applies and which gates realize MBU for an arbitrary computation. To solve these, we first present a static analysis that identifies, for each ancilla qubit, each circuit position where measurement is sound --- subsuming basic assumptions that MBU only applies at the end of a circuit. Next, we present circuit transformations that soundly turn unitary uncomputation gates into efficient phase corrections after measurement --- generalizing rewrite rules from prior literature that are either limited to a single gate or not applicable to a general circuit.
We present \textsf{MBUndo}, an integrated compiler pass that automatically converts circuits to measurement-based uncomputation. It requires no user annotations other than which qubits are ancillas, the same as needed by existing uncomputation synthesizers, and can enhance their output circuits. We evaluate \textsf{MBUndo} on 22 benchmarks to reveal \emph{T} gate reductions of
>36.5% over uncomputation synthesizers.