# How to avoid measurement in Quantum Computing?

Using Qiskit, I tried to implement "weak measurement" to avoid measurement but it looks like a hard task for my skills-set. If you have any guidance for that, kindly purpose!

Besides that, I am trying to find a way to make every quantum algorithm's lifecycle better, i.e. providing input and getting output without breaking all the circuit with measurement. so please give me directions to avoid actual measurement.

• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Commented Aug 10, 2023 at 6:05
• you can't in general "avoid measurement" in quantum computing. Measurement is how you get the answer out of the computation
– glS
Commented Aug 24, 2023 at 15:32

The "weak interaction" will have to be an entangling gate that does not change either the ancilla or the system by much. If you think of a CNOT gate, it completely flips the value of one qubit conditioned on the value of the other. To be weak, the gate should slightly change the value of one qubit. So if our entangling gate has a matrix representation $$G=\begin{pmatrix} \begin{pmatrix}1&0\\ 0&1 \end{pmatrix}&\begin{pmatrix}0&0\\ 0&0 \end{pmatrix}\\ \begin{pmatrix}0&0\\ 0&0 \end{pmatrix}&g \end{pmatrix},$$ then a CNOT gate has $$g=\begin{pmatrix}0&1\\1&0\end{pmatrix}$$, while a weak measurement might have $$g=\left( \begin{array}{cc} \cos (x) & \sin (x) \\ -\sin (x) & \cos (x) \\ \end{array} \right)$$ for $$|x|\ll 1$$.
We can clarify the action of $$G$$ by writing it as $$|0\rangle\langle 0|\otimes \mathbb{I}+|1\rangle\langle 1|\otimes g$$, where we can choose the first mode to be the system and the second to be the ancilla. A strong measurement would have a CNOT gate such that the ancilla completely changes its state based on the state of the system; a weak measurement has the ancilla change only slightly based on the state of the system. $$g$$ can be any rotation gate around any axis with a small rotation angle. The smaller the angle, the less a measurement on the ancilla will disturb the system (the larger the angle, the more the ancilla will be entangled with the system and thus the more a measurement of the former will disturb the latter).
• @SeifMostafa it is a rotation operator, there is no sign missing, one can always rotate with $+x$ or $-x$ ($g$ can be any unitary matrix). You have everything else correct; I updated the answer regardless for extra clarification Commented Aug 13, 2023 at 17:38