Skip to content

Commit

Permalink
Merge branch 'master' into internalgate
Browse files Browse the repository at this point in the history
  • Loading branch information
NoureldinYosri authored Aug 1, 2023
2 parents 5e34d38 + c15dd03 commit 738219f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cirq-core/cirq/testing/consistent_qasm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_assert_qasm_is_consistent_with_unitary():
)

# Checks that code is valid.
with pytest.raises(AssertionError, match='Check your OPENQASM'):
with pytest.raises(AssertionError, match='QASM not consistent'):
cirq.testing.assert_qasm_is_consistent_with_unitary(
Fixed(np.array([[1, 0], [0, -1]]), 'JUNK$&*@($#::=[];')
)
Expand Down
4 changes: 3 additions & 1 deletion cirq-ft/cirq_ft/infra/gate_with_registers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def merge_qubits(
) -> List[cirq.Qid]:
ret: List[cirq.Qid] = []
for reg in self:
assert reg.name in qubit_regs, "All qubit registers must pe present"
assert (
reg.name in qubit_regs
), f"All qubit registers must be present. {reg.name} not in qubit_regs"
qubits = qubit_regs[reg.name]
qubits = np.array([qubits] if isinstance(qubits, cirq.Qid) else qubits)
assert (
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/deps/mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ mypy==1.2.0
# packages with stub types for various libraries
types-backports==0.1.3
types-cachetools
types-protobuf==3.19.22
types-protobuf~=3.20
types-requests==2.28.1
types-setuptools==62.6.1
2 changes: 1 addition & 1 deletion dev_tools/requirements/deps/protos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# This bundles protoc 3.23.1, which we use for generating proto code.
grpcio-tools~=1.56.0

mypy-protobuf
mypy-protobuf==3.4

0 comments on commit 738219f

Please sign in to comment.