# Tag Info

4

In[13]:= H = 1/Sqrt[2]*{{1, 1}, {1, -1}}; T = {{1, 0}, {0, Exp[I*Pi/4]}}; CNOT = {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}}; KroneckerProduct[IdentityMatrix[2], T].CNOT. KroneckerProduct[T,ConjugateTranspose[T]].CNOT // MatrixForm {"1", "0", "0", "0"}, {"0", "1", "0", "0"}, {"0", "0", "1", "0"}, {"0", "0", "0", "I"} So that red boxed ...

4


1

\begin{align} \Pr(\text{“0"}) & = \frac{1}{4} ( 2 + \left\langle \psi , \phi \mid \phi, \psi \right\rangle + \left\langle \phi , \psi \mid \psi , \phi \right\rangle ) \\ & = \frac{1}{4} ( 2 + \left\langle \psi \mid \phi \right\rangle \left\langle\phi \mid \psi\right\rangle + \left\langle \phi \mid \psi \right\rangle \left\langle\psi \... 1 Quantum algorithms provide a computational speedup by orchestrating constructive and destructive interference of the amplitudes. It is as if there must be a "minus" sign somewhere in the matrices - otherwise we merely work in the classical world, and would not see a computational speedup. Let's consider the following gates as controlled Pauli matrices: \... 1 The terms of expression do not cancel out in the balanced function case. We start with\frac{1}{2} (|0\rangle|0 \oplus f(0)\rangle - |0\rangle|1 \oplus f(0)\rangle + |1\rangle|0 \oplus f(1)\rangle - |1\rangle|1 \oplus f(1)\rangle)$$If f(0) \neq f(1), consider the first two terms (the only ones which can cancel with each other, since the state of the ... 1 If your using the latest qiskit version then it is qiskit.aqua 1 I think you agree that if you start with the state (a|0\rangle+b|1\rangle)|0\rangle, the cnot produces a|00\rangle+b|11\rangle. The issue is why is the state of the first qubit not the same as a|0\rangle+b|1\rangle. The answer is if you only look at that one qubit and you only look in the standard, Z basis, then they do look the same. But those are ... 1 I'm a little confused about which gates operate on which qubits and how, but following the linked question, I think I understand that you are wondering why, given a single qubit in the state in a|0\rangle+b|1\rangle and preparing two qubits in a state a|00\rangle+b|11\rangle does not qualify as cloning the first bit, especially because the probabilities ... 1 If it were me, I'd go via the fact that you can describe any U in the form$$ U=e^{i\alpha}e^{\theta\underline{n}\cdot\underline{\sigma}}. $$There are already questions on Stack Exchange about how to set up the relation between the Euler angles and this Bloch vector representation (this one gets you most of the way there). The point is that the square ... 1 U actually means the 4 by 4 matrix acting on both the control and the affected qubits. You are mixing up this U with the 2 by 2 block inside it. To avoid that from now on, just take U to be the 4 by 4 one. Now that that is clarified. Rearrange things with a swap. So if the first is control and third is acted on you should do:$$ (I_2 \otimes S) (U \...

1

Simply implement the gate $$\left(\begin{array}{cc} 1 & 0 \\ 0 & e^{i\theta} \end{array}\right)$$ on the control qubit.

Only top voted, non community-wiki answers of a minimum length are eligible