Пример #1
0
    def s(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 S instructions.

        Examples:
            >>> circ = Circuit().s(0)
            >>> circ = Circuit().s([0, 1, 2])
        """
        return [Instruction(Gate.S(), target=qubit) for qubit in QubitSet(target)]
Пример #2
0
 def basis_rotation_gates(self) -> Tuple[Gate, ...]:
     return tuple([Gate.Z(), Gate.S(), Gate.H()])