Identity 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
Identity
#
The identity gate on n
qubits.
Parameters#
bitsize
: number of qubitsn
, defaults to 1.
Registers#
q
: register ofn
qubits
from qualtran.bloqs.basic_gates import Identity
Example Instances#
import sympy
n = sympy.Symbol("n")
identity_symb = Identity(n)
identity = Identity()
n = 4
identity_n = Identity(n)
Graphical Signature#
from qualtran.drawing import show_bloqs
show_bloqs([identity_symb, identity, identity_n],
['`identity_symb`', '`identity`', '`identity_n`'])
Call Graph#
from qualtran.resource_counting.generalizers import ignore_split_join
identity_symb_g, identity_symb_sigma = identity_symb.call_graph(max_depth=1, generalizer=ignore_split_join)
show_call_graph(identity_symb_g)
show_counts_sigma(identity_symb_sigma)
Counts totals:
I
: 1