Y Gate#

from qualtran import Bloq, CompositeBloq, BloqBuilder, Signature, Register
from qualtran import QBit, QInt, QUInt, QAny
from qualtran.drawing import show_bloq, show_call_graph, show_counts_sigma
from typing import *
import numpy as np
import sympy
import cirq

YGate#

The Pauli Y gate.

This causes a bit flip (with a complex phase): Y|0> = 1j|1>, Y|1> = -1j|0>

Registers#

  • q: The qubit.

from qualtran.bloqs.basic_gates import YGate

Example Instances#

y_gate = YGate()

Graphical Signature#

from qualtran.drawing import show_bloqs
show_bloqs([y_gate],
           ['`y_gate`'])
show_bloq(y_gate, 'musical_score')
../../_images/ce5e5d71fcbba851f0f724cf2c3eed56565fff25c411ee5343d8599550e8244b.png

CYGate#

A controlled Y gate.

Registers#

  • ctrl: The control qubit.

  • target: The target qubit.

from qualtran.bloqs.basic_gates import CYGate

Example Instances#

cy_gate = YGate().controlled()
assert isinstance(cy_gate, CYGate)

Graphical Signature#

from qualtran.drawing import show_bloqs
show_bloqs([cy_gate],
           ['`cy_gate`'])
show_bloq(cy_gate, 'musical_score')
../../_images/974c931b554841d596856654f3ee09b59a8dd6895ecb573544b56012040eca74.png