File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/bloqade/gemini/analysis/measurement_validation Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,16 @@ def terminal_measure(
6262 measurement_analysis_results = interp .measurement_analysis_results
6363 total_qubits_allocated = interp .unique_qubits_allocated
6464
65- # could make these proper exceptions but would be tricky to communicate to user
66- # without revealing under-the-hood details
6765 measure_lattice_element = measurement_analysis_results .get (stmt .result )
68- assert isinstance (measure_lattice_element , MeasureIdTuple )
66+ if not isinstance (measure_lattice_element , MeasureIdTuple ):
67+ interp .add_validation_error (
68+ stmt ,
69+ ir .ValidationError (
70+ stmt ,
71+ "Measurement ID Analysis failed to produce the necessary results needed for vaolidation." ,
72+ ),
73+ )
74+ return (interp .lattice .bottom (),)
6975
7076 if len (measure_lattice_element .data ) != total_qubits_allocated :
7177 interp .add_validation_error (
You can’t perform that action at this time.
0 commit comments