Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev_tools/requirements/deps/runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
attrs>=23.2.0
cachetools>=5.3
networkx
numpy
numpy~=1.26
sympy
cirq-core==1.4
cirq-core>=1.4.0,<1.6
fxpmath
galois

Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/dev.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cffi==1.17.1
# cryptography
charset-normalizer==3.4.3
# via requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -r deps/runtime.txt
# openfermion
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/docs.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/format.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/mypy.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/pylint.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/pytest.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/envs/runtime.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ charset-normalizer==3.4.3
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.4.0
cirq-core==1.5.0
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down
13 changes: 9 additions & 4 deletions qualtran/bloqs/bookkeeping/split_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ def test_classical_sim_dtypes():
assert isinstance(xx, np.ndarray)
assert xx.tolist() == [1, 1, 1, 1, 1, 1, 1, 1]

# Warning: numpy will wrap too-large values
(xx,) = s.call_classically(reg=np.uint8(256))
assert isinstance(xx, np.ndarray)
assert xx.tolist() == [0, 0, 0, 0, 0, 0, 0, 0]
numpy_major_version = int(np.__version__.split('.')[0])
if numpy_major_version < 2:
# Warning: numpy 1 will wrap too-large values
(xx,) = s.call_classically(reg=np.uint8(256))
assert isinstance(xx, np.ndarray)
assert xx.tolist() == [0, 0, 0, 0, 0, 0, 0, 0]
else:
with pytest.raises(OverflowError):
(xx,) = s.call_classically(reg=np.uint8(256))

with pytest.raises(ValueError):
_ = s.call_classically(reg=np.uint16(256))
1 change: 1 addition & 0 deletions qualtran/bloqs/swap_network/cswap_approx.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -72,6 +72,7 @@
) -> Iterator[cirq.OP_TREE]:
ctrl, target_x, target_y = quregs['ctrl'], quregs['x'], quregs['y']


def g(q: cirq.Qid, adjoint=False) -> Iterator[cirq.OP_TREE]:
yield [cirq.S(q), cirq.H(q)]
yield cirq.T(q) ** (1 - 2 * adjoint)
Expand Down
Loading