Programmable Rotation Gate Array#

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

ProgrammableRotationGateArray#

An implementation of ProgrammableRotationGateArrayBase base class

This implementation of the ProgrammableRotationGateArray base class expects all interleaved_unitaries to act on the rotations_target register.

See docstring of ProgrammableRotationGateArrayBase for more details.

from qualtran.bloqs.rotations import ProgrammableRotationGateArray

Example Instances#

programmable_rotation_gate_array = ProgrammableRotationGateArray(
    [1, 2, 3, 4], kappa=2, rotation_gate=cirq.Z
)

Graphical Signature#

from qualtran.drawing import show_bloqs
show_bloqs([programmable_rotation_gate_array],
           ['`programmable_rotation_gate_array`'])

Call Graph#

from qualtran.resource_counting.generalizers import ignore_split_join
programmable_rotation_gate_array_g, programmable_rotation_gate_array_sigma = programmable_rotation_gate_array.call_graph(max_depth=1, generalizer=ignore_split_join)
show_call_graph(programmable_rotation_gate_array_g)
show_counts_sigma(programmable_rotation_gate_array_sigma)
../../_images/1335fa8a27fd347d103553e0598a7895744ea4642e8a4189c0fe229caf1ec262.svg

Counts totals:

  • CZ**0.125: 1

  • CZ**0.25: 1

  • CZ**0.5: 1

  • QROM((4,), ((),), (2,)): 1

  • QROM((4,), ((),), (2,)): 1

  • QROM((4,), ((),), (2,)): 1