Skip to content
Merged
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
2 changes: 2 additions & 0 deletions tests/utils_for_testbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ def validate_quantum_program_size(
assert (
actual_width <= expected_width
), f"The width of the circuit changed! (for the worse!). From {expected_width} to {actual_width}"
assert actual_width > 0, "Got a 0-width circuit."

assert qp.transpiled_circuit is not None # for mypy
actual_depth = qp.transpiled_circuit.depth
if expected_depth is not None:
assert (
actual_depth <= expected_depth
), f"The depth of the circuit changed! (for the worse!). From {expected_depth} to {actual_depth}"
assert actual_depth > 0, "Got a 0-depth circuit."