Skip to content

Commit

Permalink
Merge branch 'main' into 2024/07/15-refactor-dtype-classical-sim
Browse files Browse the repository at this point in the history
  • Loading branch information
anurudhp committed Jul 23, 2024
2 parents 73681bb + dd19667 commit 013ff0f
Show file tree
Hide file tree
Showing 57 changed files with 574 additions and 303 deletions.
5 changes: 2 additions & 3 deletions dev_tools/autogenerate-bloqs-notebooks-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import qualtran.bloqs.block_encoding.block_encoding_base
import qualtran.bloqs.block_encoding.chebyshev_polynomial
import qualtran.bloqs.block_encoding.lcu_block_encoding
import qualtran.bloqs.block_encoding.lcu_select_and_prepare
import qualtran.bloqs.block_encoding.linear_combination
import qualtran.bloqs.block_encoding.phase
import qualtran.bloqs.bookkeeping
Expand Down Expand Up @@ -581,8 +580,8 @@
module=qualtran.bloqs.qubitization.qubitization_walk_operator,
bloq_specs=[
qualtran.bloqs.qubitization.qubitization_walk_operator._QUBITIZATION_WALK_DOC,
qualtran.bloqs.block_encoding.lcu_select_and_prepare._SELECT_ORACLE_DOC,
qualtran.bloqs.block_encoding.lcu_select_and_prepare._PREPARE_ORACLE_DOC,
qualtran.bloqs.multiplexers.select_base._SELECT_ORACLE_DOC,
qualtran.bloqs.state_preparation.prepare_base._PREPARE_ORACLE_DOC,
],
),
NotebookSpecV2(
Expand Down
35 changes: 18 additions & 17 deletions qualtran/bloqs/arithmetic/addition.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import math
from functools import cached_property
from typing import (
Dict,
Expand Down Expand Up @@ -59,6 +58,7 @@
from qualtran.bloqs.mcmt.multi_control_multi_target_pauli import MultiControlX
from qualtran.cirq_interop import decompose_from_cirq_style_method
from qualtran.drawing import directional_text_box, Text
from qualtran.simulation.classical_sim import add_ints

if TYPE_CHECKING:
from qualtran.drawing import WireSymbol
Expand Down Expand Up @@ -129,19 +129,10 @@ def on_classical_vals(
) -> Dict[str, 'ClassicalValT']:
unsigned = isinstance(self.a_dtype, (QUInt, QMontgomeryUInt))
b_bitsize = self.b_dtype.bitsize
N = 2**b_bitsize
if unsigned:
return {'a': a, 'b': int((a + b) % N)}

# Addition of signed integers can result in overflow. In most classical programming languages (e.g. C++)
# what happens when an overflow happens is left as an implementation detail for compiler designers.
# However for quantum subtraction the operation should be unitary and that means that the unitary of
# the bloq should be a permutation matrix.
# If we hold `a` constant then the valid range of values of `b` [-N/2, N/2) gets shifted forward or backwards
# by `a`. to keep the operation unitary overflowing values wrap around. this is the same as moving the range [0, N)
# by the same amount modulu $N$. that is add N/2 before addition and then remove it.
half_n = N >> 1
return {'a': a, 'b': int(a + b + half_n) % N - half_n}
return {
'a': a,
'b': add_ints(int(a), int(b), num_bits=int(b_bitsize), is_signed=not unsigned),
}

def _circuit_diagram_info_(self, _) -> cirq.CircuitDiagramInfo:
wire_symbols = ["In(x)"] * int(self.a_dtype.bitsize)
Expand Down Expand Up @@ -302,7 +293,13 @@ def adjoint(self) -> 'OutOfPlaceAdder':
def on_classical_vals(
self, *, a: 'ClassicalValT', b: 'ClassicalValT'
) -> Dict[str, 'ClassicalValT']:
return {'a': a, 'b': b, 'c': a + b}
if isinstance(self.bitsize, sympy.Expr):
raise ValueError(f'Classical simulation is not support for symbolic bloq {self}')
return {
'a': a,
'b': b,
'c': add_ints(int(a), int(b), num_bits=self.bitsize + 1, is_signed=False),
}

def with_registers(self, *new_registers: Union[int, Sequence[int]]):
raise NotImplementedError("no need to implement with_registers.")
Expand Down Expand Up @@ -421,14 +418,18 @@ def signature(self) -> 'Signature':
def on_classical_vals(
self, x: 'ClassicalValT', **vals: 'ClassicalValT'
) -> Dict[str, 'ClassicalValT']:
if isinstance(self.k, sympy.Expr) or isinstance(self.bitsize, sympy.Expr):
raise ValueError(f"Classical simulation isn't supported for symbolic block {self}")
N = 2**self.bitsize
if len(self.cvs) > 0:
ctrls = vals['ctrls']
else:
return {'x': int(math.fmod(x + self.k, N))}
return {
'x': add_ints(int(x), int(self.k), num_bits=self.bitsize, is_signed=self.signed)
}

if np.all(self.cvs == ctrls):
x = int(math.fmod(x + self.k, N))
x = add_ints(int(x), int(self.k), num_bits=self.bitsize, is_signed=self.signed)

return {'ctrls': ctrls, 'x': x}

Expand Down
8 changes: 5 additions & 3 deletions qualtran/bloqs/arithmetic/addition_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,12 @@ def test_add_classical():
def test_out_of_place_adder():
basis_map = {}
gate = OutOfPlaceAdder(bitsize=3)
cbloq = gate.decompose_bloq()
for x in range(2**3):
for y in range(2**3):
basis_map[int(f'0b_{x:03b}_{y:03b}_0000', 2)] = int(f'0b_{x:03b}_{y:03b}_{x+y:04b}', 2)
assert gate.call_classically(a=x, b=y, c=0) == (x, y, x + y)
assert cbloq.call_classically(a=x, b=y, c=0) == (x, y, x + y)
op = GateHelper(gate).operation
op_inv = cirq.inverse(op)
cirq.testing.assert_equivalent_computational_basis_map(basis_map, cirq.Circuit(op))
Expand Down Expand Up @@ -323,9 +325,9 @@ def test_classical_add_signed_overflow(bitsize):
assert bloq.call_classically(a=mx, b=mx) == (mx, -2)


# TODO: write tests for signed integer addition (subtraction)
# https://github.com/quantumlib/Qualtran/issues/606
@pytest.mark.parametrize('bitsize,k,x,cvs,ctrls,result', [(5, 2, 0, (1, 0), (1, 0), 2)])
@pytest.mark.parametrize(
'bitsize,k,x,cvs,ctrls,result', [(5, 2, 0, (1, 0), (1, 0), 2), (6, -3, 2, (), (), -1)]
)
def test_classical_add_k_signed(bitsize, k, x, cvs, ctrls, result):
bloq = AddK(bitsize=bitsize, k=k, cvs=cvs, signed=True)
cbloq = bloq.decompose_bloq()
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/arithmetic/negate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def signature(self) -> 'Signature':

def build_composite_bloq(self, bb: 'BloqBuilder', x: 'SoquetT') -> dict[str, 'SoquetT']:
x = bb.add(BitwiseNot(self.dtype), x=x) # ~x
x = bb.add(AddK(self.dtype.num_qubits, k=1), x=x) # -x
x = bb.add(AddK(self.dtype.num_qubits, k=1, signed=isinstance(self.dtype, QInt)), x=x) # -x
return {'x': x}


Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/block_encoding_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from typing import Tuple

from qualtran import Bloq, BloqDocSpec, Register
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.symbolics import SymbolicFloat, SymbolicInt


Expand Down
3 changes: 2 additions & 1 deletion qualtran/bloqs/block_encoding/lcu_block_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
SoquetT,
)
from qualtran.bloqs.block_encoding.block_encoding_base import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle, SelectOracle
from qualtran.bloqs.bookkeeping import Partition
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.symbolics import SymbolicFloat


Expand Down
3 changes: 2 additions & 1 deletion qualtran/bloqs/block_encoding/lcu_block_encoding_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
BlackBoxPrepare,
BlackBoxSelect,
)
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle, SelectOracle
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle


