Closed takkie-snoekie closed 1 year ago
To which tutorial are you referring? Have you had a look at this tutorial Iterative Quantum Phase Estimation Algorithm? In the section Conditioned gates: the c_if method it is explained how to use c_if with multiple qubits and bits. I hope this help you
I'm not really sure what is being requested in this issue but anyway the c_if
syntax has been replaced by if_test
in Qiskit so I believe this is no longer relevant.
We want to apply a x gate only if 3 qubits are in a certain configuration. We used .c_if to achieve this. We correspond the qubits to the classical bits (q1 to c1 and so on). However it does not work how we expect.
For example when all classical bits are 0 and val1 = 1 it performs the X gate on the target even though we would expect that nothing would happen and X gate would not be applied.![WhatsApp Image 2023-01-11 at 10 06 38 AM](https://user-images.githubusercontent.com/122437948/211764326-b12b148e-09c4-477a-a3ca-7d35df30420a.jpeg)