Understanding Hadamard Gates on Quantum Circuits

  • Context: Graduate 
  • Thread starter Thread starter jayjones01
  • Start date Start date
  • Tags Tags
    Circuits Quantum
Click For Summary

Discussion Overview

The discussion revolves around the application of Hadamard gates on quantum circuits, specifically focusing on the transformation of a combined quantum state of three qubits. Participants explore the resulting states from applying Hadamard gates to specific initial states and seek to understand the underlying logic and reasoning behind these transformations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents a quantum state and applies Hadamard gates, questioning why the resulting state appears to have "random" combinations.
  • Another participant clarifies that a Hadamard gate creates a superposition of states, leading to an equal probability distribution across all combinations for three qubits.
  • Concerns are raised about the conservation of probability and the selection of initial states, with one participant suggesting a flaw in the math.
  • A participant discusses the concept of quantum interference and the significance of symmetric versus antisymmetric superpositions in the context of Hadamard transformations.
  • Another participant expresses interest in understanding the logical reasoning behind the design of quantum circuits for specific outcomes, referencing error correction schemes and the work of Shor.
  • One participant provides an alternative calculation of the Hadamard transform, arriving at different results and questioning the indexing of the basis states used in the transformation.
  • Discussion includes the idea that the Hadamard gate transforms |0> into a symmetric combination and |1> into an antisymmetric combination, affecting the resulting states based on the number of "on" bits.

Areas of Agreement / Disagreement

Participants express differing views on the results of the Hadamard transformation, with some agreeing on the principles of quantum interference while others contest the specific outcomes and calculations. The discussion remains unresolved regarding the exact nature of the transformations and the implications of symmetry in the resulting states.

Contextual Notes

Participants note potential limitations in understanding the transformations, including assumptions about the initial states and the indexing of basis states. There is also uncertainty regarding the implications of symmetry in quantum states and how it affects the results of Hadamard operations.

Who May Find This Useful

This discussion may be of interest to those studying quantum computing, quantum circuits, and error correction schemes, as well as individuals seeking to deepen their understanding of quantum state transformations and the role of Hadamard gates.

jayjones01
Messages
5
Reaction score
0
Lets say I have the following quantum state:

\frac{1}{\sqrt{2}}\left| 000\right\rangle + \frac{1}{\sqrt{2}}\left| 111\right\rangle

And that I apply a Hadamard gate to each of these qubits (H[1,2,3]).
The math shows that the resulting state will be:

\frac{1}{2}\left| 000\right\rangle + \frac{1}{2}\left| 010\right\rangle + \frac{1}{2}\left| 101\right\rangle + \frac{1}{2}\left| 111\right\rangle

I know how to do the math to get to the result, but i don't understand the logical reason why a \left| 000\right\rangle and \left| 111\right\rangle combined state generate that result. If anyone could help me understand why this happens i would appreciate it.

Thanks in advance :smile:
 
Physics news on Phys.org
Does a qubit have 3 quantum numbers?
 
It's a system with 3 qubits, hence the operator H[1,2,3].

When I have 1 qubit, let's say a \left| 0\right\rangle, I understand that a Hadamar gate will create an equally probable quantum state that mixes \left| 0\right\rangle and \left| 1\right\rangle, cause a Hadamar gate combines states.

I also understand that when I have a quantum state like \left| 000\right\rangle, a Hadamar gate applied to all qubits (a H[1,2,3] operator) will generate mixed states on all qubits and produce an equally probable mix of all 8 combinations (000 001 010 011 100 101 110 111).

But when i have the state described on the first post, i can't understand why the generated state has those apparently random combinations.
 
I am not familiar with the operation, however I think there is a flaw in the math, because your not conserving probability.

Also why are you starting with a state of two (out of eight) possibilities and why did you pick those two?
 
Forgive my lack of formalism, but when i say a mix of 0 and 1, I am actually referring to the state:
\left| \psi\right\rangle = \frac{1}{\sqrt{2}} \left( \left| 0\right\rangle + \left| 1\right\rangle \right)

The same applies to the state of all 8 combinations with 3 qubits i mentioned, i just didnt type the probabilities cause they are equally weighted.

There is no flaw in the math, the states in the first post are valid quantum states. You can start with whatever state you want, as long as it's a valid quantum state. I chose those two because they give a result (after applying the Hadamard gate to each qubit) that doesn't seem obvious to me and I can't understand why does the math give such a result.
 
jayjones01 said:
Lets say I have the following quantum state:

\frac{1}{\sqrt{2}}\left| 000\right\rangle + \frac{1}{\sqrt{2}}\left| 111\right\rangle

And that I apply a Hadamard gate to each of these qubits (H[1,2,3]).
The math shows that the resulting state will be:

\frac{1}{2}\left| 000\right\rangle + \frac{1}{2}\left| 010\right\rangle + \frac{1}{2}\left| 101\right\rangle + \frac{1}{2}\left| 111\right\rangle

