Граф коммитов

594 Коммитов

Автор SHA1 Сообщение Дата
Robin Kuzmin 027a32343e
Added clang-format info to ReadMe.md (#832) 2021-09-24 17:07:06 -07:00
Robin Kuzmin 41f0eb6663
Added missing last param to __quantum__rt__array_slice[_1d] (#830) 2021-09-23 21:34:09 +00:00
Sarah Marshall e5e19279f5
Add `--job-params` option to the entry point driver's `submit` command (#829)
* Add --job-params option

* Add tests

* Add input params to submission context/options

* Add test for more than one "="

* Fix SubmitsQir test

* Trigger Build

Co-authored-by: Ricardo Espinoza <ricardoe@microsoft.com>
2021-09-23 09:46:05 -07:00
César Zaragoza Cortés ae109c6c61
Make constructor public. (#825) 2021-09-17 19:01:49 -07:00
César Zaragoza Cortés 68de1184a4
Add generateazurepayload command to standalone executables (#812)
* Preparations for offline setup.
* Add comment.
* Add new interface method.
* Created top level generateazurepayload command.
* Setup things.
* Handle generate payload.
* Start preparing for code review.
* Add options to generateazurepayload command.
* Add debugging stuff.
* Use the right method through reflection.
* Remove debug messages.
* Fix tests.
* Add tests.
* Address Robin's feedback.
* Address more Robin's feedback.
* Add details to documentation.
2021-09-17 14:13:23 -07:00
Sarah Marshall cca71fefad
Use single dash for single letter command line options in QIR driver generator (#820)
* Use single dash for single letter command line options

* Use property

* Rename Argument to ToArgument
2021-09-17 10:55:04 -07:00
Chris Granade 5604fc6bdf
Fix #818. (#819) 2021-09-14 21:49:01 +00:00
Robin Kuzmin f322cbf130
Adding Static Analysis and other checks to clang-tidy (#810)
* Stopped disabling default checks 'clang-diagnostic-*,clang-analyzer-*'.
* Added cert* check to clang-tidy
* Fixed the clang-format version for Linux.
* Fixed Env:/AGENT_OS
2021-09-14 11:35:07 -07:00
Mariia Mykhailova d020bab6a0
Fix link to Binder to use new URL format (#816)
See https://discourse.jupyter.org/t/mybinder-org-using-jupyterlab-by-default/10715 for the announcement of the breaking change; old URL formats with filepath give 404 error.
2021-09-13 09:55:15 -07:00
Stefan J. Wernli b8159a1753
Update readme for removed .ll files (#814) 2021-09-10 16:14:45 +00:00
George Moussa ef5d4158a1
Validate process exist code in QirExecutableRunner (#813) 2021-09-09 22:21:38 +00:00
Stefan J. Wernli 06339b58e6
Remove (most) .ll files from QIR Runtime implementation (#811)
* WIP: Attempt to remove IR files.

Things that don't work: passing struct Range by value, since C expects pointer always; converting from QIR Pauli which is `i2` to C++ enum PauliId with is `int32_t`.

* Compiling again

* Fix ctl tuples, tests passing

* Remove qsharp-foundation-qis.ll

* Additional comments

* Fix Exp to convert paulis correctly

* CR feedback and fixes
2021-09-08 16:47:23 -07:00
Stefan J. Wernli 96b4572b39
Peform post M preparation in target package (#795) 2021-09-06 19:04:01 +00:00
XField d32e289068
Rename env vars to start with AZURE_QUANTUM_ (#809) 2021-09-05 20:23:59 -07:00
DmitryVasilevsky 70d0e3392e
Qubit management in QIR. (#790)
* Initial proposal for qubit management in QIR. Doesn't compile yet.

* Updated set of functions after discussion

* Updated function signatures to use dynamic allocation

* Updated restricted reuse function names

* Hooked up restricted area management functions

* Hooked up borrowing functions

* Attempting to format files better

Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
2021-09-01 09:52:47 -07:00
César Zaragoza Cortés 98a2fcebca
Import AssemblyCommon.props. (#808) 2021-08-31 13:28:45 -07:00
Sarah Marshall 79a765425b
Add --debug option to `qir-cli` to enable `trackAllocatedObjects` in the generated driver (#807)
* Add --debug option to qir-cli

* Add test for generated driver with debug

* Update debug description

* Remove line pragmas

* Remove leftover line pragmas
2021-08-27 11:00:08 -07:00
Mathias Soeken f9520bcd12
Enable Q# docs for AutoSubstitution project (#806)
Co-authored-by: Chris Granade <chgranad@microsoft.com>
2021-08-25 19:41:07 +02:00
XField 85190d2bec
Azure Quantum client: Add environment variable to set User-Agent prefix (#805)
* Add environment variable to set User-Agent prefix

* Reuse QuantumJobClientOptions to pass the user-agent prefix
2021-08-25 06:54:49 -07:00
Robin Kuzmin 7bf27f0b3b
Fixed the yml file. (#803) 2021-08-20 23:39:21 +00:00
Robin Kuzmin 262e7bd7fc
Optimizing the `microsoft.qsharp-runtime.sanitized` pipeline (#802)
Made the microsoft.qsharp-runtime.sanitized pipeline minimalistic.
2021-08-20 02:33:24 +00:00
César Zaragoza Cortés 487c143169
Add Validate method to the IQirSubmitter interface (#799)
* Create Validate member for IQirSubmitter interface.
* Use Validate for --dry-run option when submitting QIR.
* Removed extra blank line.
2021-08-18 20:42:19 -07:00
Robin Kuzmin 9f35c0b162
Enabled the clang-format check (#794)
* Added `check-sources-formatted.ps1`
* Enabled the format checking.
* Build QIR RT first.
* Renamed src/Qir/Common/externals to src/Qir/Common/Externals
* Excluded FullStateDriverGenerator.
* Excluded Mac from clang-formatting.
2021-08-18 07:22:52 +00:00
Stefan J. Wernli b57d34d5d4
Linux development fixes (#770)
* 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>
2021-08-18 01:11:38 +00:00
Stefan J. Wernli ec491fee57
Check qubit release/measurement status on release (#796)
* 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
2021-08-17 14:17:19 -07:00
Stefan J. Wernli 292976c8b9
Fixing use of `mutex()` to avoid subtle bug (#798)
* 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
2021-08-17 10:19:34 -07:00
Stefan J. Wernli 904a9422f3
Update target package intrinsic names (#789)
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`.
2021-08-17 04:09:11 +00:00
Sarah Marshall fafc45414a
Build QIR entry points in series instead of in parallel (#797) 2021-08-16 23:32:23 +00:00
Chris Granade f6d9cf0292
Only pack crate file, not entire package directory. (#777)
* Only pack crate file, not entire package directory.

* Revert +nightly, as that toolchain is not available in e2e pack steps.
2021-08-16 21:52:02 +00:00
Sonia Lopez d2be3edc80
Updating deprecated code snippet (#775)
Co-authored-by: Chris Granade <chgranad@microsoft.com>
2021-08-16 20:01:02 +00:00
DmitryVasilevsky 2f6fa50fa7
Updated comment on qubit representation (#791)
Co-authored-by: Dmitry Vasilevsky <dmitryv@microsoft.com>
2021-08-13 10:10:37 -07:00
Xinyi Joffre b19ecbb0de
Add support for custom TokenFileCredential (#792)
* Add TokenFileCredential to DefaultQuantumCredential

* Add xml documentation

* Fix spelling error in comment

Co-authored-by: Zander Chocron <alchocro@microsoft.com>

* Apply comment and header fixes from code review

Co-authored-by: Chris Granade <chgranad@microsoft.com>

* Combine constructors

* Add missing file header

Co-authored-by: Zander Chocron <alchocro@microsoft.com>
Co-authored-by: Chris Granade <chgranad@microsoft.com>
2021-08-12 18:53:39 +00:00
César Zaragoza Cortés 8c1d27f07c
Remove dependency to Microsoft.Quantum.Simulation.Common from Microsoft.Quantum.Qir.Runtime package (#786)
* 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.
2021-08-12 00:39:53 -07:00
Sarah Marshall 7afd4952eb
Fix parse error in CMake command-line arguments (#793) 2021-08-12 01:49:25 +00:00
Robin Kuzmin f76ca96d38
Reformatted the C++ sources according to clang-format rules. (#788)
* Reformatted the C++ sources according to clang-format rules.
2021-08-11 15:26:20 -07:00
Robin Kuzmin 59b10b8f64
Updated the .clang-format file (#787) 2021-08-06 14:15:26 -07:00
Robin Kuzmin ee79198788
Sanitizing CI (#776)
* Tested the new (sanitized) pipeline
2021-08-05 20:24:55 -07:00
Robin Kuzmin 6de48c8f21
Preparing for the new pipeline (#785)
* Preparing for the new pipeline
* Increased the Build job timeout.
2021-08-04 15:54:13 -07:00
Mathias Soeken 6958841109
Make step run before syntax tree trimming. (#752) 2021-08-04 17:26:53 +02:00
Stefan J. Wernli 85b62b2319
Use Directory.Build.props to suppress test docgen (#784)
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.
2021-08-02 13:14:46 -07:00
Stefan J. Wernli 6dd7b75061
Update target packages for QIR emission (#773) 2021-07-24 20:36:50 +00:00
bettinaheim f3b25549cc
Combining QIR build tools and runtime into one package (#782) 2021-07-22 15:24:46 +00:00
Andres Paz 4a5678a9ab
Truncate user-agent (#781) 2021-07-22 08:37:34 +00:00
Andres Paz 9203c00a5e
Adding option to provider UserAgent when submitting jobs to Azure Quantum. (#774) 2021-07-20 17:49:02 +00:00
Robin Kuzmin 1f4f5f5f4d
Added user provided seed to CFullStateSinulator (#780) 2021-07-19 16:54:09 +00:00
Stefan J. Wernli 497a2f58d2
Update Simulator default random seed (#779)
* 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
2021-07-17 01:17:09 +00:00
Andres Paz 4c05032aef
Tweak env variables for Live tests (#756)
* Change prefix of Live test env variable

* Change subscription
2021-07-16 00:58:08 -07:00
Andres Paz 18243ccde0
Rename environment variables for Live tests. (#778) 2021-07-16 00:54:51 +00:00
Scott Carda abf94c5ab2
Add a Test Project for Microsoft.Simulator (#771) 2021-07-14 10:19:06 -07:00
Robin Kuzmin d48a6cccb1
Added Undefined Behavior Sanitizer, fixed a few issues. (#765)
* Added UBSan and ASan.
* Updated the `catch2/catch.hpp`.
2021-07-13 09:57:16 -07:00