pub unsafe extern "C" fn hadamard(qureg: Qureg, targetQubit: c_int)Expand description
Apply the single-qubit Hadamard gate. This takes \f$|0\rangle\f$ to \f$|+\rangle\f$ and \f$|1\rangle\f$ to \f$|-\rangle\f$, and is equivalent to a rotation of \f$\pi\f$ around the x-axis then \f$\pi/2\f$ about the y-axis on the Bloch-sphere. I.e. \f[ \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \ 1 & -1 \end{pmatrix} \f]
@htmlonly
@ingroup unitary @param[in,out] qureg object representing the set of all qubits @param[in] targetQubit qubit to operate on @throws invalidQuESTInputError()
- if \p targetQubit is outside [0, \p qureg.numQubitsRepresented) @author Ania Brown (state-vector) @author Tyson Jones (density matrix, doc)