# Tag Info

7

As Davit Khachatryan's answer points out, the task is impossible / ill-defined, since the desired target state is generally not normalized and it depends on the relative global phases of the two initial states. However, it is possible to rephrase the question so that is meaningful and has an interesting answer. The two problems -- sensitivity to the global ...

6

First remember that each matrix element can be written as outer products in Dirac notation: $$|0\rangle\langle 0| = \begin{bmatrix}1 & 0 \\ 0 & 0 \end{bmatrix},|1\rangle\langle 1| = \begin{bmatrix}0 & 0 \\ 0 & 1 \end{bmatrix},|1\rangle\langle 0| = \begin{bmatrix}0 & 1 \\ 0 & 0 \end{bmatrix}, |0\rangle\langle 1| = \begin{bmatrix}0 &... 6 It's a fantastic question because the typical measurement intuition we apply no longer is sufficient - it's really necessary to formalize measurement. Specifically, we create a set of nonlinear operators M_\psi = |\psi \rangle \langle \psi |, where the probability of measuring \psi on an arbitrary state |\phi\rangle  is \langle \phi | M^\dagger M | \... 5 A counterexample that shows that this is not possible in the general case (here I am neglecting post-selection possibility discussed in the comments of the question and in the accepted answer):$$ C_1 = X \qquad C_2 = -X$$Or one can take C_2 = R_y(- \pi) and all mentioned below equations will reamin true. So:$$C_1 |0\rangle = |1\rangle = |\psi \rangle \...

4

