# Tag Info

12

While the QFT and Hadamard transforms are different, their action on the input state $|00\ldots 0\rangle$ is identical; both produce the uniform superposition of all states. So, if you've got a choice of which to use, you shoulduse the one that is the easiest to implement: the Hadamard transform. Hadamard Transform: $$H|0\rangle=\frac{|0\rangle+|1\rangle}{\... 7 First of all, note that the statement, as written, is wrong (or rather, it is correct only as long as the "\equiv" symbol is taken to mean "equal up to a phase"). An easy way to see it is by computing the determinant of H=e^{i\pi H/2}, which gives -1=1 (using \det[\exp(A)]=\exp[\operatorname{Tr}(A)]  for all A and \operatorname{Tr}(H)=0). Now, ... 6 The Hadamard gate has close ties to the discrete Fourier transform. Consider the DFT for an N-level system:$$\vert j \rangle = \frac{1}{\sqrt{N}} \sum\limits_{k=0}^{N-1} e^{\frac{i2 \pi j k}{N}} \vert k \rangle.$$For N=2 this is simply$$\vert j \rangle = \frac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix} \, \vert k \rangle = H \...

6

You can use $Ry$ gate to prepare a qubit in superposition with arbitrary probabilities. When you apply the gate on qubit in state $|0\rangle$, you get a qubit in superposition $$|\psi\rangle = \cos(\theta/2)|0\rangle + \sin(\theta/2)|1\rangle.$$ By chaning angle $\theta$ you can set any probability you want. For setting $\theta = \pi/2$ you will get ...

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 &... 5 For questions like this, the conventional physics notation is easier to work with than the QIT gate notation. Define \vec \sigma = (\sigma_1,\sigma_2,\sigma_3) to represent the three Pauli matrices$$\sigma_1 = X = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, \;\;\; \sigma_2 = Y = \begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix}, \;\;\; \...

5

