# Tag Info

1

You can simplify "produce a state" problems by breaking them into three parts: Prepare the collection of magnitudes you'll need, without worrying about phase or which state has which magnitude. Fix the phases. Fix the ordering. Now consider the Hardy state. What are the magnitudes that we need to make? We need one instance of $3/\sqrt{12}$ and three ...

0

With help of the Mariia's comment, here is my attempt to reiterate the steps as a self-check/ notes for the Hardy-state (which I'll call $\left| Hardy \right>$): $\left| Hardy \right> = \frac{1}{\sqrt{12}} (3\left| 00 \right> + \left| 01 \right> + \left| 10 \right> + \left| 11 \right>)$ Following the accepted answer, the starting state $\... 5 As DaftWullie pointed out, the question about$W_n$has an excellent collection of answers here. For the Hardy state question (and a lot of other tasks like it), you can approach it as follows. Start with the$|0...0\rangle$state. Start by putting the first qubit "in the right state", which is a state$(\alpha |0\rangle + \beta |1\rangle) \otimes |0...0\...

2

AHusain's answer is absolutely correct, but perhaps lacks some detail. The circuit that you want to implement is Basically, the key is to realise that you want to apply phase $e^{i\alpha}$ to the basis elements $|00\rangle$ and $|11\rangle$, and $e^{-i\alpha}$ otherwise. In other words, you care about the parity of the two bits. If you can compute that ...

1

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 ...

0

Conjugate by a CNOT, you'll see a controlled unitary of multiplying by $e^{\pm 2i a}$ depending on which CNOT you do and an overall phase of $e^{\mp i a}$.

1

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.

0

I guess what you may need is the Pauli's operators https://qiskit.org/documentation/autodoc/qiskit.quantum_info.operators.pauli.html?highlight=pauli%20operator#module-qiskit.quantum_info.operators.pauli https://www.sciencedirect.com/topics/engineering/pauli-operator B.R Parfait

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 \... 4 In:= H = 1/Sqrt*{{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, 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 ... 1 #This line creates the circuit instance circuit = cirq.Circuit() #These lines creates the cubits you want to use from a given length length = 3 qubits = [cirq.LineQubit(i) for i in range(length)] #Here you assign the control qubits (the first two) and then the target qubit controlled_rotation_on_Z = cirq.Z.controlled_by(*qubits[:-1]) circuit.append(... 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: \... 2 With ancillas, you could construct a gate that is controlled on the n qubits being 0 to apply X to the ancilla. This can be done with polynomially many gates and ancillas. Once you have that, you can apply contolled e^{-i \theta} on any of the original n. Then do all the uncomputation. 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 ... 4 Start No control equals each control \forall U : U = C(U) \cdot \bar{C}(U) Opposite controls commute \forall U, V : [C(U), \bar{C}(V)] = 0 No control equals each control \forall U : U = C(U) \cdot \bar{C}(U) Self-inverse operations self-cancel Done More generally, for any "V conjugated by U" operation of the form U_a \cdot C_b(V_a) \cdot U_a^{-... 2 There is a way to simplify it down slightly - for some controlled unitary C\left(U\right)=I\oplus U and some arbitrary unitary V (of the same dimension as U),$$\left(I\otimes V\right).C\left(U\right).\left(I\otimes V^\dagger\right) = \begin{pmatrix}V&0\\0&V\end{pmatrix}\begin{pmatrix}I&0\\0&U\end{pmatrix}\begin{pmatrix}V^\dagger&0\\...

0

DaftWullie's answer certainly does the job but there are also other methods: For a $2\times 2$ unitary $U$, you can perform an eigendecomposition: for $$\Lambda = \begin{pmatrix}\lambda_+&0\\0&\lambda_-\end{pmatrix} = \begin{pmatrix}e^{i\phi_+}&0\\0&e^{i\phi_-}\end{pmatrix}$$ and $$V = \begin{pmatrix}v_+&v_+\end{pmatrix},$$ where $\... 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 ... 3 You would be better off trying to write $$R_y(\pi/4)=e^{i\alpha}R_z(\beta)R_x(\gamma)R_z(\delta)=e^{i\alpha}R_z(\beta)HR_z(\gamma)HR_z(\delta)$$ and solving for the parameters in there. By the way, what you're essentially interested in is$\sqrt{Z}R_x(\pi/4)\sqrt{Z}^\dagger$, up to some possible phases. Hopefully that indicates what angles of rotation you'... 0 Quite simply: it's on the to-do list. Here is a sneak peak of how it will be done. 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. 4 The intuition, roughly speaking, is that the only way that you're going to get some difference between classical and quantum computing is if you are able to prepare qubits in a superposition. If you remain in a basis state the whole time, you just have a classical computation. So, you need superposition. Hadamard is the gate that prepares superpositions at ... 2 Let me work out here the more general case, in which you have a controlled operation but in which the "turned-off" and "turned-on" states are not necessarily \ket0 and \ket1. Consider a generic controlled operation$$\newcommand{\ket}{\lvert #1\rangle}\newcommand{\ketbra}{\lvert #1\rangle\!\langle #2\rvert} \mathcal U=\ketbra{\phi_1}{\phi_1}\...

Top 50 recent answers are included