When you evolve a pure state under the action of a gate $U$, it evolves from $$|\psi\rangle\rightarrow U|\psi\rangle.$$ However, a density matrix such as $\rho=|\psi\rangle\langle\psi|$ evolves differently. You must calculate $$\rho\rightarrow U\rho U^\dagger.$$ So, in this case, you must calculate $$\left(\begin{array}{cc} 0 & 1 \\ 1 & 0 \end{... 4 Note that:$$ X |0\rangle = |1\rangle \hspace{1 cm} X|1\rangle = |0\rangle $$but$$ Y |0\rangle = i|1\rangle \hspace{1 cm} Y|1\rangle = -i|0\rangle $$So X \neq iY. In fact, the set \{I, X, Y, Z\} is an orthogonal basis set for 2 \times 2 matrices. They are not just some factor off from each other. They are independent from one another. As for ... 4 |0> is actually a vector, not a matrix. Applying the Hadamard gate (shortly, H) to |0> means computing a matrix vector multiplication: H|0\rangle = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \frac{|0\rangle + |1\rangle}{\sqrt{2}... 4 Applying quantum gates to quantum states is indeed represented as matrix multiplication. To multiply two matrices, you need only one dimension to match:$$\frac{1}{\sqrt2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix} \begin{bmatrix}1 \\ 0\end{bmatrix} = \frac{1}{\sqrt2}\begin{bmatrix}1 \cdot 1 + 1 \cdot 0 \\ 1 \cdot 1 + (-1) \cdot 0 \end{bmatrix} = \...

3

This is known as "Phase Kickback" in quantum computing. It is a trick that uses in a many quantum algorithms. The phase of the target qubit can kickback to the control-qubit and changes the phase of it. Take a look here: Phase Kickback

3

Short answer: both can be correct, depending on the state to which the CNOT gate is applied. At the first slide the presentation talks about the effect of CNOT gate on basis states. And indeed, if the input to the CNOT gate is a basis state, it only changes the state of the target qubit. At the second slide, the CNOT gate is applied to a superposition of ...

3

For a single CNOT operation, the simplest approach is to think in terms of Boolean logic. Mathematically, this is usually represented by modular addition, which gives the action of CNOT as $$\vert A, B \rangle \rightarrow \vert A, A \oplus B \rangle,$$ where $\vert A, B \rangle$ is the tensor product of $\vert A \rangle$ and $\vert B \rangle$, and $\oplus$ ...

2

Applying X gate to the $|0\rangle$ state gives you $|1\rangle$, and applying Y gate to the $|0\rangle$ state gives you $i|1\rangle$. These states differ only by a global phase (the $i$ scalar multiplier in the second case), so they are not physically distinguishable (you cannot set up an experiment to observe the difference between them). Bloch sphere ...

2

You can consider X and Z gates as "inversion" in computational basis and circular and Hadamard bases, respectively. Lets start with X. It holds that $$X|0\rangle = |1\rangle\,\,\,\,\,\,\ X|1\rangle = |0\rangle,$$ so X is analogical to classical negation, i.e. it converts 0 to 1 and conversely. Instead of computational basis $\{|0\rangle, |1\... 2 Currently, I do not know of any quantum processor allowing to condition a quantum operation on results in a classical register. On IBM Q, it is possible to do so in simulator only. However, if you are dealing with quantum circuits like quantum teleportation or superdense coding, where you use such conditioning, you can simply use controlled quantum gates ... 2 Let me consider this example: if we have$|01\rangle$then the circuit should give us at the output$|11\rangle$. Here I will try to show why I think this is impossible (by assuming that we don't do any measurements). Let's assume that we have the desired gate and we want to apply it to this state$\frac{1}{\sqrt{3}}(|00\rangle +|01\rangle - |11\rangle)$: $$... 2 I assume you're happy with the idea that the state before measurement is$$|O_{out}\rangle=\frac12|0\rangle(|\phi\rangle|\psi\rangle+|\psi\rangle|\phi\rangle)+\frac{1}{2}|1\rangle(|\phi\rangle|\psi\rangle-|\psi\rangle|\phi\rangle).$$Now you want to measure qubit 1 in the 0/1 basis. There's a couple of different ways you might approach this. Define the two ... 2 Here's one way to do it. Let's start with some assumptions: here, I'm assuming your circuits C_1 and C_2 use the same number of qubits. In the drawing, I have used four qubits to illustrate the concept, but that doesn't matter. The answer below does not care about the number of qubits (which I call n), just that the two circuits have the same number of ... 2 Since we are talking about a unitary operation on qubits, i assume d = 2^n where n is the number of qubits. We define the unitary operations V_{a} = \sum_{x=0}^{d - 1} | x + a \rangle \langle x| and D_{b} = \sum_{x=0}^{d - 1} \omega_d^{bx} | x \rangle \langle x| . Notice that we can write U_{a, b} = V_a \cdot D_b . In the Fourier basis (see ... 2 As many things in life, the answer is "it depends". If you backend have support of Toffoli gates (that is, in Qiskit language, they are part of their basis gate set), then option 1 is better. If, like in most of the IBM backends at the moment, you only have CXs, then option 2 seems better. Let alone topology considerations like the coupling map. If ... 2 The two CNOTs that have gone missing have been moved rightward until they reach the CNOT between the two top qubits. They are then moved through that CNOT, which cancels one of them out. The remaining one was then moved to the right side of the circuit using the fact that its control can travel unmodified through phasing operations (S, T) and paired CNOTs. ... 1 For circuit equalities I find using quirk with the state-channel duality super useful where you setup the inverse of a circuit, see the identity in the amplitude display and then play around with the gates then on the left side. In the given equality this is my thinking: I'm going to ignore the equivalent prefix of the two circuits this circuit is CNOT ... 1 I will do my best to answer from my understanding of your question: I am assuming you mean something like Unitary Coupled Cluster variational form where it is implemented the exponential to the initial state |\psi \rangle$$ e^{T - T^\dagger}$$here$T$is the cluster operator, which, when acting on$|\psi\$, produces a linear combination of excited ...

1

Look at the start of the multiqubit section in , in particular the section on basis vector ordering. I found the ordering of qubits to be very strange in qiskit possibly this is your error as well? For example the state |10> corresponds to qubit 0 being in state |0> and qubit 1 in state |1>, contrary to what you might expect https://qiskit.org/...

1

Different quantum channels can cause the same gate error. One option is to assume that the gate error is caused by a depolarizing channel, followed by thermal relaxation. This is the assumption made in NoiseModel.from_backend, whose documentation can help you: https://qiskit.org/documentation/stubs/qiskit.providers.aer.noise.NoiseModel.from_backend.html#...

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