# What are the $|+\rangle$ and $|-\rangle$ states?

In the Gates Glossary of IBM Quantum Experience it states

H gate

The H or Hadamard gate rotates the states |0⟩ and |1⟩ to |+⟩ and |−⟩, respectively. It is useful for making superpositions. As a Clifford gate, it is useful for moving information between the x and z bases.

This is followed by a picture of a Bloch sphere rotation which looks good but still does tell me nothing. Well for me as a programmer all I understood by playing around with the Hadamard gate was that I get with a 50/50 probability 0 or 1 when measuring the qubit after the Hadamard gate.

But trying to learn more the above is very confusing and I do not find anything googling either without starting to ask more questions about basic terminology.

Breaking down the quoted sentence I come up with a lot of questions: What exactly is a state of a qubit? What is the state of + and what is the state of -? Why is it important to know that this is a "Clifford gate" does this help in any way to understand the Hadamard gate? What is the x base? What is the z base? And why am I all the time confronted with math when I want to write a program? I write software since 35 years and the amount of math I needed was very limited why should I suddenly need to understand all this math theorems? I am not stupid. I could understand math but the notations in math are intimidating. I prefer to read software code no matter how nested. Single SQL queries of 1000 lines no problem.

I know these are all basic questions but I feel that they are not properly answered anywhere without the use of either incomprehensible math or other terminology inappropriately defined either. I think also that I am not the only "classical" programmer that struggles with the basics.

I appreciate any answer not using new terminology that is not defined and I prefer answers that explain math formulas. If it can only be explained with math then this is okay, but please define your notations. As a programmer I prefer terms as for(i = 1; i <= N; i++) Sum += i; over terms like $$\sum_{i=1}^n$$ which look very alien to me.

• Unfortunately sometimes the answers are not what we would like to hear, and I believe you would not find answers in your preferable terms. Jan 16, 2020 at 10:41
• I would recommend to have a look at basic manual what is a quantum computation on IBM Q website. They very nicely explain basic of QC. As mentioned in the answer below, it is completely new approach to computation. If you want to learn it, sooner or later you will face mathematical formulas, mainly from linear algebra. At current state of developement, it is not possible to comprehend QC algorithm without maths. Some basic of quantum mechanics helps you understand concepts of QC better. Jan 16, 2020 at 12:12

The $$|+⟩$$ and $$|-⟩$$ are states given by the following decomposition in the Z-basis: \begin{equation} \begin{aligned} |+⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ + |1⟩\Big)\\ |-⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ - |1⟩\Big) \end{aligned} \end{equation} As from quantum mechanics, you can see that there's a 50% chance for both states to be found in the |0⟩ or |1⟩ state when measuring in the Z-basis.

The terms Z-basis and X-basis refer to the two pair of states $$\{|0⟩,|1⟩\}$$ and $$\{|+⟩,|-⟩\}$$ respectively, which are eigenstates of the two Pauli matrices $$\sigma_z$$ and $$\sigma_x$$ (or in IBMQ terms, the Z and X operators). They're called Z and X basis for simplicity and in the Bloch sphere are usually represented on the corresponding z and x axes, but there's no connection with the real space directions and in other quantum mechanics fields are referred to as 1 and 2, with no indication of axes. The Hadamard gate is just given by this matrix in the Z basis $$\begin{equation} \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix} \end{equation}$$ which converts the state $$|0⟩$$ to $$|+⟩$$ and the state $$|1⟩$$ to $$|-⟩$$. This is all you need to know about what it does, no need to get in depth about Clifford algebra and gates which might be a bit overkill.

Turning to the other questions, it's kind of hard to explain. QC is not just another programming paradigm or language, but a totally different way of performing computation. It is still in its infancy, we're at the "circuit model" of computation and none of the hardware nowadays available can perform the few algorithms (Shor, Grover, Deutch-Jorsza etc.) on more than a couple qubits. For these reason and a couple thousands other, QC is still mostly a research field and you need a lot of math to understand it, since any computation effort is quite strongly dependant on the hardware and thus on the quantum mechanics behind it. At the very least, you should know a bit of linear algebra.

As an example, think of the classical computation in its earlier days of turing machines and circuit model of computation. To understand these you needed quite a bit of math (though a different kind of math from QC, mostly combinatorics and logic). Nowadays, though still taught at university, nobody needs to know anything about circuits or Turing machines in order to program, nor it has to worry much about the hardware performing the computation.

Edit: I think the best route for you to approach QC would be to take part in the qiskit development, it is hosted on github at this link.

• $|+\rangle$ and $|-\rangle$ are not Bell states. Jan 16, 2020 at 11:08
• Ops, sorry, you're right. Edited that. Jan 16, 2020 at 11:19
• Added a link to qiskit github Jan 16, 2020 at 12:13