2022 Developer Survey is open! Take survey.

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
4 votes
1 answer
99 views

Constructing a pure state in Bloch sphere using 3 gates

We have the 3 following gates : $$ H = \dfrac{1}{\sqrt{2}}\begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix} $$ $$ R(\varphi) = \begin{bmatrix}1 & 0 \\ 0 & e^{-i\varphi} \end{bmatrix} $$ $$ ...
user avatar
  • 87
1 vote
2 answers
98 views

How to obtain the state $|0\rangle+|1\rangle$ from $|0\rangle$ via Pauli gates?

Could somebody explain in which way are we able to achieve superposition with Pauli $X$, $Y$, $Z$ matrices? In case of Hadamard gate $H$ we change coefficients to $1/\sqrt{2}$ directly, in case of $X$ ...
user avatar
0 votes
1 answer
36 views

Qiskit: bind parameters to sub-circuit

I am trying to implement a Hadamard test on a parametrized sub-circuit $V(\bf{a})$. I create an outer circuit and then append the parametrized $V(\bf{a})$ to it. ...
user avatar
  • 45
1 vote
1 answer
58 views

In the Bernstein-Vazirani algorithm, what is the use of the second Hadamard gate?

In the Bernstein-Vazirani algorithm, what is the use of the second Hadamard gate? What happens if I remove it? Would the algorithm works fine? I read something about it closing the interference.
user avatar
  • 143
2 votes
1 answer
42 views

Why does application of Hadamard gate on $|0\rangle$ inverts the state on bloch sphere?

I am trying to understand what is the affect of Hadamard gate on qubit. So far, I understand that applying $H$ gate on qubit, puts the qubit into superposition state where the probability of the qubit ...
user avatar
4 votes
3 answers
198 views

How to represent the Hadamard gate as a rotations on the Bloch sphere?

I am new to Quantum Computing, and I have decided to try and learn the quantum gates. I am trying to understand how to represent some basic gates as rotations on the Bloch Sphere. I was able to ...
user avatar
1 vote
2 answers
94 views

Creating an entangled state in Hadamard basis (Qiskit)

I am familiar with building a quantum circuit of an entangled pair providing that they are in the computational basis: |ψ⟩ = 1/√2 (|00⟩ + |11⟩) This circuit works great. I am trying to build the ...
user avatar
2 votes
2 answers
89 views

Commutation rules between Pauli $X$ and controlled-Hadamard

Are there any known commutation rules between the $X$ gate and the $CH$ gate?
user avatar
1 vote
1 answer
52 views

Simon's Algorithm: Calculating the effects on the second Hadamard gate and the resulting amplitudes

I am currently reading about Simon's algorithm in "An Introduction to Quantum Computing" and stumbled over Exercise 6.5.1, that ask the reader to show that: Let $\textbf{x}, \textbf{y} \in \...
user avatar
3 votes
1 answer
51 views

Hadamard Test Circuit Missing Term

I am trying to understand a specific Hadamard Test circuit used to calculate the direct product coefficient $$ B_{l,m} = \langle 0|V^{\dagger} A^{\dagger}_m A_l V |0\rangle $$ where $V$ is a ...
user avatar
  • 97
3 votes
2 answers
427 views

Does the X (NOT) gate affect superpositions at all?

Does "NOT" gate have any effect on qubit in superposition state? After applying Hadamard gate on qubit seems like the "NOT" gate doesn't have any effect on it. Could somebody ...
user avatar
1 vote
0 answers
37 views

I can not extract the final statevector when using a binded Parametric Controlled gate

I'm trying to implement a Parametric Hadamard Test. I have already my parametric evolution gate $\exp(-i\theta H)$ where $\theta$ is the parameter. When I defined the controlled-gate with Gate.control(...
user avatar
  • 11
4 votes
1 answer
38 views

Can you detect if the collapse of an entangled pair using a Hadamard gate?

I'm trying to understand how the Hadamard gate works with entangled pairs. If I have two particles A and B which are entangled and have gone through a Hadamard gate to become super-positioned Qubits, ...
user avatar
6 votes
1 answer
230 views

