@G Pavithra We would like to assist you further on this matter as we believe we need to put you in touch with support in order to resolve this error. We will follow up with a private message.
Namespace declarations can only occur on a global scope.
G Pavithra
1
Reputation point
How to avoid the error :
Error QS4001: Namespace declarations can only occur on a global scope.
I have written the following code in a .qs file.
namespace Test {
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Measurement;
open Microsoft.Quantum.Canon;
operation GenerateRandomBits(n : Int) : Result[] {
use qubits = Qubit[n];
ApplyToEach(H, qubits);
return MultiM(qubits);
}
}
Also, how to create a folder in azure quantum workspace jupyter notebook?
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
2 answers
Sort by: Most helpful
-
brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
2022-12-23T05:08:44.313+00:00 -
Sakibul Islam Rayhan 0 Reputation points
2023-01-26T17:58:46.3733333+00:00 I am also having same kind of problem what to do?