cirq.testing.assert_has_consistent_qid_shape

Tests whether a value's _qid_shape_ and _num_qubits_ are correct and consistent.

Main aliases

cirq.testing.circuit_compare.assert_has_consistent_qid_shape

Verifies that the entries in the shape are all positive integers and the length of shape equals _num_qubits_ (and also equals len(qubits) if val has qubits.

val The value under test. Should have _qid_shape_ and/or num_qubits_ methods. Can optionally have a qubits property.