def test_lcu_block_encoding(bloq_autotester):
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/linear_combination.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
from qualtran._infra.bloq import DecomposeTypeError
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_block_encoding import BlackBoxPrepare, BlackBoxSelect
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.block_encoding.phase import Phase
from qualtran.bloqs.bookkeeping.auto_partition import AutoPartition, Unused
from qualtran.bloqs.bookkeeping.partition import Partition
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.linalg.lcu_util import preprocess_probabilities_for_reversible_sampling
from qualtran.symbolics import smax, ssum, SymbolicFloat, SymbolicInt
from qualtran.symbolics.types import is_symbolic
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from qualtran import bloq_example, BloqBuilder, BloqDocSpec, QAny, Register, Signature, SoquetT
from qualtran.bloqs.basic_gates import GlobalPhase
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
from qualtran.symbolics import SymbolicFloat, SymbolicInt

Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
)
from qualtran.bloqs.basic_gates.x_basis import XGate
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.bookkeeping.auto_partition import AutoPartition, Unused
from qualtran.bloqs.bookkeeping.partition import Partition
from qualtran.bloqs.mcmt.multi_control_multi_target_pauli import MultiControlPauli
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.symbolics import is_symbolic, prod, smax, ssum, SymbolicFloat, SymbolicInt


Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/sparse_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
)
from qualtran.bloqs.basic_gates import Ry, Swap
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.bookkeeping.auto_partition import AutoPartition, Unused
from qualtran.bloqs.data_loading import QROM
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_uniform_superposition import (
PrepareUniformSuperposition,
)
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/tensor_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
SoquetT,
)
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.bookkeeping import Partition
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
from qualtran.symbolics import is_symbolic, prod, ssum, SymbolicFloat, SymbolicInt

Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/block_encoding/unitary.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SoquetT,
)
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
from qualtran.symbolics import SymbolicFloat, SymbolicInt

Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/df/double_factorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
)
from qualtran.bloqs.basic_gates import CSwap, Hadamard, Toffoli
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.bookkeeping import ArbitraryClifford
from qualtran.bloqs.chemistry.black_boxes import ApplyControlledZs
from qualtran.bloqs.chemistry.df.prepare import (
Expand All @@ -61,6 +60,7 @@
from qualtran.bloqs.chemistry.df.select_bloq import ProgRotGateArray
from qualtran.bloqs.reflections.prepare_identity import PrepareIdentity
from qualtran.bloqs.reflections.reflection_using_prepare import ReflectionUsingPrepare
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle

if TYPE_CHECKING:
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

from qualtran import bloq_example, BloqDocSpec, BoundedQUInt, QAny, Register, Signature
from qualtran.bloqs.basic_gates import CSwap
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.mcmt.and_bloq import MultiAnd
from qualtran.bloqs.mod_arithmetic import ModAddK
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_uniform_superposition import (
PrepareUniformSuperposition,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from qualtran import bloq_example, BloqDocSpec, BoundedQUInt, QAny, QBit, Register, Signature
from qualtran._infra.gate_with_registers import SpecializedSingleQubitControlledGate, total_bits
from qualtran.bloqs.basic_gates import CSwap
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import SelectOracle
from qualtran.bloqs.multiplexers.apply_gate_to_lth_target import ApplyGateToLthQubit
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.multiplexers.selected_majorana_fermion import SelectedMajoranaFermion


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
SoquetT,
)
from qualtran.bloqs.basic_gates import CSwap, Toffoli
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle, SelectOracle
from qualtran.bloqs.chemistry.pbc.first_quantization.projectile.prepare_t import (
PrepareTFirstQuantizationWithProj,
)
Expand All @@ -50,6 +49,8 @@
MultiplexedCSwap3D,
UniformSuperpostionIJFirstQuantization,
)
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.bloqs.swap_network import MultiplexedCSwap
from qualtran.drawing import Circle, Text, TextBox, WireSymbol

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
SoquetT,
)
from qualtran.bloqs.basic_gates import Toffoli
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle, SelectOracle
from qualtran.bloqs.chemistry.pbc.first_quantization.prepare_t import PrepareTFirstQuantization
from qualtran.bloqs.chemistry.pbc.first_quantization.prepare_uv import PrepareUVFirstQuantization
from qualtran.bloqs.chemistry.pbc.first_quantization.select_t import SelectTFirstQuantization
from qualtran.bloqs.chemistry.pbc.first_quantization.select_uv import SelectUVFirstQuantization
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.bloqs.swap_network import MultiplexedCSwap
from qualtran.drawing import Text, TextBox, WireSymbol

Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/sf/single_factorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
from qualtran.bloqs.basic_gates import Hadamard
from qualtran.bloqs.basic_gates.swap import CSwap
from qualtran.bloqs.block_encoding import BlockEncoding
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.chemistry.sf.prepare import (
InnerPrepareSingleFactorization,
OuterPrepareSingleFactorization,
)
from qualtran.bloqs.chemistry.sf.select_bloq import SelectSingleFactorization
from qualtran.bloqs.reflections.prepare_identity import PrepareIdentity
from qualtran.bloqs.reflections.reflection_using_prepare import ReflectionUsingPrepare
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle

