1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$
    – Community Bot
    Aug 10, 2023 at 6:05
  • $\begingroup$ you can't in general "avoid measurement" in quantum computing. Measurement is how you get the answer out of the computation $\endgroup$
    – glS
    Aug 24, 2023 at 15:32

1 Answer 1

3
$\begingroup$

My advice is to explicitly implement a weak measurement protocol. This means preparing an ancillary state, enacting a weak interaction beween the ancilla and your system that you want to measure, then measuring the ancilla.

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).

$\endgroup$
4
  • $\begingroup$ Thanks for your answer, Kindly clarify the following please: - What's this g operator? it looks like rotation for me but some sign is missing! - Do you suggest applying the G operator as an entangling gate over my system "assuming it contains one qubit" and the ancilla qubit? At the end; apply measurement over the ancilla qubit without touching my system qubit further with measurement. Please confirm and elaborate more for clarification. $\endgroup$ Aug 13, 2023 at 15:47
  • $\begingroup$ @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 $\endgroup$ Aug 13, 2023 at 17:38
  • $\begingroup$ Gotcha, what about using SWAP operator from Qiskit, you can check my example here: ideone.com/g3HJWw I did establish any entanglement so I do not see impact from the measurement on "the origin" oracle system. Did I miss something or it is just different approach to apply weak measurement? $\endgroup$ Aug 20, 2023 at 15:32
  • $\begingroup$ @SeifMostafa SWAP is very different from measurement $\endgroup$ Aug 20, 2023 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.