Ejemplo n.º 1
0
    def h(target: QubitSetInput) -> Iterable[Instruction]:
        """Registers this function into the circuit class.

        Args:
            target (Qubit, int, or iterable of Qubit / int): Target qubit(s)

        Returns:
            Iterable[Instruction]: `Iterable` of H instructions.

        Examples:
            >>> circ = Circuit().h(0)
            >>> circ = Circuit().h([0, 1, 2])
        """
        return [Instruction(Gate.H(), target=qubit) for qubit in QubitSet(target)]
Ejemplo n.º 2
0
 def basis_rotation_gates(self) -> Tuple[Gate, ...]:
     return tuple([Gate.Z(), Gate.S(), Gate.H()])
Ejemplo n.º 3
0
 def basis_rotation_gates(self) -> Tuple[Gate]:
     return tuple([Gate.H()])