You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized that this happens only if I run resource estimator after doing qsharp.init(target_profile=qsharp.TargetProfile.Base). This feels very odd, since I'm trying to estimate the same code with the same tool, and I do qsharp.init is needed only for qsharp.compile that I use to submit the same code to Azure Quantum for a different target - it doesn't feel like it should affect the behavior of resource estimator.
Is your feature request related to a problem? Please describe.
Currently resource estimator requires that the program estimated returns a Result type or array of it. Very often I want to estimate a part of the program that doesn't result in measurements, for example, a single application of a quantum oracle. In the classic QDK, with resource estimator running as a service, it was possible to estimate a program that consisted of qubit allocation and the routine I needed to estimate. Now I have to add to it measurements and returning them, without getting any benefit from this, and increasing the estimates by the number of measurements I add. I cannot even return Zero, because "result literals One and Zero are not supported when performing base profile QIR generation".
Describe the solution you'd like
Allow resource estimator to run for programs that return Unit.
Describe alternatives you've considered
The alternative is to write a wrapper for the program I want to estimate to add measurements. This is not ideal, since this changes the resources required to run the program (single-qubit measurements affect the resource counts).
The text was updated successfully, but these errors were encountered:
If you initialize the compiler to target base profile, then it will error if you try to do anything that isn't base profile compliant. I think it would be more odd if it didn't.
That said, this area still seems to be confusing a few folks, so we do need to think through how to make the profile distinctions more intuitive. Open to ideas! (See #1198 just opened).
I realized that this happens only if I run resource estimator after doing
qsharp.init(target_profile=qsharp.TargetProfile.Base)
. This feels very odd, since I'm trying to estimate the same code with the same tool, and I doqsharp.init
is needed only forqsharp.compile
that I use to submit the same code to Azure Quantum for a different target - it doesn't feel like it should affect the behavior of resource estimator.Is your feature request related to a problem? Please describe.
Currently resource estimator requires that the program estimated returns a
Result
type or array of it. Very often I want to estimate a part of the program that doesn't result in measurements, for example, a single application of a quantum oracle. In the classic QDK, with resource estimator running as a service, it was possible to estimate a program that consisted of qubit allocation and the routine I needed to estimate. Now I have to add to it measurements and returning them, without getting any benefit from this, and increasing the estimates by the number of measurements I add. I cannot evenreturn Zero
, because "result literalsOne
andZero
are not supported when performing base profile QIR generation".Describe the solution you'd like
Allow resource estimator to run for programs that return
Unit
.Describe alternatives you've considered
The alternative is to write a wrapper for the program I want to estimate to add measurements. This is not ideal, since this changes the resources required to run the program (single-qubit measurements affect the resource counts).
The text was updated successfully, but these errors were encountered: