Reputation: 1
I am working on implementing a substitution table in qiskit, for which i want to use a lookup table approach. I initialize a quantum circuit with my intended state which after certain operations is measured and substituted by lookup table. Now, i initialize another quantum circuit with the output from lookup table.
Now, i want to implement lookup table without measurement. Rather some classical control on the quantum circuit to implement lookup table.
I tried to measure the first circuit, the counts of first circuit is taken as input for the second circuit. But I want to use any other method, which helps me to solve that without measuring first circuit.
Upvotes: 0
Views: 167
Reputation: 294
You can use classical feedforward and control flow statements like:
And these statements can be included in the circuit to implement certain behaviour on 2nd half of circuit based on the measurement of 1st half of circuit. An advantage of using these statements is that you don't have to make separate circuits, you can perform a measurement and depending on the outcome of that measurement the second circuit will be implemented by using the quantum state of the 1st half of circuit.
Here is the link to the documentation
Upvotes: 2