if TYPE_CHECKING:
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/sparse/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
from qualtran.bloqs.basic_gates import CSwap, Hadamard
from qualtran.bloqs.basic_gates.on_each import OnEach
from qualtran.bloqs.basic_gates.z_basis import CZ, ZGate
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.data_loading.select_swap_qrom import find_optimal_log_block_size, SelectSwapQROM
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.bloqs.state_preparation.prepare_uniform_superposition import (
PrepareUniformSuperposition,
)
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/sparse/select_bloq.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
)
from qualtran._infra.gate_with_registers import SpecializedSingleQubitControlledGate
from qualtran.bloqs.basic_gates import SGate
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import SelectOracle
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.multiplexers.selected_majorana_fermion import SelectedMajoranaFermion

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/thc/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
)
from qualtran.bloqs.basic_gates import CSwap, Hadamard, Ry, Toffoli, XGate
from qualtran.bloqs.basic_gates.on_each import OnEach
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.data_loading.select_swap_qrom import SelectSwapQROM
from qualtran.bloqs.mcmt.multi_control_multi_target_pauli import MultiControlPauli
from qualtran.bloqs.reflections.reflection_using_prepare import ReflectionUsingPrepare
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.cirq_interop import CirqGateAsBloq
from qualtran.drawing import Text, WireSymbol
from qualtran.linalg.lcu_util import preprocess_probabilities_for_reversible_sampling
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/thc/select_bloq.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
)
from qualtran._infra.gate_with_registers import SpecializedSingleQubitControlledGate
from qualtran.bloqs.basic_gates import CSwap, Toffoli, XGate
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import SelectOracle
from qualtran.bloqs.chemistry.black_boxes import ApplyControlledZs
from qualtran.bloqs.multiplexers.select_base import SelectOracle

