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 qubits n, defaults to 1.

Registers#

  • q: register of n 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)
../../_images/91f89e6193aaecee42a5c66dcd63fb98246f10a0ae5f5d1c2f3e1aec97ea435b.svg

Counts totals:

  • I: 1