Can we use Hadamard test to estimate phases?

There have been some questions discussing the Hadamard test and quantum phase estimation (QPE), but I did not find the answer to the following question. Suppose we are given $|\psi\rangle$, which is ...
user avatar
  • 800
1 vote
1 answer
96 views

How to apply the Hadamard gate to a given qubit state?

I have this qubit state: $$ H \left[ \frac{1}{\sqrt{2}} |0\rangle + \left( \sqrt{\frac{2}{7}}+\frac{1}{\sqrt{7}}i \right) |1\rangle \right] $$ How to solve this given Hadamard gate on qubit? Hadamard ...
user avatar
0 votes
1 answer
163 views

Hadamard cascade

Anyone of you can explain (with mathematical steps) me this circuit: I do not understand why the first qubit phase (as show on IBM composer) is influenced by the second. More precisely: In circuit ...
user avatar
5 votes
2 answers
353 views

Why isn't $Ry(\pi/2)$ gate equivalent to Hadamard gate?

I've been experimenting with quantum circuits and can't quite fathom how the difference between states comes together. Speaking in terms of simulations using qiskit,...
user avatar
  • 147
2 votes
2 answers
76 views

How does measurement change the effective transformation matrix?

I have simulated three cases in Qiskit and tried doing some manual calculations to verify the simulated results. Case 1: The initial state is $\psi_i = |00\rangle = \begin{Bmatrix}1 \\0 \\ 0 \\ 0\end{...
user avatar
2 votes
1 answer
222 views

Is the CNOT in the standard three-qubit circuit for the GHZ state necessary?

This is a very basic question about the GHZ state. I know the standard construction: A Hadamard on one qubit, and then CNOT gates with targets on all the other ones. However, why can't I just have $n$...
user avatar
  • 23
1 vote
1 answer
41 views

why is $H^{⊗2}$ used to denote the parallel action of two Hadamard gates?

Why is the tensor product used here, what's its meaning? I learned tensor products as an operation between 2 matrices, and have an effect such as the follows: How does the tensor product above relate ...
user avatar
  • 599
0 votes
1 answer
49 views

Derivation of the effect of the Hadamard transform on a state |x⟩ in the Deutsch–Jozsa algorithm

On pg. 35 of Nielsen and Chuang, there's the following paragraph: By checking the cases $x=0$ and $x=1$ separately we see that for a single qubit $H|x\rangle=\sum_x (-1)^{xz}|z\rangle/\sqrt{2}$. I'm ...
user avatar
2 votes
2 answers
104 views

Are composite gates within superconducting hardware implemented as a single pulse or as a series of pulses?

If we have for example a gate $U^{\otimes2}$, then within superconducting hardware, is the $U$ applied onto the first qubit and then the second or is a pulse corresponding to a composite gate (tensor ...
user avatar
  • 139
0 votes
1 answer
73 views

Applying Hadamard gate to $\sqrt{3/4}|0\rangle + \sqrt{1/4}|1\rangle$

[I am just transferring this from Stack Overflow. It might need editing.] ———— [The reader can skip to “It all sounds fine…”, before the spreadsheet representation.] I am trying to figure out quantum ...
user avatar
0 votes
1 answer
66 views

Derivation for the result of performing the Hadamard transform on $|0\rangle^{\otimes n}$ being $2^{-n/2}\sum_x|x\rangle$

It's said that the result of performing the Hadamard transform on n qubits initially in the all |0> state is $$ \frac{1}{\sqrt{2^n}}\sum_x|x\rangle $$ where the sum is over all possible values of x....
user avatar
  • 599
1 vote
0 answers
137 views

Represent the $n$-qubit $2^n\times2^n$ size Hadamard/quantum Fourier transform unitary square matrix as product of $k$ two-level unitary matrices

I wish to know if it is possible to express the n-qubit Hadamard unitary square matrix of size $2^n * 2^n$ as a product of 'k' two-level unitary square matrices where 'k' is of the order of polynomial ...
user avatar
2 votes
1 answer
169 views

How to derive the rotations caused by the H gate?

In Nielsen and Chuang, there's the following paragraph: The Hadamard operation is just a rotation of the sphere about the ˆy axis by 90◦, followed by a rotation about the ˆx axis by 180◦. I am ...
user avatar
  • 599
2 votes
1 answer
301 views

Why is H gate called a ‘square-root of NOT’ gate?

In Nielsen and Chuang, there's the following paragraph: I understand that \begin{align*} \sqrt{NOT} = \frac{1}{2}\left( {\begin{array}{*{20}{c}} \sqrt 2 e^{i\pi / 4}&\sqrt 2 e^{-i\pi / 4}\\ \sqrt ...
user avatar
  • 599
2 votes
1 answer
200 views

Initial state preparation for Hadamard test

I thought I understood Hadamard test but it seems to be shaky. I understand that to get the expectation value $\langle\psi\ | V^\dagger|{\bf Q}|V|\psi\rangle$ we need to have gate $V$ (in blue) below ...
user avatar
0 votes
1 answer
74 views

Doing $|0\rangle$ then Hadamard gate then measurement

I am starting to use quantum experience and following exactly first example from lecture. After initializing the qubit to $|0\rangle$, then applying a Hadamard gate, the probability for measuring $|1\...
user avatar
4 votes
1 answer
117 views

How do you represent a Hadamard gate as a product of $R_x$ and $R_y$ gates?

I'm looking for a representation of Hadamard gate that uses only $R_x(x)$ and $R_y(y)$ gates. The values $x$ and $y$ may be the same, but they don't necessarily need to be.
user avatar
6 votes
2 answers
956 views

How to visualize Hadamard gate as $X$-$Z$-$X$ decomposition?

In the book Quantum Computation and Quantum Information by Nielsen and Chuang, chapter 4, exercise 4.4 (pg. 175), the author has asked to express Hadamard gate as product of $R_x$, $R_z$ rotations and ...
user avatar
2 votes
2 answers
121 views

How does a Hadamard discrete-time quantum walk result in a skewed distribution?

I was reading this tutorial about discrete random walk and got confused by the following paragraph. After the succession of Hadamard applications ($H$), I wonder how do we get skewed distribution. I ...
user avatar
3 votes
1 answer
199 views

What is the relation between Hadamard transformation and QFT?

I am new to the field and I can't help having a feeling that Hadamard and Fourier Transform are somehow related, but it is not clear to me how. Any explanation on how these two are related would be ...
user avatar
1 vote
2 answers
394 views

Is the tensor product of 2 Hadamard gates entangled?

Assume that you have a system of two qubits in the state $|11 \rangle$. Apply $H \otimes H$, where $H$ is the Hadamard matrix. Is the state $(H \otimes H)|11\rangle$ entangled? I know if we take the ...
user avatar
  • 157
0 votes
1 answer
33 views

What is the outcome when you apply 2 hadamard gates on CNOT

So when I run through risk, it displayed it had an equal 25% chance to get 00 01 10 11 respectively. I know how the CNOT output looks like when you apply hadamard gate on control part before CNOT, but ...
user avatar
  • 157
0 votes
1 answer
128 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 ...
user avatar
0 votes
1 answer
60 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 ...
user avatar
6 votes
2 answers
894 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 ...
user avatar
  • 95
4 votes
1 answer
110 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 ...
user avatar
  • 2,158
1 vote
2 answers
322 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 ...
user avatar
2 votes
1 answer
77 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 ...
user avatar
2 votes
1 answer
46 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: $$|...
user avatar
  • 23
-1 votes
1 answer
378 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 ...
user avatar
2 votes
1 answer
118 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 ...
user avatar
  • 139
3 votes
2 answers
157 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 ...
user avatar
  • 139
5 votes
2 answers
256 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 ...
user avatar
  • 139
2 votes
1 answer
238 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 ...
user avatar
3 votes
1 answer
88 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 &...
user avatar
  • 139
3 votes
1 answer
224 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 ...
user avatar
2 votes
1 answer
658 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 ...
user avatar
  • 175