cirq.testing.assert_has_consistent_qid_shape
Tests whether a value's _qid_shape_
and _num_qubits_
are correct and consistent.
View aliases
Main aliases
cirq.testing.circuit_compare.assert_has_consistent_qid_shape
cirq.testing.assert_has_consistent_qid_shape(
val: Any
) -> None
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
.
Args |
val
|
The value under test. Should have _qid_shape_ and/or
num_qubits_ methods. Can optionally have a qubits property.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]