assert_has_consistent_qid_shape(val: Any) → None¶
- Tests whether a value’s
_num_qubits_are correct andconsistent.Verifies that the entries in the shape are all positive integers and thelength of shape equals
_num_qubits_(and also equals
val – The value under test. Should have _qid_shape_ and/or num_qubits_ methods. Can optionally have a qubits property.