CNOT#
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
CNOT
#
Two-qubit controlled-NOT.
Registers#
ctrl
: One-bit control register.target
: One-bit target register.
from qualtran.bloqs.basic_gates import CNOT
Example Instances#
cnot = CNOT()
Graphical Signature#
from qualtran.drawing import show_bloqs
show_bloqs([cnot],
['`cnot`'])
Call Graph#
from qualtran.resource_counting.generalizers import ignore_split_join
cnot_g, cnot_sigma = cnot.call_graph(max_depth=1, generalizer=ignore_split_join)
show_call_graph(cnot_g)
show_counts_sigma(cnot_sigma)
Counts totals:
CNOT
: 1