I know how to do the math to get to the result, but i don't understand the logical reason why a \left| 000\right\rangle and \left| 111\right\rangle combined state generate that result. If anyone could help me understand why this happens i would appreciate it.

Thanks in advance :smile:

Well, the short answer to your question is "quantum interference". Remember that the Hadamard transforms of |0> and |1> have different phases, so the operation of the 3-bit H-matrix on |000> and |111> will add those phases together in a well-defined way. As far as an intuitive reason why the symmetric superposition of |000> and |111> would transform that way, I don't have an answer. The only thing that jumps out is that the basis states that survive the transform are the symmetric ones .. where by symmetric I mean the ones where the bit-sequences read the same forward and backward. What happens when you apply that H-matrix to the antisymmetric superposition of |000> and |111> (i.e. \frac{1}{\sqrt{2}}\left[\left|000\right\rangle - \left|111\right\rangle\right])? I am guessing that you get the combination of the other 4 possible bit sequences?

I am not sure what significance might be attached to this symmetry (if it is even correct) .. it could just be coincidence. It's interesting though .. I haven't thought about quantum computing for a while .. I bought a book on it once upon a time, but didn't get very far into it. Maybe I'll dig it out again.
 
Last edited:
Thanks a lot for your reply SpectraCat. Yeah I thought it should be due to interference, but I can't really understand why it works that way. I'm studying some error correction schemes for quantum circuits and there are some 4 qubit circuits to produce certain mixture of states. I wan't to understand how does it work cause I'm sure there must be a logical way to explain it, I don't think the people that made those 4 qubit circuits started multiplying ALL possible operators hoping that by chance they would mathematically get the answer, they should have a deeper understanding so they can predict what operators will produce which combination of states (which can be seen as a sum of bit sequences in some way). I have tried using other initial states and i couldn't find a pattern that could explain the results.

The idea was to create a circuit that would produce this state:

\frac{1}{\sqrt{8}}\sum\left| v\right\rangle

where v is a 4 bit sequence with even number of 1's (fex 0000, 0101, 1111, etc)

How did Shor (the guy who created a circuit to do this) know that starting with \frac{1}{\sqrt{2}} \left(\left| 1111\right\rangle + \left| 0000\right\rangle \right) and just doing a Hadamard operation to each qubit he could produce the state mentioned above. I don't think he tried all possible combinations of operators, he somehow knows how the Hadamard gate works with mixed states.
 
Last edited:
Hmm ... I did the Hadamard transform of your problem, and I got different results:

I used the following definition of the 3-bit Hadamard matrix (ignoring normalization):

Code:
1  1  1  1  1  1  1  1
1 -1  1 -1  1 -1  1 -1
1  1 -1 -1  1  1 -1 -1
1 -1 -1  1  1 -1 -1  1
1  1  1  1 -1 -1 -1 -1
1 -1  1 -1 -1  1 -1  1
1  1 -1 -1 -1 -1  1  1
1 -1 -1  1 -1  1  1 -1

In that basis, the vector representing your initial |000> + |111> state is just the transpose of:
Code:
1 0 0 0 0 0 0 1

When I carry through the multiplication, I get
Code:
2 0 0 2 0 2 2 0

indicating the the result of the transform should be:

|000>+|011>+|101>+|110>

assuming I have the basis correct. I have been assuming the that indices of the column vector are ordered such that the q-bits represent binary numbers 0-7, i.e.

Code:
|000>
|001>
|010>
|011>
|100>
|101>
|110>
|111>

If that is not correct, then perhaps I have drawn the wrong conclusion, but I still don't see how to get the answer you gave. Am I making a mistake somewhere?

One thing I do see however, is a likely way to predict the results of the transforms .. at least for equally weighted superpositions like the ones we have been considering. The bits in the column vector select columns of the matrix, which are just added together to get the final result. In other words, if you want to get the result you initially indicated (i.e. |000> + |010> + |101> + |111>) using the indexing scheme I laid out, you would apply the transform to |000> + |101>. I imagine that if you spend some time thinking about this, you can develop a deeper intuition that allows you to predict more complicated results, like the one you mentioned in your last post.

For that specific example with 4-bits, I understand the logic. It works like this: The Hadamard gate on each bit transforms a |0> into the symmetric linear combination, |0> + |1>, while it transforms |1> into the antisymmetric linear transform, |0> - |1>. Thus, for any even bit sequence, adding the transforms of "all bits off" (i.e. |0000> in your example) and "all bits on" (|1111> in your example) will mean that only the sequences with an even number of "on" bits can survive, because the other ones will have their phases flipped in the "all on" transform, and thus get canceled out.
 
You are right, I didn't really check my H[1,2,3] matrix and I did a careless mistake writing it down, that's why my 3 qubit examples were wrong and I could not see any logic in them :-p

The last paragraph explains it very well and I now understand why |0000>+|1111> generates a mix of even bit sequences. Thanks a lot SpectraCat for taking the time to answer this, I'm eternally grateful :biggrin:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K