I am relative beginner to building qc circuits and programming. Please share with me how you would begin to approach this problem. What steps would you take to draw this circuit? Thank you for your help.
What I have worked on thus far:
I have studied the basic idea of a demultiplexer. However, I do not know what the selector switch(s) would be in this case so I will assume the NOT, CNOT, Toffoli and Fredkin gates will play this role?
Using the HINT, I was able to construct a table:
a, b, c, d to a(bar)b(bar), ab(bar), a(bar)b, ab [n]
0 0 0 0 1 0 0 0 n= 2b + a = 0
1 0 0 0 0 1 0 0 n= 2b + a = 1
0 1 0 0 0 0 1 0 n= 2b + a = 2
1 1 0 0 0 0 0 1 n= 2b + a = 3
- My first question re: "where only the nth output is 1 (the others are all 0 ), and n=2b+a ."
If a and b inputs are arbitrary, how do I ensure the appropriate nth output? If for n=1, a=1 and b=0 (vs. a=0,b=0), what can I do to ensure that for n=1 the output is 1 0 0 0.
- Second question, should I be using a circuit composer at this stage? If so, how do I begin to think about arbitrary nature of inputs a and b with respect to the boolean logic gates?
Any guidance and hints are appreciated.