Closed bmhowe23 closed 9 months ago
Hi @bmhowe23 - I need to look at this. To my knowledge the base profile is only defined in qir-spec #25 PR which I just saw you had some comments on. Everything here is based on that PR trying to define the base profile.
Fixed in #251, not yet released. Thanks @bmhowe23 !
Describe the bug
The Base Profile Spec specifies that the
required_num_qubits
andrequired_num_results
attributes must be attached to the entry point function, and while pyqir uses those attribute names in some places (like for internal variable names), there are some important places (like the LLVM interface) wherenum_required_qubits
andnum_required_results
are used instead.To Reproduce
Steps to reproduce the behavior:
Modify
qirlib/resources/tests/rt/initialize.ll
to match the Base Profile specification by applying this patch:-attributes #0 = { "entry_point" "num_required_qubits"="0" "num_required_results"="0" "output_labeling_schema" "qir_profiles"="custom" } +attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="custom" "required_num_qubits"="0" "required_num_results"="0" }
Expected behavior
The test should not fail when using spec-compliant attributes.
Screenshots
N/A
System information
Additional context
N/A