-2
$\begingroup$

Note: forcing a superposition qubit to collapses to 1, means cancel the other value 0 to get 1 appear

Question details step by step:

#If i have two qubits
Qr = QuantumRegister(1)
qr = QuantumRegister(1)

#and two classical registers
Cr = ClassicalRegister(1)
cr = ClassicalRegister(1)

#and one quantum circuit
cc = QuantumCircuit(Qr,qr,Cr,cr)

#And put Qr in superposition state
cc.h(Qr[0])

#And copy Qr to qr
cc.cx(Qr[0],qr[0])

# How to force qr[0] to collapses to a certain needed value (say 1) ,
# and after measuring Qr[0] it gives the same qr[0] value (gives 1 too)

#########################################################################
# need to do some tricks to force qr[0] to be 1
# (force it to be 1 by changing the probability of being 1 to high,
# not by changing the value of it to 1)
# and Qr[0] measuring also gives 1 (without doing any operations to it)
# all operations will done to qr[0] only
# we can add/use any new registers
#########################################################################

# and after measuring , we have to found that Cr[0] == cr[0] == 1
cc.measure(Qr[0],Cr[0]) # Cr==1
cc.measure(qr[0],cr[0]) # cr==1


# who can do it? and how?
# or even increasing the probability of getting 1 like 90%:10% instead of 50%:50%

Idea (1): when we do h(Qr), it will be in superposition state, it means it can be 0 and changed to 1 at any moment, i need some method to measure the probability of being 1 at this moment, if it is high then i do normal measure to catch it, if it is low, then i loop doing another things and test the probability again until it is changed to high, then we can do normal measure to catch and make it real, we will do this to all qubits one by one till get all our outputs match the known outputs, then our inputs will be the secret inputs that we want to know.

.

in another words: we want Qr still in superposition but after excute it 1000 shots and measure it,we get 990 times 1 and 10 times 0 or {'0': 10, '1': 990}

$\endgroup$

closed as unclear what you're asking by Mark S, Niel de Beaudrap, Rob, AHusain, heather Aug 1 at 17:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Hi remon78eg! Welcome to QCSE! I'm not sure what you mean by "and Qr[0] measuring also gives 1 (without doing any operations to it.)" If Qr[0] is not $|1\rangle$ then a local operation on Qr[0] is needed to make it $|1\rangle$. Can you edit your question to clarify? Also, I'm a little confused about "forc[ing] a qubit to collapse to an exact value." A qubit in a superposition will collapse according to the Born rule. But it sounds like your question is "how can I perform local operations on a qubit that is in $|+\rangle$ to be in $|1\rangle$?" $\endgroup$ – Mark S Jul 14 at 12:33
  • $\begingroup$ first i did cc.h(Qr[0]) , so it is now (0 and 1) in the same time, then i did cc.cx(Qr[0],qr[0]) so, qr=Qr , now if i measured any of them, the other will be the same because it is a copy, so if i successfully forced qr to be 1, then Qr also will be 1 (without doing any operations to it.) $\endgroup$ – remon78eg Jul 14 at 14:42
  • $\begingroup$ Have a look at post-selection, this how what you describe is called. $\endgroup$ – Nelimee Jul 15 at 6:16
1
$\begingroup$

i think you have done entaglment $\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ so when you measure the first qubit the second qubit forces to be collapses to the same state as the first qubit state.

$\endgroup$
  • $\begingroup$ i can't understand the formulas , i can understand code only, can you explain by qiskit code, i did cc.h(Qr[0]) , so it is in superposition state now, i will not do any thing to it, i will do changes to qr only to force it to collapse to 1,and if Qr is 1 also , then we succeeded. $\endgroup$ – remon78eg Jul 14 at 14:51
  • $\begingroup$ @remon78eg, I don't think you can do what you want to do without local operations on Qr. You cannot "force qr to be 1" and have "Qr also will be 1 (without doing any operations to it.)" If you have two qubits Qr and qr that are both entangled in a Bell state, you cannot do an operation on qr only to "force" it to be "1", and have the second qubit Qr also be "1" with any probability greater than $1/2$, without acting on the second qubit Qr. $\endgroup$ – Mark S Jul 14 at 15:42
  • $\begingroup$ @Aman, i do copy, so both (Qr & qr) have the same value, if first one collapsed to 1 then the other must collapsed to 1 also or we do some error and changed the value ,not the probability of being 1 $\endgroup$ – remon78eg Jul 14 at 16:09
  • $\begingroup$ @remon78eg It seems like you wish to have a system go from $\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)$ to $\frac{1}{\sqrt{2}}(|10\rangle+|11\rangle)$. This is OK. But you seem to want the system to then be in $|11\rangle$ without operating on the second qubit. This is not doable. Being in $\frac{1}{\sqrt{2}}(|10\rangle+|11\rangle)$ means that the first qubit will measure $1$ always, and the second qubit will measure $0$ with 50% probability (and $1$ with 50% probability.) $\endgroup$ – Mark S Jul 14 at 17:51
  • $\begingroup$ @remon78eg yes if the first one collapsed to one the other must collapse to 1. But if you have more than one two qubits and measure one of them you may have a superposition state of the rest of the qubit other than the measured qubits. $\endgroup$ – Aman Jul 14 at 18:05
1
$\begingroup$

You cannot force a superposition to collapse in a particular direction. When you perform a measurement that removes a superposition, that 'collapse' is random, and you cannot choose which way it collapses.

However, if you know what superposition you have, you can always convert it into any other state that you want to via unitary evolution (at which point you should not be using the 'collapse' terminology, which implies a non-unitary evolution).

Reading the comments, it seems that what you want to do is manipulate the probabilities with which the state collapses. This is better incorporated into the preparation procedure. Instead of performing a Hadamard rotation on the first qubit, perform a $Y$-rotation of some angle $2\theta$. I think this is provided by a command called ry. This will provide you with a state $\cos\theta|0\rangle+\sin\theta|1\rangle$ so that when you apply the controlled-not gate, you'll have $\cos\theta|00\rangle+\sin\theta|11\rangle$. This means that when you measure, you'll get the answer 0 (on both qubits) with probability $\cos^2\theta$, and 1 with probability $\sin^2\theta$.

$\endgroup$
  • $\begingroup$ the word "cannot" in knowledge, is incorrect, the correct word is "don't know", because there is no impossible, but we just don't know how to do it now, may be we know how, later. $\endgroup$ – remon78eg Jul 16 at 7:14
  • 1
    $\begingroup$ @remon78eg The qualifier that applies throughout this site is "within the standard theory of Quantum Mechanics". True, it might be a physically permissable operation, but one would have to go beyond standard quantum mechanics to achieve it. $\endgroup$ – DaftWullie Jul 16 at 8:49

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