* Fixes for Linux devcontainer development
This includes a mix of fixes for successful development within the devcontianer:
- Update Dockerfile to include updated version of CMake.
- Update prerequisites.ps1 to actually call experimental simlator prereq script.
- Update experimental sim prereq script to include nightly toolchain.
- Remove explicit sudo from QIR prereq script.
- Use correct environment vars for experimental sim in build script output.
- Fix native sim OMP thread count set to only occur if OMP is enabled.
* Use 'su -c' instead of 'sudo' for better compatibility
* Adjust `su` usage
* Explicitly check for presence of `sudo`
* Use specific CMake version, skip jq install
* Moving to universal dev container used by the other Azure SDKs
* Moving to universal dev container used by the other Azure SDKs
* Update gitignore for python .venv folder
Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
Co-authored-by: Ian Davis <Ian.F.Davis@microsoft.com>
* Check qubit release/measurement status on release
This mimics the same behavior in the QIR Runtime wrapper for the fullstate simulator as what we have for C#, namely that a qubit is valid for release if and only if it is either in the ground state or the last operation on that qubit was measure.
This fixes#552, and supersedes #710.
* CR feedback
* Revert mutex change
* Fixing use of `mutex()` to avoid subtle bug
This change fixes what seems to be a subtle bug in the syncrhonization mechanisms for the simulator. In particular, we have seen intermediate failures in the simulator tests that seem to be the result of a simulator thread stepping on another thread. As @kuzminrobin pointed out in https://github.com/microsoft/qsharp-runtime/pull/710#discussion_r646051059, this could be due to the fact that the mutex access method, `mutex()` has the same signature as the standard constructor for mutex. This could mean that if the compilation environment has a `using namespace std;` anwhere in it that the calls to `mutex()` would allocate a fresh mutex rather than access the member mutex, meaning none of the threads are synchronized as expected. This avoid the problem by renaming the accessor to `getmutex()`.
* Update calls in macro
This updates the custom instruction names set by the `TargetInstruction` attribute in the Type1, Type2, and Type3 target packages so that they match the naming conventions in the QIR spec. This will avoid unnecessary duplication of instructions, such as `__quantum__qis__x__body` vs `__quantum__qis__x`.
* Remove references that are not needed.
* Fix externals not copying to output directory.
* Changes to Microsoft.Quantum.Simulators package.
* Change the assumed directory where simulator libraries are placed.
* Add native simulator libraries using native default names as content files.
* Add corresponding content files to be copied to the output folder.
* Use wildcard instead of hardcoded files.
* Use the original platform names in the runtimes folder.
* Rename quantum simulator library name to use automatic search.
* Update Simulators.Dev.props to use the correct library name depending on the platform.
* Use filename and extension instead of duplicating logic.
We incorrectly generate documentation for a couple of test projects that we forgot to add `<QSharpDocsGeneration>false</QSharpDocsGeneration>` to. So that we don't have to rely on remembering to include this in each new project, we can use a Directory.Build.props to enforce this setting in the whole test directory.
* Update QIR Fullstate Simulator wrapper RNG
This updates the QIR wrapper around the fullstate simulator to explicitly set the seed in order to ensure that measurement sequences are not deterministic.
* Push fix into simulator itself
* New example notebook with conceptual overview of open quantum systems.
* Clarify that open systems simulators are preview.
* One more "experimental" → "preview."
Optimized computation complexity of allocate() to be O(1) amortized (worst case of a single call is still O(number of nested areas)).
Removed support for EncourageReuse. This is always assumed to be true.
Added more unit tests.
* Allocate is O(1) amortized, EncourageReuse=false not supported.
* Removed mayReuseQubits, added tests
* Added comments to prevAreaWithFreeQubits
Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
* Replace generated files in Quantum.Client with reference to the Azure.QuantumJobs package (#697)
* Changes to enable Mocks for iq# and integrate with Live tests (#707)
* Credentials parameter (#721)
* Move to CredentialFactory.
* Adding support for DeviceCode
* Merge main (#731)
* Update API docs with more examples. (#701)
Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
* QIR runtime heap alloc and heap free functions removed (#703)
* QIR runtime heap alloc and heap free functions removed
* Implement Feedback
Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
* Add QIR Runtime to bootstrap script (#706)
* Increasing the CMAKE required version for QIR (#708)
This updates the required version for CMAKE in the CMakeLists.txt files for QIR, since we are now using features not correctly supported on older versions.
* Added first version of Qubit manager to QIR (#696)
This is the first version of the native Qubit Manager for QIR. Initial unit tests are included.
Qubit Manager supports
* Allocation and release of qubits including arrays of qubits.
* Reuse encouraged/discouraged. Extending capacity enabled/disabled.
* Restricted reuse areas and segments to support low-depth circuits.
Qubit manager builds and tests are run as part of the qir-runtime-unittests. It is used in the bridge to the full state simulator.
Commits:
* Added first draft version of Qubit manager to QIR
* Review feedback. Rearranged functions, QubitIdType, consts, etc.
* include cstring for memcpy
* Renamed QubitManager
* Adjustment after QubitManager rename
* Moved QubitManager.h to public
* Using QubitManager, adjusted defaults, minor fixes
* Removed unused comment
* CR feedback: fixes to types, failures, braces, etc.
* CR feedback - updated types, unique_ptr, etc.
* Auxilliary stuff is now nested in CQubitmanager
* Initializer lists
* Updated CRestrictedReuseAreaStack and used iterator.
* int32_t, more checks, some refactoring
* Refactoring: marking and counting is done in allocate/release qubit id
* Deletion of qubit object, protected members for overrides, Is...Qubit renames
* Moved allocated marking to listQubitListInSharedArray class
* Added comments, mostly status array
* Tests, refactoring, replaced IsFreeQubit with IsFreeQubitId
Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
* Added treating warnings as errors (#718)
* Added "QIR Runtime API Design Guidelines" (#711)
* Initial add of QIR-RT-API-Design-Guidelines.md
* Use of exceptions recommendation (#719)
* Co-authored-by: Mathias Soeken
* Co-authored-by: DmitryVasilevsky
* Auto emulation rewrite step (#514)
* First proposal for auto emulation feature.
* Deprecation.
* Update to newer version.
* Successful tests.
* Compatibility checks.
* Do not change this file.
* Signature checking too restrictive.
* Add integration test.
* Update QDK version.
* Incorporate Microsoft/QuantumLibraries#426.
* Rename emulation to substitution.
* Rename projects and directories.
* Packaging.
* Fix line-feed problems.
* Fix LF.
* Adressing reviewer feedback.
* Update Sdk version.
* Fixes dependency error.
Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
Co-authored-by: Chris Granade <chgranad@microsoft.com>
Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
* Added compiler warning flags -Wall, -Wextra (#725)
* Added -Wall, -Wextra
* Add DelaySign.cs to AutoSubstitution project. (#729)
* extra sln
Co-authored-by: Chris Granade <chgranad@microsoft.com>
Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
Co-authored-by: Pankaj Patil <pankaj.patil2099@hotmail.com>
Co-authored-by: DmitryVasilevsky <60718360+DmitryVasilevsky@users.noreply.github.com>
Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
Co-authored-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Co-authored-by: Mathias Soeken <mathias.soeken@microsoft.com>
Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
* Apply suggestions from code review
Co-authored-by: Chris Granade <chgranad@microsoft.com>
* Incorporating feedback.
* Build 0.17.2106.147878.
Co-authored-by: Chris Granade <chgranad@microsoft.com>
Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
Co-authored-by: Pankaj Patil <pankaj.patil2099@hotmail.com>
Co-authored-by: DmitryVasilevsky <60718360+DmitryVasilevsky@users.noreply.github.com>
Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
Co-authored-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Co-authored-by: Mathias Soeken <mathias.soeken@microsoft.com>
Co-authored-by: Mathias Soeken <masoeken@microsoft.com>