I am running the chemistry.py from the tutorial here and I would like to save the circuit as a qasm file. But when I run chemistry.py with the following line included
res_circuit = qsharp.circuit(entry_expr=qsharp_string, operation=None)
I get the following error message
Traceback (most recent call last): File "c:\Users\KaterinaGratsea\qsharp\samples\estimation\df-chemistry\chemistry_ions.py", line 530, in <module> res_circuit = qsharp.circuit(entry_expr=qsharp_string, operation=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\KaterinaGratsea\anaconda3\envs\azure_py3.11\Lib\site-packages\qsharp\_qsharp.py", line 272, in circuit return get_interpreter().circuit(entry_expr, operation) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ module.QSharpError: Error: cannot compare measurement results Call stack: at Adjoint Microsoft.Quantum.Unstable.Arithmetic.ApplyAndAssuming0Target in unstable_arithmetic_internal.qs at Microsoft.Quantum.Unstable.TableLookup.SinglyControlledSelect in unstable_table_lookup.qs at Microsoft.Quantum.Unstable.TableLookup.SinglyControlledSelect in unstable_table_lookup.qs at Microsoft.Quantum.Unstable.TableLookup.Select in unstable_table_lookup.qs at Microsoft.Quantum.Applications.Chemistry.PrepareQuantumROMState in .\src\prepare.qs at lambda in .\src\prepare.qs at Controlled(1) Microsoft.Quantum.Applications.Chemistry.OneElectronOperatorOperation in .\src\df_chemistry.qs at Controlled(1) lambda in .\src\df_chemistry.qs at Microsoft.Quantum.Applications.Chemistry.WalkStepOperation in .\src\df_chemistry.qs at lambda in .\src\df_chemistry.qs at Microsoft.Quantum.Applications.Chemistry.DoubleFactorizedChemistry in .\src\df_chemistry.qs Qsc.Eval.ResultComparisonUnsupported × runtime error ╭─[unstable_arithmetic_internal.qs:253:1] 253 │ H(target); 254 │ if M(target) == One { · ─┬─ · ╰── cannot compare to result 255 │ Reset(target); ╰──── help: comparing measurement results is not supported when performing circuit synthesis or base profile QIR generation
Any ideas what's going on here?