if TYPE_CHECKING:
from qualtran.resource_counting import BloqCountT, SympySymbolAllocator
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/chemistry/writing_algorithms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"from qualtran import Register, BoundedQUInt, QBit, QAny\n",
"\n",
"from qualtran.drawing import show_bloq\n",
"from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle\n",
"from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle\n",
"\n",
"@frozen\n",
"class PrepareSecondQuantization(PrepareOracle):\n",
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/for_testing/qubitization_walk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from numpy.typing import NDArray

from qualtran import Signature
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle
from qualtran.bloqs.multiplexers.select_pauli_lcu import SelectPauliLCU
from qualtran.bloqs.qubitization.qubitization_walk_operator import QubitizationWalkOperator
from qualtran.bloqs.state_preparation import PrepareUniformSuperposition
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle
from qualtran.symbolics import SymbolicFloat


Expand Down
3 changes: 2 additions & 1 deletion qualtran/bloqs/for_testing/random_select_and_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@

from qualtran import BloqBuilder, BoundedQUInt, QBit, Register, SoquetT
from qualtran._infra.gate_with_registers import SpecializedSingleQubitControlledGate
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import PrepareOracle, SelectOracle
from qualtran.bloqs.for_testing.matrix_gate import MatrixGate
from qualtran.bloqs.multiplexers.select_base import SelectOracle
from qualtran.bloqs.qubitization.qubitization_walk_operator import QubitizationWalkOperator
from qualtran.bloqs.state_preparation.prepare_base import PrepareOracle


@frozen
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/mean_estimation/complex_phase_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

from qualtran import GateWithRegisters, Register, Signature
from qualtran._infra.gate_with_registers import merge_qubits, total_bits
from qualtran.bloqs.block_encoding.lcu_select_and_prepare import SelectOracle
from qualtran.bloqs.mean_estimation.arctan import ArcTan
from qualtran.bloqs.multiplexers.select_base import SelectOracle


@attrs.frozen
Expand Down
Loading

0 comments on commit 013ff0f

Please sign in to comment.