Questions tagged [hadamard]

Single qubit Hadamard gate transforms standard basis states (zero and one states) to their superpositions (plus and minus states)

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

Understanding Deutsch Algorithm

From the image below, if we focus on the first qubit, we know after Hadamard (state 1) $|0\rangle$ will become $|+\rangle$ and the second qubit $|1\rangle$ will become $|-\rangle$. What exactly would ...
0
votes
1answer
42 views

How do two H gates act on two entangled qubits?

In this circuit, if the two qubits are initial in state 0, then after the oracle they are entangled and in state: $0.5 * (|00\rangle+|01\rangle+|10\rangle-|11\rangle)$ My question is how do the two H ...
6
votes
2answers
362 views

How to generalize the relationship HXH = Z for higher dimensions

Concerning the Hadamard gate and the Pauli $X$ and $Z$ gates for qubits, it is straightforward to show the following relationship via direct substitution: $$ HXH = Z.\tag{1}$$ And I would like to ...
3
votes
1answer
62 views

Is it possible to tune the amplitude of superposition generated by Hadamard gates?

I had a question earlier about generating the superposition of all the possible states: Here. In that case, we could apply $H^{\otimes n}$ to the state $|0\rangle^{\otimes n}$, and each state has the ...
1
vote
2answers
148 views

How to describe the state of a qubit passing through two Hadamard gates? [duplicate]

Describe the state of the qubit at points A, B and C. How does this demonstrate that we need the “ket” (or the vector) representation of qubits, rather than just describing them in terms of ...
2
votes
1answer
50 views

What is a complexity of producing arbitrary equally distributed superposition?

In the article An Optimized Quantum Maximum or Minimum Searching Algorithm and its Circuits I found statement (pg. 4): Preparing an initial state takes $\log_2(N)$ steps. In this case the initial ...
2
votes
1answer
42 views

Is there an error on Qiskit.org textbook with the superdense coding section?

The textbook on Qiskit.org has When the H-gate is applied to first qubit, it creates superposition and we get the state $|0+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$ Shouldn't it be: $$|...
-1
votes
1answer
120 views

What Hamiltonians generate Hadamard and CNOT? [closed]

Find a $2 \times 2$ Hamiltonian $H_H$ such that $e^{iH_H}$ equals the Hadamard matrix and a $4 \times 4$ Hamiltonian $H_{CNOT}$ such that $e^{-iH_{CNOT}}$ equals the matrix of the CNOT gate. I have ...
2
votes
1answer
56 views

How does $U_f$ act on a qudit state in the Deutsch-Jozsa Algorithm

The problem starts with the given the input state $|\psi_{in} \rangle = |0 \rangle |1 \rangle$, I'm asked to calculate $|\psi'\rangle = H_d \otimes H_d |\psi_{in} \rangle$ where $H_d$ is the Hadamard ...
3
votes
2answers
69 views

Show that the two circuits are equivalent mathematically

This exercise wants me to prove the equivalence of the two circuits using their mathematical representations. Circuit 1: Circuit 2: Circuit 1 (q1 CNOT ...
5
votes
2answers
100 views

Show that the Hadamard gate is equivalent to a 180 degree rotation of a certain axis

Show that the Hadamard gate is equivalent to a 180 degree rotation about the axis defined by $(\vec{e_x} - \vec{e_z}) / \sqrt{2}$ where $\vec{e_x}$ and $\vec{e_z}$ are unit vectors pointing along the ...
2
votes
1answer
100 views

How does the outcome of measurement of a qubit change when we use different basis despite the system hasn't changed? [closed]

Let's assume that the quantum state of the system is written in a standard basis {$|0\rangle, |1\rangle$} and when we performed a measurement we got $|0\rangle$ as an outcome of measurement so we ...
3
votes
1answer
52 views

Mistake in using dirac notation when applying $X$ gate to vector

The X gate is given by $\big(\begin{smallmatrix} 0 & 1 \\ 1 & 0 \end{smallmatrix}\big)$ in the computational basis. In the Hadamard basis, the gate is $X_H = \big(\begin{smallmatrix} 1 &...
3
votes
1answer
54 views

Measuring in the computational basis in the single qubit gate QFT implementation

I've come across this paper about a single-qubit-gate-only QFT implementation. In the paper it is claimed that measuring a qubit after applying the Hadamard gate (it isn't called Hadamard gate in the ...
1
vote
1answer
63 views

A CNOT between two Hadamard gates: why does the CNOT changed the output of the second Hadamard gate?

Applying the Hadamard gate twice in a row, it restores the original input: https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22H%22]]} However, if a CNOT control is added between the two ...
3
votes
1answer
37 views

Definitions of $D_y$ gate in Hamiltonian simulation: are they the same?