Welcome to QCSE. You already know that $a^2=b^2=0.5$. For a single qubit gate akin to the Hadamard gate you can achieve any two probabilities you want, as long as they add to $1$. For example one trick that I learned was that you could choose ratios of Pythagorean triples, i.e. numbers $a$,$b$,$c$ such that $a^2+b^2=c^2$. Let's have a gate called $\... 5 The issue is that you are using noisy hardware with imperfect operations and measurements. In particular, the most likely problem here is that after you prepare a qubit it immediately begins decaying towards the ground state$|0\rangle$via interactions with the environment. Each qubit will be slightly more likely to be measured as 0 instead of 1 than you'd ... 4 Whether or not quantum superposition is a "truth", is a philosophical question. Quantum theory is simply an axiomatic mathematical model of the universe that happens to give correct experimental predictions (at least, for a fairly broad range) for several physical phenomena. It certainly might be possible to come up with a different mathematical model of the ... 4 If you look at the formula you want to prove term-by-term, you'll notice that the sum and the$(-1)^f(x)$part is the same in both formulas; you just need to show that $$H^{\otimes n} |x\rangle = \frac{1}{\sqrt{2^n}} \left( \sum_{y=0}^{2^n-1} (-1)^{x \cdot y} |y\rangle \right )$$ You can either show this strictly by induction (similar to this question but ... 4 You did more than you needed to in part i. You effectively did part ii already. Because $$g = \frac{u}{\sqrt{\det{u}}}$$ is in$SU(2)$, the phase you need to multiply by is$\frac{1}{\sqrt{\det{u}}}$. $$\det H = -1/2-1/2 = -1$$ So to get in$SU(2)$, you need to multiply$\sqrt{-1}=\pm i$. That is seen as the$e^{\pi i /2}$you see as the prefactor ... 4 Generally, quantum states are determined up to a phase - i.e. up to multiplication by scalar. So$\frac{\left|0\right\rangle -\left|1\right\rangle }{\sqrt{2}},\frac{-\left|0\right\rangle +\left|1\right\rangle }{\sqrt{2}}$are essentially the same state. It is a good question how the statevector simulator chooses to normalize its statevector representation. 4 The Hadamard gate is: $$\frac{1}{\sqrt 2} \left(|0\rangle \langle 0 | + |0\rangle\langle 1| + |1\rangle \langle 0| - |1\rangle \langle 1|\right)$$ And since$|+\rangle$is$\frac{1}{\sqrt 2}\left(|0\rangle + |1\rangle \right)$, you can work out that$H(|+\rangle) = |0\rangleSo, $$CNOT(H|+\rangle \otimes |+\rangle)$$ $$= CNOT(|0\rangle \otimes |+\... 4 The Hadamard gate is described by this matrix $$H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$$ Conjugate transpose of H is again H. Hence we have to check if HH is I. Multiplication goes as follows (h_{ij} denotes elements of resulting matrix): h_{11} = 1\cdot1 + 1\cdot1 = 2 h_{12} = 1\... 4 Your first formula is not correct. The correct formula for Hadamard gates for the arbitrary |x\rangle from the calculational basis is (it can be proved by induction):$$H^{\otimes n}|x\rangle=\frac{1}{\sqrt{2^n}} \sum_{y=0}^{2n-1}{(-1)^{x\cdot y}}|y\ranglewhere x\cdot y=x_0y_0\oplus x_1y_1\oplus x_2y_2\oplus ...\oplus x_ny_n In case |x\rangle = |0\... 4 The |+⟩ and |-⟩ are states given by the following decomposition in the Z-basis: \begin{aligned} |+⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ + |1⟩\Big)\\ |-⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ - |1⟩\Big) \end{aligned} As from quantum mechanics, you can see that there's a 50% chance for both states to be found in the |0⟩ or |1⟩ ... 4 Hadamard gate can be interpreted as a rotation in 3D Euclidean space (on Bloch sphere) by angle \pi around X+Z axis. The qubit rotation by angle \theta around axis pointed by unit vector \textbf{n}=\{n_x,n_y,n_z\} is described by rotation operator (X, Y and Z are Pauli matrices) \begin{align} R_{\textbf{n}}(\theta)=&n_xe^{-i\frac{\theta}{2}X}... 4 The coefficient \frac{1}{\sqrt{2^3}} is the normalization factor: if you have a 3-qubit state that is an equal superposition of 8 basis states, its norm still has to be 1; thus the squared amplitude of each basis state has to be \frac{1}{8}, and the amplitude will be square root of that, i.e. exactly \frac{1}{\sqrt{2^3}}. You can also obtain that ... 4 It cannot be the case that H=e^{i\pi/4}\sqrt{iNOT}. Whatever your interpretation of iNOT (I'd agree with your definition), just square the thing. H^2=I, the identity, and so it is certainly not the case that I=e^{i\pi/2}iNOT. $$It is true, however, that if you perform the sequence that would give you an operation such as NOT or iNOT, and you ... 4 This is the matrix representation of H in the computational basis. The first column is the image of |0\rangle and the second column is the image of |1\rangle. The reason that H looks the same in both the computational and the "plus/minus" basis is that H is a self-adjoint (or hermitian) unitary, this makes it very special as it means that ... 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} = \... 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}...

3

The $H$ gates do not replace a Quantum Fourier Transform. The Quantum Phase Estimation algorithm is defined as shown in the picture you linked in your question: Hadamard gates on all the "ancillary" qubits Controlled unitary matrices (controlled circuits) Inverse QFT. Having an inverse QFT at the end of the circuit does not necessarily mean that there ...

3

Summarization based on discussion with user met927: Transpiled circuit form depends on used backend - it is different for simulator and real quantum processor: On simulator, the $\mathrm{CH}$ gate is transpiled to the circuit shown above On real quantum processor, the gate is implemented with two $\mathrm{U2}$ gates and $\mathrm{CNOT}$ (i.e. like in the ...

3

[Can't comment and so, writing an answer] As @Sanchayan aptly pointed the theoretical/mathematical arguments which could indicate that superposition is not just an assumption. A couple more thoughts: You're right in observing that the superposition collapses to 0 or 1 when observed and that's expected due to the collapse of the wave function. A quick ...

3

The circuit you have described is formed of 2 qubits, both in an equal superposition. This can be achieved by applying the H gate to both qubits, as this puts each qubit into superposition and takes us up to 4 possible states. In the IBM Quantum Experience, this circuit would look like

3

The four Bell states are $$|\Phi_{\pm}\rangle=(|00\rangle\pm|11\rangle)/\sqrt{2}\qquad |\Psi_{\pm}\rangle=(|01\rangle\pm|10\rangle)/\sqrt{2}.$$ So, let's consider what happens then we try and measure in the Bell basis, i.e. project onto one of these four states. If we started with the state $|00\rangle$, then we can write it as  |00\rangle=\frac{1}{\sqrt{...

3

If you apply the same gate twice on a state $|\psi\rangle$ you will get out the state $|\psi\rangle$ if the hermitian of the gate is the same as the gate. In your case, you applied the Hadamard gate, $H$, twice on (presumably) the $|0\rangle$ state, and so you got $|0\rangle$ as your result. This happens because it is a requirement for quantum computing ...

3

Most probably because your input state was $|0\rangle$. The Hadamard gate has the property that $H^2=I$, thus acting on an arbitrary input $|\psi\rangle$ with the Hadamard gate twice in a row results in the output being identical to the input (that is, $|\psi\rangle$).

3

Hint: Consider the series expansion of the exponential in the case of matrices $M$ that satisfy $M^2=-1$ (in your case $M=i \frac{X+Z}{\sqrt(2)}$. You should find something akin to Euler's formula which renders the proof trivial.

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