# How do you pass input to a circuit? [closed]

I've implemented Grover's search algorithm in qiskit, and I'd like to pass in an input to run through the circuit. How is that done?

• Hey! What do you mean by pass an input in? Grover uses an oracle to search all potential options to find the desired result – met927 Nov 14 at 9:54
• As a follow-on from the above comment, do you mean the input to the circuit (which is generally taken to be all $\left|0\right>$ by default) or are you asking how you create the oracle? Or how you store the data for the oracle? Or something else? It would probably be worth looking up these questions: 1, 2, 3, 4, 5 – Mithrandir24601 Nov 19 at 22:31

It would be helpful to get a code sample, but from how you've phrased the question, the circuit assumes that the register is originally initialized to the $${|00..0\rangle }$$ state. You'll need to initialize the register into the uniform superposition of all states, and then your Grover's algorithm should work.