I'm reading a Hamiltonian simulation example proposed in this paper. From their notation, the operator $D_y$ (sometimes it's called $H_y$) serves the function to diagonalize the Pauli matrix $\sigma_y(...
3
votes
2answers
86 views

Transforming $|100\rangle$ state into $|000\rangle + |111\rangle$ state using only Hadamard and CNOT gates

Hi, How to convert $|100\rangle$ 3-qubit quantum state into $\frac{1}{\sqrt{2}}(|000\rangle + |111\rangle)$ state using only Hadamard and CNOT gates? Also, is output state an entangled one?
3
votes
3answers
98 views

How are the IBM's and Google's Hadamard gates fabricated and operated?

There are thousands of articles, books and web sites describing the Hadamard Gate from a theoretical point of view. But I haven't been able to find any photo about any real implementeation of a ...
2
votes
2answers
117 views

Transforming $|01 \rangle + |10 \rangle - |11 \rangle \to |01 \rangle - |10 \rangle + |11 \rangle$

How to convert from current state: $$|\psi \rangle =\dfrac{ |01 \rangle + |10 \rangle - |11 \rangle}{\sqrt{3}}$$ into a target state $$|\phi \rangle = \dfrac{|01 \rangle - |10 \rangle + |11 \rangle}{\...
1
vote
3answers
82 views

Why 2 $H$ gates in series create a probability of 100% for one value of the qubit and 0% of the second value of the qubit?

Why 2 $H$ gates in series create a probability of 100% for one value of the qubit and 0% of the second value of the qubit since an $H$ gate acts like a superposition generator?
3
votes
1answer
89 views

Confused about the application of Hadamard gate to uncorrelated qubits [duplicate]

Why does applying the following circuit on a $00$ state produce $|0\rangle \otimes |+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$. Shouldn't it produce $ |+\rangle \otimes |0\rangle = \...
2
votes
1answer
48 views

Is there a clear boundary between quantum coupling and quantum entanglement?

I have a few questions in understanding the difference between coupling and entanglement in quantum systems: Is there a clear boundary between quantum coupling and quantum entanglement? If two quantum ...
1
vote
2answers
140 views

How do I apply the Hadamard gate to one qubit in a two-qubit pure state?

So in lectures I see lots of these: And somehow I intuitively understand it (at least for the 1 qubit case), but I don't understand the math – especially for 2 qubits.
1
vote
3answers
90 views

How do I apply a Hadamard gate on a given qubit, in matrix formalism?

Hadamard gate matrix is: $$\frac{1}{\sqrt2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}$$ The matrix for $|0\rangle$ is: $$\begin{bmatrix}1 \\ 0\end{bmatrix}$$ I am unable to understand, how ...
3
votes
1answer
496 views

How to translate the Hadamard gate matrix into Dirac notation?

Hadamard gate matrix is: $$\frac{1}{\sqrt 2}\begin{bmatrix}1 && 1 \\ 1 && -1\end{bmatrix}$$ The Dirac notation for it is: $$\frac{|0\rangle+|1\rangle}{\sqrt 2}\langle0|+\frac{|0\...
1
vote
2answers
53 views

Calculation of the system states and the individual wire states in a quantum circuit

I am bit confused with calculating the overall state of a quantum gate and the individual wire states. For example, lets say there are two Qubits, where Q1 is in $\frac{1}{\sqrt{2}}(\vert 0\rangle + \...
0
votes
2answers
93 views

Generate a random bit sequence of 512 bits [duplicate]

How can I generate a random bit sequence of 512 bits on IBM Q experience using 3 or 5 qubits? Putting a hadammard gate and measuring would only give me smaller bit sequence due to limitation in number ...
0
votes
1answer
103 views

What is the matrix representation of the Hadamard gate in the computational basis?

I read about Hadamard gate H and found it's matrix representation as follows: $$H_1=\frac{1}{\sqrt 2}\begin{pmatrix}1 & 1 \\1 & -1\end{pmatrix}$$ I wanted to know what will be the matrix ...
1
vote
1answer
63 views

Hadamard gate for three qubits; inconsistency between IBM and Matlab

I am trying to build a large and quite complex three qubit quantum circuit on IBMs quantum computer. I have a specific unitary which I am trying to implement and I am building a circuit following the ...
0
votes
1answer
103 views

What is the output of applying the Hadamard matrix to $\sum_{y\in\{0,1\}^n} (-1)^{xy}|y\rangle$?

If, for some $x$, I have the $n$-qubit state $$\sum_{y\in\{0,1\}^n} (-1)^{xy}|y\rangle,$$ and I would like to apply to that the $n$-qubit Hadamard transform, with the aim of calculating the final ...
4
votes
2answers
206 views

Hadamard Test to calculate imaginary part

I am trying to understand the Hadamard Test by finding the average value of $U_1$, which is a diagonal matrix with $1$ everywhere except on the first element. I performed the regular Hadamard Test as ...
1
vote
1answer
62 views

Hadamard direct mapping of input to output in $\theta$ and $\varphi$ form

I was wondering what would be an equation for Hadamard operation for a single qubit, given the input as the current $\theta$ (0 to $+\pi/2$) and $\varphi$ ($-\pi$ to $+\pi$) and output expected in $\...
1
vote
1answer
67 views

What are the I, X, Z gates in quantum gates? [closed]

Can someone please explan how the $\rm I$, $\rm X$ and $\rm Z$ gates work? If $\rm{I = X^2 = Z^2}$, can you explain why this is the case or why it wouldn't work?
0
votes
1answer
71 views

How to undo an operation in qiskit on jupyter notebook?

I am not able to undo an operation. For example, I want a single Hadamard gate on a single qubit but by mistake two Hadamard gate added. Now I want to remove one of them without interrupting kernel. ...
2
votes
1answer
45 views

Prove that QFT and Walsh-Hadamard gates give the same output when acting on $\lvert x\rangle\lvert 0\rangle$ [duplicate]

I know that $QFT_n|0\rangle$ is equivalent to $H_n|0\rangle$ (mathematical proof). And it is also easy to prove that $QFT_1$ is equivalent to $H_1$ (applied to one QuBit). From looking at the circuit ...
2
votes
1answer
102 views

N-Qubit Hadamard vs Quantum Fourier Transform

Both Simon's algorithm and the algorithm for period finding begin by placing qubits in the equal superposition state, but Simon's algorithm uses the n-qubit Hadamard $H^{\otimes n}$ while the period ...
2
votes
2answers
123 views

Why do we divide by $\sqrt2$ in the qubit states $\lvert\pm\rangle=\frac{1}{\sqrt2}(\lvert0\rangle\pm\lvert1\rangle)$?

I have a very basic question. I have found qubits are represented as complex vectors. I get it totally. I understand bracket notation and vector\matrix algebra. However, I cannot move further from ...
2
votes
1answer
49 views

Randomness using simple parallel Hadamard circuit

I've recently tried to build a Random generator using 5 hadamard gates (shown as U2 below) measured to 5 classical bits in parallel as shown in the circuit image. I've executed this circuit for 8192 ...
5
votes
0answers
133 views

Hadamard Overlap Test

I am trying to understand a test called Hadamard Overlap Test, which consists of a destructive swap test (section IV of swap test and Hong-Ou-Mandel effect are equivalent) right after a Hadamard test. ...
1
vote
2answers
460 views

Is there a gate that puts a qubit into superposition with a not so purely probabalistic (50 50) outcome?

I know that a Hadamard states is a purely probabalistic one; e.g. $$H\vert 0\rangle=a\vert 0\rangle+b\vert 1\rangle$$ where $a^2=0.5$ and $b^2=0.5$. Are there any states in which the ...
2
votes
1answer
73 views

Hadamard gate with two inputs in the circuit for the BB84 protocol?

I am reading the book "Quantum Computing verstehen" by Matthias Homeister. At the moment i'm having a look at the BB84 protocol (which is described in kind of an abstract way). In this chapter a ...
2
votes
1answer
20 views

How can I make qiskit output raw data?

I am new to quantum computing, and I want to make a program to output 0 or 1 randomly by Hadamard gate, and use that information to make a GUI interface. For example, a coin flip program that output "...
2
votes
1answer
79 views

Probabilities does not sum up to 1 in simple circuit

I have an issue, perhaps with normalization with the following state. For $\alpha^2 + \beta^2 =1 $, the probabilities in this state does not sum up to 1. $$|\psi\rangle := \frac{1}{2}\left[\alpha\...
1
vote
2answers
92 views

What happens if $|\psi\rangle$ = $|0\rangle$ or $|\psi\rangle$ = $|1\rangle$ is passed as an input to two Hadamard gates in sequence?

I'm a computer science student and soon I will have a math exam. I'm really struggling with this preparation question. Also, includes the following: How does this demonstrate that we need the “ket” ...
3
votes
1answer
55 views

$H = e^{i\pi/4} \sqrt{iNOT}$?

In the paper Valley qubit in Gated MoS$_2$ monolayer quantum dot, a description of how a $NOT$ gate would be performed on a qubit in the described device is given. The authors say that in the ...
1
vote
1answer
276 views

Simple algebraic explanation for normalizing states

I'm wondering how a set of three 0-state qubits, each prepared identically, like so: When considered together, may produce the fraction: along with their combined states. This is the entire circuit....
4
votes
2answers
1k views

How should I understand the change of qubit's basis as a rotation?

I have a little difficulty with understanding. How do I properly visualize the change of qubit's basis as a rotation? Let's say that we have classical basis vectors, $|0\rangle$ and $|1\rangle$. Now, ...
1
vote
1answer
121 views

Hadamard/Phase/Hadamard and Inversion about the Mean

I understand the matrix multiplication behind Grover's algorithm, but I'd like to get an intuitive grasp on why sequence of gates Hadamard-Phase-Hadamard does inversion about the mean. Can anyone help?...
1
vote
2answers
227 views

How to construct a IBM Quantum Experience circuit for the following state transformation?

Please help me in building IBM Quantum Experience circuit for: $$ M|0\rangle = \frac{1}{2}(|0\rangle+|1\rangle+|2\rangle+|3\rangle) $$ Edit: Is it possible to make a circuit for a general ...
3
votes
1answer
146 views

Generate the state $\frac{-|0\rangle + |1\rangle}{\sqrt{2}}$ with qiskit: problem with Pauli-Z behavior

I want to construct the following state of a qubit using a quantum circuit: $\frac{-|0\rangle + |1\rangle}{\sqrt{2}}$ When I use the following qiskit code in Python: ...