Hadamard transform

From Wikipedia, the free encyclopedia

(Redirected from Hadamard gate)
Jump to: navigation, search

The Hadamard transform (also known as the Walsh-Hadamard transform, Hadamard-Rademacher-Walsh transform, Walsh transform, or Walsh-Fourier transform) is an example of a generalized class of Fourier transforms. It is named for the French mathematician Jacques Solomon Hadamard, the German-American mathematician Hans Adolph Rademacher, and the American mathematician Joseph Leonard Walsh. It performs an orthogonal, symmetric, involutary, linear operation on 2m real numbers (or complex numbers, although the Hadamard matrices themselves are purely real).

The Hadamard transform can be regarded as being built out of size-2 discrete Fourier transforms (DFTs), and is in fact equivalent to a multidimensional DFT of size 2\times2\times\cdots\times2\times2. It decomposes an arbitrary input vector into a superposition of Walsh functions.

Contents

The Hadamard transform Hm is a 2^m \times 2^m matrix, the Hadamard matrix (scaled by a normalization factor), that transforms 2m real numbers xn into 2m real numbers Xk. We can define the Hadamard transform in two ways: recursively, or by using the binary (base-2) representation of the indices n and k.

Recursively, we define the 1\times1 Hadamard transform H0 by the identity H0 = 1, and then define Hm for m > 0 by:

H_m = \frac{1}{\sqrt2} \begin{pmatrix} H_{m-1} & H_{m-1} \\ H_{m-1} & -H_{m-1} \end{pmatrix},

where the 1/\sqrt2 is a normalization that is sometimes omitted. Thus, other than this normalization factor, the Hadamard matrices are made up entirely of 1 and −1.

Equivalently, we can define the Hadamard matrix by its (k,n)-th entry by writing k=k_{m-1} 2^{m-1} + k_{m-2} 2^{m-2} + \cdots + k_1 2 + k_0 and n=n_{m-1} 2^{m-1} + n_{m-2} 2^{m-2} + \cdots + n_1 2 + n_0, where the kj and nj are the binary digits (0 or 1) of n and k, respectively. In this case, we have:

\left( H_m \right)_{k,n} = \frac{1}{2^{m/2}} (-1)^{\sum_j k_j n_j}.

This is exactly the multi-dimensional 2\times2\times\cdots\times2\times2 DFT, normalized to be unitary, if we regard the inputs and outputs as multidimensional arrays indexed by the nj and kj, respectively.

Some examples of the Hadamard matrices follow.

H0 = + 1
H_1 = \frac{1}{\sqrt2} \begin{pmatrix}\begin{array}{rr} 1 & 1 \\ 1 & -1 \end{array}\end{pmatrix}

(This H1 is precisely the size-2 DFT. It can also be regarded as the Fourier transform on the two-element additive group of Z/(2).)

H_2 = \frac{1}{2} \begin{pmatrix}\begin{array}{rrrr} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1\end{array}\end{pmatrix}


H_3 = \frac{1}{2^{3/2}} \begin{pmatrix}\begin{array}{rrrrrrrr} 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 \end{array}\end{pmatrix}.

The rows of the Hadamard matrices are the Walsh functions.

In quantum information processing the Hadamard transformation, more often called Hadamard gate in this context (cf. quantum gate), is a one-qubit rotation, mapping the qubit-basis states |0 \rangle and |1 \rangle to two superposition states with equal weight of the computational basis states |0 \rangle and |1 \rangle . Usually the phases are chosen so that we have

\frac{|0\rangle+|1\rangle}{\sqrt{2}}\langle0|+\frac{|0\rangle-|1\rangle}{\sqrt{2}}\langle1|

in Dirac notation. This corresponds to the transformation matrix

H_1=\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

in the |0 \rangle , |1 \rangle basis.

Many quantum algorithms use the Hadamard transform as an initial step, since it maps n qubits initialized with |0› to a superposition of all 2n orthogonal states in the  |0 \rangle , |1 \rangle basis with equal weight.

Hadamard gate operations:
H|1\rangle = \frac{1}{\sqrt{2}}|0\rangle-\frac{1}{\sqrt{2}}|1\rangle.
H|0\rangle = \frac{1}{\sqrt{2}}|0\rangle+\frac{1}{\sqrt{2}}|1\rangle.
H( \frac{1}{\sqrt{2}}|0\rangle-\frac{1}{\sqrt{2}}|1\rangle )= \frac{1}{2}( |0\rangle+|1\rangle) - \frac{1}{2}( |0\rangle - |1\rangle) = |1\rangle ;
H( \frac{1}{\sqrt{2}}|0\rangle+\frac{1}{\sqrt{2}}|1\rangle )= \frac{1}{\sqrt{2}} \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) + \frac{1}{\sqrt{2}}( \frac{1}{\sqrt{2}}|0\rangle-\frac{1}{\sqrt{2}}|1\rangle)= |0\rangle .

The Hadamard transform can also be used to generate random numbers with a Gaussian distribution by the central limit theorem. Or you can combine a series of Hadamard transforms with random permutations to transform data into Gaussian noise.

The Hadamard transform is used in many signal processing, and data compression algorithms, such as HD Photo. In video compression applications, it is usually used in the form of the sum of absolute transformed differences.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.