H

pyquil.gates.H(qubit)[source]

Produces the Hadamard gate:

H = (1 / sqrt(2)) * [[1,  1],
                     [1, -1]]

Produces the H instruction. This gate is a single qubit Hadamard gate.

Parameters

qubit (Union[Qubit, QubitPlaceholder, FormalArgument, int]) – The qubit apply the gate to.

Return type

Gate

Returns

A Gate object.