3
$\begingroup$

I have this truth table, knowing that the S = 110. However, how do I come up with a circuit by recognizing the pattern? It has taken me hours but my 2 brain cells don't seem to get it...

I know there must be an intuitive guide to finding a pattern when implementing in circuits, but what is it? Is there a general rule of thumb for solving this?

enter image description here

$\endgroup$

1 Answer 1

5
$\begingroup$

I'm not saying this is a good way of doing it, but if you're completely stumped, there is always a fallback: use a multi-controlled-not. For example, if you use controlled-controlled-controlled-not, you can choose which of the 3 target bits to set to 1 (the second) if all three input bits are 1. Then, you flip the third input bit and apply another controlled-controlled-controlled-not. This applies an X if the original input as 110, so we do two of those, one targetting the first qubit, and one targetting the third. And so on...

(There are much better ways in this particular case. For instance, compare the xor of the 3 input bits with your intended first output bit. Also, compare your third input bit and the second output bit.)

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.