2

From what I'm reading, building the constant-1 and constant-0 operations in a quantum computer involves building something like this, where there's two qbits being used. Why do we need two?

enter image description here

The bottom qbit in both examples is not being used at all, so has no impact on the operation. Both operations seemingly only work if the top qbit's initial value is 0 so surely what this is just saying is that this is an operation which either flips a 0 or leaves it alone - in which case what is the second qbit needed for? Wouldn't a set-to-0 function set the input to 0 whatever it is and wouldn't need one of it's inputs to be predetermined?

Granted, the 'output' qbit is for output, but it's value still needs to be predetermined going in to the operation?

Update: I've posted this on the quantum computing stack exchange with links to a couple of blogs/video where you can see the below being brought up.

MysteriousWaffle
  • 439
  • 1
  • 5
  • 16
  • It doesn't make sense to me to consider these 'constant operations' as two qubit gates, since as you say, one of the inputs must be in a specially prepared |0> state. Makes more sense to just call it state preparation. Just a reminder about reversible computing, a 'constant gate' that spits out the same result for all outputs is not reversible, so the usual 'workaround' is if f(x) is the function you want to implement, your gate takes x and y, and spits out x and y⊕f(x). Potentially this is what the 'constant operation' is getting at, but again, it does not take arbitrary inputs. – eugenhu Oct 27 '20 at 11:28
  • I don't want to post an answer since I'm not very familiar with the topic, this question seems more relevant to the [quantum computing stack](https://quantumcomputing.stackexchange.com/) instead though. It would be helpful if you could also link the source to where you saw this diagram for more context. – eugenhu Oct 27 '20 at 11:30
  • Ah, I wasn't aware there was one! I'll post it in there. In the meantime, the image is from this: https://medium.com/free-code-camp/almost-everything-you-ever-wanted-to-know-about-quantum-computers-5ee6bc2f40ba#978c Although from searching around the example crops up in a lot of other blogs / videos on quantum computing. – MysteriousWaffle Oct 27 '20 at 20:18

0 Answers0