In a five qubit (q0, q1, q2, q3 and q4) quantum circuit, I need to consider only those measurement readings of q0, q1 and q2 for which q3 and q4 measures 0. More specifically, I am trying to implement a protocol using this (see eq. 3). I use two ancilla qubits (q3 and q4) instead of one (as descried in this paper) and the protocol will be executed only if both the ancillaries measure 0. In the end I need the readouts for q0, q1 and q2. How to implement this in Qiskit (also I need to execute the code on a IBM Quantum computer)?
Asked
Active
Viewed 81 times
0
-
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 Jul 12 '23 at 06:16
-
please have a look at https://quantumcomputing.meta.stackexchange.com/questions/49/tutorial-how-to-use-tex-mathjax-to-render-math-notation and https://quantumcomputing.stackexchange.com/help/how-to-ask – glS Jul 12 '23 at 07:43
-
I edited my question. Thanks – User3912 Jul 12 '23 at 09:49
-
Just to be sure: do you want to apply quantum gates after having measured 0 on both ancillas, or do you apply quantum gates, meaasure the whole thing and only consider results where both ancillas were measured to be 0? (This is probably equivalent anyway, but the code is different) – Tristan Nemoz Jul 12 '23 at 10:54
-
Do you want to apply quantum gates after having measured 0 on both ancillas: no. But if I do apply, I guess it can't be executed on a IBM Quantum computer at present (correct this if it is wrong and please provide the code for this as well). Thank you – User3912 Jul 12 '23 at 10:55
-
See here: https://quantumcomputing.stackexchange.com/q/27888/9474 – Egretta.Thula Jul 13 '23 at 11:37
1 Answers
1
Yes, this is implementable with dynamic circuit support on IBM Quantum hardware.

ThomasAlexander
- 711
- 3
- 3