-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate the standard library to the project system #1912
Conversation
968fc6c
to
2a8f221
Compare
Change in memory usage detected by benchmark. Memory Report for ace3256
|
Change in memory usage detected by benchmark. Memory Report for 38c251c
|
Change in memory usage detected by benchmark. Memory Report for effc42f
|
Change in memory usage detected by benchmark. Memory Report for 670bae7
|
Change in memory usage detected by benchmark. Memory Report for 16216b3
|
…harp into alex/all-stdlib-except-core
30d6a48
to
26642b6
Compare
Change in memory usage detected by benchmark. Memory Report for c42eb73
|
Change in memory usage detected by benchmark. Memory Report for bb2c5a7
|
Change in memory usage detected by benchmark. Memory Report for 07fb0f1
|
Change in memory usage detected by benchmark. Memory Report for fd3e09b
|
Change in memory usage detected by benchmark. Memory Report for 75f9e22
|
Change in memory usage detected by benchmark. Memory Report for c8f7a5c
|
This is a follow-up to #1912, and includes an associated RCA bug fix (#1918 ) that was not exposed until I tried to re-export something from `Core`. This also makes a subtle change to the compiler where the prelude is no longer created by default in the namespace tree, and is rather created when we compile `core.qs`. This was needed because we no longer allow "clobbering namespaces", that is, re-opening a namespace from an _external_ package. --------- Co-authored-by: César Zaragoza Cortés <[email protected]>
This PR migrates the standard library into a Q# project structure.
Previously, we provided the modern standard library API via re-export, while the "true" stdlib was defined in the old explicit-namespace style. Now, that is inverted: the stdlib's code is housed in a project with implicit namespaces, and the legacy (
Microsoft.Quantum.____
) API is provided via re-exports.Why do this? Well, for one, the standard library should look like a regular library and use the latest features we have.
Secondarily, auto-imports and other language dev tools now refer to these items by their
Std.__
name, not theirMicrosoft.Quantum.__
name. See the video below for an example of this in completions:Screen.Recording.2024-09-10.at.2.10.06.PM.mov
Go-to def rendering the new paths:
Screen.Recording.2024-09-11.at.4.54.15.PM.mov
Note that
Unstable.*
has not been migrated to the modern API, as we want to explore stabilizing state preparation (#1910)Core is also not included, but for different reasons: #1911. Coming in a Follow Up PR™️ (
alex/1911
if you want to preview the work there)