diff --git a/.gitignore b/.gitignore index 754c9b65976..354f05b9d0d 100644 --- a/.gitignore +++ b/.gitignore @@ -336,3 +336,4 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ /src/Simulation/Simulators.Tests/TestProjects/QsharpExe/built +/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/built diff --git a/NOTICE.txt b/NOTICE.txt index 47a426eb9c4..98ac8599c49 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4,7 +4,7 @@ Do Not Translate or Localize This software incorporates material from third parties. Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, or you may send a check or money order for US $5.00, including the product name, -the open source component name, and version number, to: +the open source component name, platform, and version number, to: Source Code Compliance Team Microsoft Corporation @@ -15,235 +15,3778 @@ USA Notwithstanding any other terms, you may reverse engineer this software to the extent required to debug changes to any libraries licensed under the GNU Lesser General Public License. +------------------------------------------------------------------- + +Quantum Simulator Kernel +Copyright (c) ETH Zurich (Kernel developed by ETH Zurich (Switzerland), group of Prof. Troyer, authors Thomas Häner and Damian Steiger) + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Castle.Core 4.4.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright 2004-2016 Castle Project +Copyright (c) 2004-2019 Castle Project +GCopyright (c) 2004-2019 Castle Project + +Copyright 2004-2016 Castle Project - http://www.castleproject.org/ + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Build.Tasks.Git 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Analyzers 3.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2013 Scott Kirkland +Copyright (c) 2012-2014 Mehdi Khalili +Copyright (c) 2013-2014 Omar Khudeira + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.SourceLink.Common 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.SourceLink.GitHub 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +NuGet.Frameworks 5.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers 1.1.118 - Apache-2.0 + + +copyright company +(c) 2008 VeriSign, Inc. +Copyright (c) 2015 Dennis Fischer +Copyright (c) 2017 Marcos Lopez C. +Copyright 2014 Giovanni Bassi and Elemar Jr. +Copyright (c) Tunnel Vision Laboratories, LLC. +Copyright Tunnel Vision Laboratories, LLC 2015 +1Copyright Tunnel Vision Laboratories, LLC 2015 +GetCopyrightText copyrightText WithDocumentText +copyright tag should contain a non-empty company +1Copyright Tunnel Vision Laboratories, LLC 2015 DAn +Copyright 2015 Tunnel Vision Laboratories, LLC StyleCop DotNetAnalyzers Roslyn Diagnostic Analyzer + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers 1.2.0-beta.164 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) 2015 Dennis Fischer +Copyright (c) 2017 Marcos Lopez C. +Copyright 2014 Giovanni Bassi and Elemar Jr. +Copyright (c) Tunnel Vision Laboratories, LLC. +Copyright 2015 Tunnel Vision Laboratories, LLC StyleCop DotNetAnalyzers Roslyn Diagnostic Analyzer + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers.Unstable 1.2.0.164 - Apache-2.0 + + + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +WindowsAzure.Storage 9.3.3 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright 2018 Microsoft Corp. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.abstractions 2.0.3 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) Outercurve Foundation +Copyright (c) Outercurve Foundation WrapNonExceptionThrows RSDS + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.analyzers 0.10.0 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.assert 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) .NET Foundation xUnit.net Assertion Library + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.core 2.4.1 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.extensibility.core 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) .NET Foundation xUnit.net +Copyright (c) .NET Foundation 0xUnit.net +Copyright (c) .NET Foundation xUnit.net Runner Utility + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.extensibility.execution 2.4.1 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.runner.visualstudio 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) Outercurve Foundation +Copyright (c) .NET Foundation xUnit.net +Copyright (c) .NET Foundation 2xUnit.net +Copyright (c) .NET Foundation xUnit.net Runner Utility +Copyright (c) .NET Foundation 1xUnit.net Runner Utility +Copyright (c) .NET Foundation xUnit.net Runner Reporters +Copyright (c) .NET Foundation .xUnit.net Runner Reporters +Copyright (c) Outercurve Foundation WrapNonExceptionThrows RSDS + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FParsec 1.0.3 - BSD-2-Clause + + +(c) 2008 VeriSign, Inc. +Copyright Stephan Tolksdorf +Copyright (c) Stephan Tolksdorf +Copyright Stephan Tolksdorf FParsec +Copyright Stephan Tolksdorf FParsecCS +Copyright Stephan Tolksdorf VarFileInfo + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Markdig.Signed 0.20.0 - BSD-2-Clause + + +(c) 2008 VeriSign, Inc. + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Moq 4.13.1 - BSD-3-Clause + + +(c) 2008 VeriSign, Inc. + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Core 1.0.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Identity 1.1.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Storage.Blobs 12.2.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Storage.Common 12.1.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.Core.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +Copyright (c) Microsoft. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft +Copyright, Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.Runtime.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +Copyright (c) Microsoft. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +CommandLineParser 2.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +copyright Excepting NotParsed +copyright symbol. name author' The company +Copyright WrapNonExceptionThrows CommandLine.Tests, PublicKey +Copyright (c) 2005 - 2018 Giacomo Stelluti Scala & Contributors + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +coverlet.collector 1.0.1 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright 2008 - 2018 Jb Evain +Copyright Microsoft Corporation +Copyright James Newton-King 2008 + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.7.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.5.2 - MIT + + +(c) 2008 VeriSign, Inc. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.7.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Humanizer.Core 2.2.0 - MIT + + +Copyright 2012-2016 +(c) 2008 VeriSign, Inc. +Copyright 2012-2017 Mehdi Khalili + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Bcl.AsyncInterfaces 1.0.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Bcl.AsyncInterfaces 1.1.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Common 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.CSharp 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) Microsoft Corporation. +9Copyright (c) Microsoft Corporation. +ACopyright (c) Microsoft Corporation. +BCopyright (c) Microsoft Corporation. +CCopyright (c) Microsoft Corporation. +DCopyright (c) Microsoft Corporation. +OCopyright (c) Microsoft Corporation. +Copyright (c) Microsoft Corporation. Alle Rechte + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.CSharp.Workspaces 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Workspaces.Common 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CSharp 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Identity.Client 4.13.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Identity.Client.Extensions.Msal 2.10.0-preview - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.NETCore.Platforms 2.1.2 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Quantum.Compiler 0.12.20072031 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Rest.ClientRuntime 2.3.21 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2019 Microsoft +Copyright (c) Microsoft Corporation + +The MIT License (MIT) + +Copyright (c) 2019 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Rest.ClientRuntime.Azure 3.3.19 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +MSTest.TestAdapter 2.0.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) Microsoft Corporation. + +MSTest Framework + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Newtonsoft.Json 12.0.3 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright James Newton-King 2008 +Copyright (c) 2007 James Newton-King +Copyright (c) James Newton-King 2008 + +The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Newtonsoft.Json.Bson 1.0.2 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright James Newton-King 2017 +Copyright (c) 2017 James Newton-King +Copyright (c) James Newton-King 2017 + +The MIT License (MIT) + +Copyright (c) 2017 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Buffers 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Buffers 4.4.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Collections.Immutable 1.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Collections.Immutable 1.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.CommandLine 2.0.0-beta1.20213.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Diagnostics.DiagnosticSource 4.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ------------------------------------------------------------------- -Quantum Simulator Kernel -Copyright (c) ETH Zurich (Kernel developed by ETH Zurich (Switzerland), group of Prof. Troyer, authors Thomas Häner and Damian Steiger) +------------------------------------------------------------------- + +System.Memory 4.5.3 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ------------------------------------------------------------------- ------------------------------------------------------------------- -FParsec 1.0.3 - BSD-2-Clause +System.Numerics.Vectors 4.4.0 - MIT + + (c) 2008 VeriSign, Inc. -Copyright Stephan Tolksdorf -Copyright (c) Stephan Tolksdorf -Copyright Stephan Tolksdorf FParsec -Copyright Stephan Tolksdorf FParsecCS -Copyright Stephan Tolksdorf VarFileInfo +(c) Microsoft Corporation. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) . All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Copyright (c) .NET Foundation and Contributors - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +All rights reserved. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Markdig 0.16.0 - BSD-2-Clause +System.Numerics.Vectors 4.5.0 - MIT + + (c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) . All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Copyright (c) .NET Foundation and Contributors - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +All rights reserved. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- ------------------------------------------------------------------- -CommandLineParser 2.5.0 - MIT +System.Reflection.Metadata 1.6.0 - MIT + + + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Reflection.Metadata 1.7.0 - MIT + + (c) 2008 VeriSign, Inc. -copyright Excepting NotParsed -copyright symbol. name author' The company -Copyright WrapNonExceptionThrows CommandLine.Tests, PublicKey -Copyright (c) 2005 - 2018 Giacomo Stelluti Scala & Contributors +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -FSharp.Core 4.5.2 - MIT +System.Runtime.CompilerServices.Unsafe 4.5.2 - MIT + + (c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -FSharp.Core 4.6.2 - MIT +System.Runtime.CompilerServices.Unsafe 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Runtime.CompilerServices.Unsafe 4.7.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Security.Cryptography.ProtectedData 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Text.Encoding.CodePages 4.5.1 - MIT + + + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetAppHost 2.1.0 - MIT +System.Text.Encodings.Web 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet +Copyright (c) 2007 James Newton-King Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetHostPolicy 2.1.0 - MIT +System.Text.Json 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet +Copyright (c) 2007 James Newton-King Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetHostResolver 2.1.0 - MIT +System.Threading.Tasks.Extensions 4.5.2 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet Copyright (c) 1991-2017 Unicode, Inc. Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.Platforms 2.1.0 - MIT +System.Threading.Tasks.Extensions 4.5.3 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. @@ -260,108 +3803,174 @@ Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.Targets 2.1.0 - MIT +System.ValueTuple 4.4.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. -Copyright (c) 2011, Google Inc. (c) 1997-2005 Sean Eron Anderson. Copyright (c) 1991-2017 Unicode, Inc. Portions (c) International Organization -Copyright (c) 2015 The Chromium Authors. Copyright (c) 2004-2006 Intel Corporation Copyright (c) .NET Foundation Contributors Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.VisualStudio.Threading 16.0.102 - MIT +YamlDotNet 7.0.0 - MIT + + (c) 2008 VeriSign, Inc. -(c) Microsoft Corporation. +Copyright (c) Antoine Aubry and contributors 2008 - 2019 +8Copyright (c) Antoine Aubry and contributors 2008 - 2019 +Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors -MIT License +Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors -Copyright (c) +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.VisualStudio.Validation 15.3.15 - MIT -(c) 2008 VeriSign, Inc. -(c) Microsoft Corporation. - -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +johnazariah/roslyn-wrapper 49f5d9b9e26b0cc9925447e09a50b812df6f0cfb - Unlicense -------------------------------------------------------------------- -------------------------------------------------------------------- +Copyright 2015 -NETStandard.Library 2.0.3 - MIT +This is free and unencumbered software released into the public domain. -MIT License +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. -Copyright (c) +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +For more information, please refer to -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Newtonsoft.Json 12.0.1 - MIT +Microsoft.NETCore.DotNetHostPolicy 2.1.0 - MIT (c) 2008 VeriSign, Inc. -Copyright James Newton-King 2008 -Copyright (c) 2007 James Newton-King -Copyright (c) James Newton-King 2008 +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +Copyright (c) 1998 Microsoft. To +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2015 .NET Foundation +Copyright (c) Microsoft Corporation +Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) The Internet Society 1997. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) The Internet Society (2003). +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com +Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. +Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To MIT License @@ -377,11 +3986,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -Newtonsoft.Json.Bson 1.0.2 - MIT +Microsoft.NETCore.DotNetHostResolver 2.1.0 - MIT (c) 2008 VeriSign, Inc. -Copyright James Newton-King 2017 -Copyright (c) 2017 James Newton-King -Copyright (c) James Newton-King 2017 +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +Copyright (c) 1998 Microsoft. To +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2015 .NET Foundation +Copyright (c) Microsoft Corporation +Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) The Internet Society 1997. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) The Internet Society (2003). +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com +Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. +Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To MIT License @@ -397,7 +4027,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.Collections.Immutable 1.5.0 - MIT +Microsoft.NETCore.Targets 2.1.0 - MIT (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. @@ -428,7 +4058,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.Reflection.Metadata 1.6.0 - MIT +Microsoft.VisualStudio.Threading 16.0.102 - MIT +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. MIT License @@ -444,19 +4076,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.ValueTuple 4.4.0 - MIT +Microsoft.VisualStudio.Validation 15.3.15 - MIT (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. -(c) 1997-2005 Sean Eron Anderson. -Copyright (c) 1991-2017 Unicode, Inc. -Portions (c) International Organization -Copyright (c) 2004-2006 Intel Corporation -Copyright (c) .NET Foundation Contributors -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2011 Novell, Inc (http://www.novell.com) -Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler -Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS MIT License @@ -472,7 +4094,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -YamlDotNet 6.0.0 - MIT +NETStandard.Library 2.0.3 - MIT MIT License @@ -485,36 +4107,3 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- - -------------------------------------------------------------------- - -johnazariah/roslyn-wrapper 49f5d9b9e26b0cc9925447e09a50b812df6f0cfb - Unlicense -Copyright 2015 - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to http://unlicense.org/ - - -------------------------------------------------------------------- \ No newline at end of file diff --git a/Simulation.sln b/Simulation.sln index 685cb9857a7..f3e268e45ec 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library1", "src\Simulation\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library2", "src\Simulation\Simulators.Tests\TestProjects\Library2\Library2.csproj", "{A85277B3-4E07-4E15-8F0C-07CC855A3BCB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library with Spaces", "src\Simulation\Simulators.Tests\TestProjects\Library with Spaces\Library with Spaces.csproj", "{418E79F7-9FCF-4128-AA35-1334A685377D}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "src\Simulation\Simulators.Tests\TestProjects\UnitTests\UnitTests.csproj", "{46278108-D247-4EFC-AC34-23D4A676F62F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{37CDC768-16D4-4574-8553-07D99D0A72F7}" @@ -55,17 +57,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Cli EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Client.Test", "src\Azure\Azure.Quantum.Client.Test\Microsoft.Azure.Quantum.Client.Test.csproj", "{4858E5E3-23FA-4928-B99A-54065875A2B9}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2195B643-E782-42E0-9FB0-26F6D90131E6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoneywellExe", "src\Simulation\Simulators.Tests\TestProjects\HoneywellExe\HoneywellExe.csproj", "{1448512E-132F-4DA8-BCBA-D98F16B31600}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IonQExe", "src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj", "{55833C6C-6E91-4413-9F77-96B3A09666B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{83C5FC86-9D37-4679-9D91-66288DD975AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QCIExe", "src\Simulation\Simulators.Tests\TestProjects\QCIExe\QCIExe.csproj", "{C015FF41-9A51-4AF0-AEFC-2547D596B10A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Quantum.QSharp.Foundation", "src\Simulation\QsharpFoundation\Microsoft.Quantum.QSharp.Foundation.csproj", "{50614DF8-2DD8-4A0B-9AA9-7843BA563572}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TargetedExe", "src\Simulation\Simulators.Tests\TestProjects\TargetedExe\TargetedExe.csproj", "{D292BF18-3956-4827-820E-254C3F81EF09}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulators.Tests", "Simulators.Tests", "{0E9E6621-B3B9-42F9-AA13-AF97ADA026E9}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BC562DAE-FE2B-4A8C-880C-C546F83F99E4}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{3CB6D1AC-C606-433D-8D83-182B4A0475F1}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{9008B252-2DF7-404B-B626-D4497BB70A05}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library with Spaces", "src\Simulation\Simulators.Tests\TestProjects\Library with Spaces\Library with Spaces.csproj", "{F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Quantum.QSharp.Foundation", "src\Simulation\QsharpFoundation\Microsoft.Quantum.QSharp.Foundation.csproj", "{DB45AD73-4D91-43F3-85CC-C63614A96FB0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -351,6 +355,22 @@ Global {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.ActiveCfg = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.Build.0 = Debug|Any CPU {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -399,38 +419,86 @@ Global {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Debug|x64.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Debug|x64.Build.0 = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Release|Any CPU.ActiveCfg = Release|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Release|Any CPU.Build.0 = Release|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Release|x64.ActiveCfg = Release|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.Release|x64.Build.0 = Release|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU - {50614DF8-2DD8-4A0B-9AA9-7843BA563572}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Debug|x64.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Debug|x64.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Release|Any CPU.Build.0 = Release|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Release|x64.ActiveCfg = Release|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.Release|x64.Build.0 = Release|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|x64.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|x64.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|Any CPU.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|x64.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|x64.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|x64.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|Any CPU.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|x64.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|x64.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|x64.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|x64.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|Any CPU.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|x64.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|x64.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|x64.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|x64.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|Any CPU.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|x64.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|x64.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Debug|x64.Build.0 = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Release|Any CPU.Build.0 = Release|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Release|x64.ActiveCfg = Release|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.Release|x64.Build.0 = Release|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {DB45AD73-4D91-43F3-85CC-C63614A96FB0}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -454,14 +522,16 @@ Global {E2F30496-19D8-46A8-9BC0-26936FFE70D2} = {A567C185-A429-418B-AFDE-6F1785BA4A77} {7256B986-6705-42FC-9F57-485D72D9DE51} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {A85277B3-4E07-4E15-8F0C-07CC855A3BCB} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {418E79F7-9FCF-4128-AA35-1334A685377D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {46278108-D247-4EFC-AC34-23D4A676F62F} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {7F05FD87-A2FB-4915-A988-4EF92AB82179} = {37CDC768-16D4-4574-8553-07D99D0A72F7} {4858E5E3-23FA-4928-B99A-54065875A2B9} = {37CDC768-16D4-4574-8553-07D99D0A72F7} - {83C5FC86-9D37-4679-9D91-66288DD975AE} = {2195B643-E782-42E0-9FB0-26F6D90131E6} - {50614DF8-2DD8-4A0B-9AA9-7843BA563572} = {83C5FC86-9D37-4679-9D91-66288DD975AE} - {0E9E6621-B3B9-42F9-AA13-AF97ADA026E9} = {83C5FC86-9D37-4679-9D91-66288DD975AE} - {3CB6D1AC-C606-433D-8D83-182B4A0475F1} = {0E9E6621-B3B9-42F9-AA13-AF97ADA026E9} - {F366DB0F-EF25-4196-94F1-0FCC9B9DB1B5} = {3CB6D1AC-C606-433D-8D83-182B4A0475F1} + {1448512E-132F-4DA8-BCBA-D98F16B31600} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {55833C6C-6E91-4413-9F77-96B3A09666B8} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {C015FF41-9A51-4AF0-AEFC-2547D596B10A} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {D292BF18-3956-4827-820E-254C3F81EF09} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {9008B252-2DF7-404B-B626-D4497BB70A05} = {BC562DAE-FE2B-4A8C-880C-C546F83F99E4} + {DB45AD73-4D91-43F3-85CC-C63614A96FB0} = {9008B252-2DF7-404B-B626-D4497BB70A05} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} diff --git a/bootstrap.cmd b/bootstrap.cmd index bceffe8091f..a7b49e63c01 100644 --- a/bootstrap.cmd +++ b/bootstrap.cmd @@ -12,9 +12,6 @@ git --version || GOTO missingGit :: Initialize C++ runtime project CALL :runtimeBootstrap || EXIT /B 1 -:: Initialize the compiler's nuspec file -CALL :nuspecBootstrap || EXIT /B 1 - :: Next steps are only needed for developers environment, they are skipped for cloud builds. IF NOT "%AGENT_ID%" == "" GOTO EOF @@ -33,17 +30,6 @@ popd EXIT /B -:: Bootstrap the compiler nuspec -:nuspecBootstrap -pushd src\Simulation\CsharpGeneration -CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1 -popd - -pushd src\Simulation\Simulators -CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1 -popd -EXIT /B - :missingGit echo. echo This script depends on git. diff --git a/bootstrap.ps1 b/bootstrap.ps1 new file mode 100644 index 00000000000..861a83f3f34 --- /dev/null +++ b/bootstrap.ps1 @@ -0,0 +1,24 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +$ErrorActionPreference = 'Stop' + +Push-Location (Join-Path $PSScriptRoot "src/Simulation/CsharpGeneration") + .\FindNuspecReferences.ps1 +Pop-Location + +Push-Location (Join-Path $PSScriptRoot "src/Simulation/Simulators") + .\FindNuspecReferences.ps1 +Pop-Location + +# bootstrap native folder +if ($Env:ENABLE_NATIVE -ne "false") { + ## Run the right script based on the OS. + if (-not (Test-Path Env:AGENT_OS) -or ($Env:AGENT_OS.StartsWith("Win"))) { + .\bootstrap.cmd + } else { + .\bootstrap.sh + } +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." +} \ No newline at end of file diff --git a/build/assets/qdk-nuget-icon.png b/build/assets/qdk-nuget-icon.png new file mode 100644 index 00000000000..ca63d20e32e Binary files /dev/null and b/build/assets/qdk-nuget-icon.png differ diff --git a/build/build.ps1 b/build/build.ps1 index 524c0895aa8..73bfd351d01 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -6,14 +6,18 @@ $ErrorActionPreference = 'Stop' & "$PSScriptRoot/set-env.ps1" $all_ok = $True -Write-Host "##[info]Build Native simulator" -cmake --build (Join-Path $PSScriptRoot "../src/Simulation/Native/build") --config $Env:BUILD_CONFIGURATION -if ($LastExitCode -ne 0) { - Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator." - $script:all_ok = $False +if ($Env:ENABLE_NATIVE -ne "false") { + Write-Host "##[info]Build Native simulator" + $nativeBuild = (Join-Path $PSScriptRoot "../src/Simulation/Native/build") + cmake --build $nativeBuild --config $Env:BUILD_CONFIGURATION + if ($LastExitCode -ne 0) { + Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator." + $script:all_ok = $False + } +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." } - function Build-One { param( [string]$action, diff --git a/build/ci.yml b/build/ci.yml index dc1942468d3..b274f861d26 100644 --- a/build/ci.yml +++ b/build/ci.yml @@ -9,34 +9,22 @@ variables: Drop.Native: $(System.DefaultWorkingDirectory)/xplat jobs: -- job: macOS - pool: - vmImage: 'macOS-latest' - steps: - - template: steps-xplat.yml - +- job: build + displayName: Build + strategy: + matrix: + linux: + imageName: 'ubuntu-latest' + mac: + imageName: 'macOS-latest' + windows: + imageName: 'windows-latest' + pool: + vmImage: $(imageName) -- job: Linux - pool: - vmImage: 'ubuntu-latest' steps: - - template: steps-xplat.yml - - -- job: Windows - pool: - vmImage: 'windows-2019' - dependsOn: - - macOS - - Linux - condition: succeeded() - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download xplat native binaries' - inputs: - artifactName: xplat - downloadPath: $(System.DefaultWorkingDirectory) - template: steps.yml + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' inputs: diff --git a/build/manifest.ps1 b/build/manifest.ps1 index 29ea070beb7..c45029d5026 100644 --- a/build/manifest.ps1 +++ b/build/manifest.ps1 @@ -16,15 +16,16 @@ ); Assemblies = @( ".\src\Azure\Azure.Quantum.Client\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Azure.Quantum.Client.dll", - ".\src\simulation\CsharpGeneration\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.CsharpGeneration.dll", - ".\src\simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.CsharpGeneration.App.dll", - ".\src\simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.RoslynWrapper.dll", - ".\src\simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll", - ".\src\simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll", - ".\src\simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.dll", + ".\src\Simulation\CsharpGeneration\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.CsharpGeneration.dll", + ".\src\Simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.CsharpGeneration.App.dll", + ".\src\Simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.RoslynWrapper.dll", + ".\src\Simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll", + ".\src\Simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll", + ".\src\Simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll", + ".\src\Simulation\QsharpFoundation\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Foundation.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.dll", ".\src\Xunit\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Xunit.dll" ) | ForEach-Object { Get-Item (Join-Path $PSScriptRoot (Join-Path ".." $_)) }; } | Write-Output; diff --git a/build/steps-init.yml b/build/steps-init.yml index befde1b5847..694ba89302a 100644 --- a/build/steps-init.yml +++ b/build/steps-init.yml @@ -4,22 +4,20 @@ steps: # Pre-reqs ## - task: NuGetToolInstaller@0 - displayName: 'Use NuGet 5.2.0' + displayName: 'Use NuGet 5.6.0' inputs: - versionSpec: '5.2.0' + versionSpec: '5.6.0' - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.100' + displayName: 'Use .NET Core SDK 3.1.300' inputs: packageType: sdk - version: '3.1.100' + version: '3.1.300' ## # Bootstrap ## -- task: BatchScript@1 - displayName: 'Prepare build' - inputs: - filename: bootstrap.cmd - modifyEnvironment: true +- pwsh: ./bootstrap.ps1 + displayName: "Bootstrap repository" + workingDirectory: $(System.DefaultWorkingDirectory) diff --git a/build/steps-wrap-up.yml b/build/steps-wrap-up.yml index fb36f7194b8..9cf3a9957fc 100644 --- a/build/steps-wrap-up.yml +++ b/build/steps-wrap-up.yml @@ -12,7 +12,8 @@ steps: testRunTitle: 'Q# runtime tests' - task: PublishSymbols@1 - displayName: 'Publish symbols' + displayName: 'Publish symbols (Windows only)' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) continueOnError: true inputs: SearchPattern: '$(System.DefaultWorkingDirectory)/src/**/*.pdb' diff --git a/build/steps-xplat.yml b/build/steps-xplat.yml deleted file mode 100644 index 0af6e6d1300..00000000000 --- a/build/steps-xplat.yml +++ /dev/null @@ -1,50 +0,0 @@ -## -# xplat Native Simulator build -## -steps: - -- task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.100' - inputs: - packageType: sdk - version: '3.1.100' - - -- bash: ./bootstrap.sh - displayName: "Bootstrap repository" - workingDirectory: $(System.DefaultWorkingDirectory) - - -- powershell: ./build.ps1 - displayName: "Building Q# runtime" - workingDirectory: $(System.DefaultWorkingDirectory)/build - - -- powershell: ./test.ps1 - displayName: "Testing Q# runtime" - workingDirectory: $(System.DefaultWorkingDirectory)/build - condition: and(succeeded(), ne(variables['Skip.Tests'], 'true')) - - -- task: CopyFiles@2 - displayName: 'Copy Files to: artifact staging directory' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: 'src/Simulation/Native/build/**' - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - -- task: PublishTestResults@2 - displayName: 'Publish tests results' - condition: succeededOrFailed() - inputs: - testResultsFormat: VSTest - testResultsFiles: '$(System.DefaultWorkingDirectory)/**/*.trx' - testRunTitle: 'Q# xplat runtime tests' - - -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: xplat' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: xplat diff --git a/build/steps.yml b/build/steps.yml index 3b45dddd9eb..87da999f9e3 100644 --- a/build/steps.yml +++ b/build/steps.yml @@ -23,7 +23,8 @@ steps: - powershell: ./pack.ps1 - displayName: "Pack Q# runtime" + displayName: "Pack Q# runtime (Windows only)" + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) workingDirectory: $(System.DefaultWorkingDirectory)/build diff --git a/build/test.ps1 b/build/test.ps1 index f66c42e0ad1..09e0e49fb9f 100644 --- a/build/test.ps1 +++ b/build/test.ps1 @@ -4,16 +4,19 @@ & "$PSScriptRoot/set-env.ps1" $all_ok = $True -Write-Host "##[info]Test Native simulator" -pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build") -cmake --build . --config $Env:BUILD_CONFIGURATION -ctest -C $Env:BUILD_CONFIGURATION -if ($LastExitCode -ne 0) { - Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator" - $script:all_ok = $False +if ($Env:ENABLE_NATIVE -ne "false") { + Write-Host "##[info]Test Native simulator" + pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build") + cmake --build . --config $Env:BUILD_CONFIGURATION + ctest -C $Env:BUILD_CONFIGURATION + if ($LastExitCode -ne 0) { + Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator" + $script:all_ok = $False + } + popd +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." } -popd - function Test-One { Param($project) diff --git a/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs b/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs index 746de8c57b1..bfc879eb9d2 100644 --- a/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs +++ b/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs @@ -60,7 +60,7 @@ public CloudJob(IWorkspace workspace, JobDetails jobDetails) /// /// Gets an URI to access the job. /// - public Uri Uri => throw new NotImplementedException(); + public Uri Uri => GenerateUri(); /// /// Gets the workspace. @@ -91,5 +91,16 @@ public async Task CancelAsync(CancellationToken cancellationToken = default) CloudJob job = (CloudJob)await this.Workspace.CancelJobAsync(this.Details.Id, cancellationToken); this.Details = job.Details; } + + private Uri GenerateUri() + { + if (!(this.Workspace is Workspace cloudWorkspace)) + { + throw new NotSupportedException($"{typeof(CloudJob)}'s Workspace is not of type {typeof(Workspace)} and does not have enough data to generate URI"); + } + + var uriStr = $"https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/{cloudWorkspace.SubscriptionId}/resourceGroups/{cloudWorkspace.ResourceGroupName}/providers/Microsoft.Quantum/Workspaces/{cloudWorkspace.WorkspaceName}/job_management?microsoft_azure_quantum_jobid={Id}"; + return new Uri(uriStr); + } } } diff --git a/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs b/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs index c123010c18b..f37ed454817 100644 --- a/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs +++ b/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs @@ -114,6 +114,12 @@ private Workspace( } } + public string ResourceGroupName { get => resourceGroupName; } + + public string SubscriptionId { get => subscriptionId; } + + public string WorkspaceName { get => workspaceName; } + /// /// Gets or sets the jobs client. /// Internal only. diff --git a/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj b/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj index d4b6c807b9e..83a9e34ab8a 100644 --- a/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj +++ b/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj @@ -14,7 +14,7 @@ MIT https://github.com/microsoft/qsharp-runtime Azure Quantum Q# Qsharp - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png true @@ -46,4 +46,8 @@ + + + + diff --git a/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec b/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec index cf33e999c77..42cfd8e8cca 100644 --- a/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec +++ b/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec @@ -1,5 +1,5 @@ - + Microsoft.Quantum.Development.Kit $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Provides tools for developing quantum algorithms in the Q# programming language. @@ -30,6 +30,7 @@ + diff --git a/src/Simulation/Common/Extensions.cs b/src/Simulation/Common/Extensions.cs index c3e3e00cb87..b36867a7388 100644 --- a/src/Simulation/Common/Extensions.cs +++ b/src/Simulation/Common/Extensions.cs @@ -49,5 +49,57 @@ where op.IsSubclassOf(typeof(T)) factory.Register(op.BaseType, op); } } + + internal static long NextLongBelow(this System.Random random, long upperExclusive) + { + // Don't allow sampling non-positive numbers, so that we don't break + // Math.Log2. + if (upperExclusive <= 0) + { + throw new ArgumentException( + $"Must be positive, got {upperExclusive}.", + nameof(upperExclusive) + ); + } + long SampleNBits(int nBits) + { + // Note that we can assume that nBytes is never more than 8, + // since we got there by looking at the bit length of + // upperExclusive, which is itself a 64-bit integer. + var nBytes = (nBits + 7) / 8; + var nExcessBits = nBytes * 8 - nBits; + var bytes = new byte[nBytes]; + random.NextBytes(bytes); + + // ToInt64 requires an array of exactly eight bytes. + // We can use IsLittleEndian to check which side we + // need to pad on to get there. + var padded = new byte[8]; + bytes.CopyTo(padded, + // ToInt64 requires an array of exactly eight bytes. + // We can use IsLittleEndian to check which side we + // need to pad on to get there. + System.BitConverter.IsLittleEndian + ? 0 + : 8 - nBytes + ); + return System.BitConverter.ToInt64(padded) >> nExcessBits; + }; + + var nBits = (int) (System.Math.Log(upperExclusive, 2) + 1); + var sample = SampleNBits(nBits); + while (sample >= upperExclusive) + { + sample = SampleNBits(nBits); + } + return sample; + } + + internal static long NextLong(this System.Random random, long lower, long upper) + { + var delta = upper - lower; + return lower + random.NextLongBelow(delta + 1); + } + } } diff --git a/src/Simulation/Common/QubitManager.cs b/src/Simulation/Common/QubitManager.cs index bd19bdad338..9bc54dfce3d 100644 --- a/src/Simulation/Common/QubitManager.cs +++ b/src/Simulation/Common/QubitManager.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Microsoft.Quantum.Intrinsic; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Simulators.Exceptions; @@ -25,11 +26,13 @@ public class QubitManager long AllocatedForBorrowing; // All qubits allocated only for borrowing, will be marked with this number or higher. long[] qubits; // Tracks the allocation state of all qubits. long free; // Points to the first free (unallocated) qubit. + long freeTail; // Points to the last free (unallocated) qubit. Only valid iff (!EncourageReuse). long numAllocatedQubits; // Tracking this for optimization. long numDisabledQubits; // Number of disabled qubits. // Options bool MayExtendCapacity; + bool EncourageReuse; public bool DisableBorrowing { get; } const long MaxQubitCapacity = long.MaxValue - 3; @@ -49,9 +52,14 @@ public class QubitManager /// /// Creates and initializes QubitManager that can handle up to numQubits qubits /// - public QubitManager(long qubitCapacity, bool mayExtendCapacity = false, bool disableBorrowing = false) + public QubitManager( + long qubitCapacity, + bool mayExtendCapacity = false, + bool disableBorrowing = false, + bool encourageReuse = true) { MayExtendCapacity = mayExtendCapacity; + EncourageReuse = encourageReuse; DisableBorrowing = disableBorrowing; if (qubitCapacity <= 0) { qubitCapacity = MinQubitCapacity; } @@ -65,6 +73,7 @@ public QubitManager(long qubitCapacity, bool mayExtendCapacity = false, bool dis Debug.Assert(this.qubits[NumQubits - 1] == None); free = 0; + freeTail = NumQubits - 1; numAllocatedQubits = 0; numDisabledQubits = 0; } @@ -95,7 +104,6 @@ private void ExtendQubitArray() { if (oldQubitsArray[i] == oldNone) { // Point to the first new (free) element - Debug.Assert(false,"Why do we extend an array, when we still have available slots?"); this.qubits[i] = oldNumQubits; } else if (oldQubitsArray[i] == oldAllocated) { // Allocated qubits are marked differently now. @@ -121,9 +129,7 @@ private void ExtendQubitArray() if (free == oldNone) { free = oldNumQubits; - } else - { - Debug.Assert(false, "Why do we extend an array, when we still have available slots?"); + freeTail = NumQubits - 1; } } @@ -300,8 +306,29 @@ protected virtual void ReleaseOneQubit(Qubit qubit, bool usedOnlyForBorrowing) { throw new ArgumentException("Attempt to free qubit that has not been allocated."); } - qubits[qubit.Id] = free; - free = qubit.Id; + if (EncourageReuse) { + qubits[qubit.Id] = free; + free = qubit.Id; + } + else + { + // If we are allowed to extend capacity we will never reuse this qubit, + // otherwise we need to add it to the free qubits list. + if (!MayExtendCapacity) + { + if (qubits[freeTail] != None) + { + // There were no free qubits at all + free = qubit.Id; + } + else + { + qubits[freeTail] = qubit.Id; + } + } + qubits[qubit.Id] = None; + freeTail = qubit.Id; + } numAllocatedQubits--; Debug.Assert(numAllocatedQubits >= 0); diff --git a/src/Simulation/Common/QubitManagerTrackingScope.cs b/src/Simulation/Common/QubitManagerTrackingScope.cs index 23f654439de..a166f98bfa0 100644 --- a/src/Simulation/Common/QubitManagerTrackingScope.cs +++ b/src/Simulation/Common/QubitManagerTrackingScope.cs @@ -44,8 +44,12 @@ public List Locals private Stack operationStack; // Stack of operation calls. private StackFrame curFrame; // Current stack frame - all qubits in current scope are listed here. - public QubitManagerTrackingScope(long qubitCapacity, bool mayExtendCapacity = false, bool disableBorrowing = false) - : base(qubitCapacity, mayExtendCapacity, disableBorrowing) + public QubitManagerTrackingScope( + long qubitCapacity, + bool mayExtendCapacity = false, + bool disableBorrowing = false, + bool encourageReuse = true) + : base(qubitCapacity, mayExtendCapacity, disableBorrowing, encourageReuse) { if (!DisableBorrowing) { diff --git a/src/Simulation/Common/SimulatorBase.cs b/src/Simulation/Common/SimulatorBase.cs index 41f566ea641..bdb125468bf 100644 --- a/src/Simulation/Common/SimulatorBase.cs +++ b/src/Simulation/Common/SimulatorBase.cs @@ -31,6 +31,13 @@ public abstract class SimulatorBase : AbstractFactory, IOperat public event Action? OnLog = null; public event Action>? OnException = null; + + protected readonly int randomSeed; + protected readonly Lazy randomGenerator; + public int Seed => randomSeed; + protected System.Random RandomGenerator => randomGenerator.Value; + + /// /// An event fired whenever a simulator has additional diagnostic data @@ -55,8 +62,12 @@ public abstract class SimulatorBase : AbstractFactory, IOperat /// public StackFrame[]? CallStack { get; private set; } - public SimulatorBase(IQubitManager? qubitManager = null) + public SimulatorBase(IQubitManager? qubitManager = null, int? seed = null) { + this.randomSeed = seed ?? Guid.NewGuid().GetHashCode(); + this.randomGenerator = new Lazy( + () => new System.Random(Seed) + ); this.QubitManager = qubitManager; this.InitBuiltinOperations(this.GetType()); @@ -196,7 +207,10 @@ public void EnableExceptionPrinting() /// no guarantee is made as to any particular action taken as a result /// of calling this method. /// - protected void MaybeDisplayDiagnostic(object data) + /// + /// The diagnostic object to be displayed. + /// + public void MaybeDisplayDiagnostic(object data) { OnDisplayableDiagnostic?.Invoke(data); } @@ -417,6 +431,55 @@ public GetQubitsAvailableToBorrow(SimulatorBase m) : base(m) sim.QubitManager.GetFreeQubitsCount(); } + /// + /// Implements the DrawRandomInt operation from the + /// Microsoft.Quantum.Random namespace. + /// + public class DrawRandomInt : Random.DrawRandomInt + { + private SimulatorBase sim; + + public DrawRandomInt(SimulatorBase m) : base(m) + { + sim = m; + } + + public override Func<(long, long), long> Body => arg => + { + var (min, max) = arg; + if (max <= min) + { + throw new ExecutionFailException($"Max must be greater than min, but {max} <= {min}."); + } + return sim.RandomGenerator.NextLong(min, max); + }; + } + + /// + /// Implements the DrawRandomInt operation from the + /// Microsoft.Quantum.Random namespace. + /// + public class DrawRandomDouble : Random.DrawRandomDouble + { + private SimulatorBase sim; + + public DrawRandomDouble(SimulatorBase m) : base(m) + { + sim = m; + } + + public override Func<(double, double), double> Body => arg => + { + var (min, max) = arg; + if (max <= min) + { + throw new ExecutionFailException($"Max must be greater than min, but {max} <= {min}."); + } + var delta = max - min; + return min + delta * sim.RandomGenerator.NextDouble(); + }; + } + public virtual void StartOperation(ICallable operation, IApplyData inputValue) { OnOperationStart?.Invoke(operation, inputValue); diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index f92092e9568..7c44b437a38 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -5,23 +5,18 @@ bin\$(BuildConfiguration)\$(TargetFramework)\$(AssemblyName).xml $([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory)..\..\..\)) $([MSBuild]::NormalizePath($(EnlistmentRoot)src/Simulation/Native/build/)) + + + $([MSBuild]::NormalizePath($(NativeBuildPath)/libMicrosoft.Quantum.Simulator.Runtime.dylib)) $([MSBuild]::NormalizePath($(NativeBuildPath)/libMicrosoft.Quantum.Simulator.Runtime.so)) $([MSBuild]::NormalizePath($(NativeBuildPath)/Release/Microsoft.Quantum.Simulator.Runtime.dll)) $([MSBuild]::NormalizePath($(NativeBuildPath)/Debug/Microsoft.Quantum.Simulator.Runtime.dll)) - $(QsimDllMac) - $(QsimDllLinux) - $(QsimDllWindowsRelease) - $(QsimDllWindowsDebug) + $(QsimDllMac) + $(QsimDllLinux) + $(QsimDllWindowsRelease) + $(QsimDllWindowsDebug) - - - - Microsoft.Quantum.Simulator.Runtime.dll - PreserveNewest - false - - @@ -31,6 +26,14 @@ + + + Microsoft.Quantum.Simulator.Runtime.dll + PreserveNewest + false + + + diff --git a/src/Simulation/Common/Utils.cs b/src/Simulation/Common/Utils.cs index 752c4048dcd..4be748429c7 100644 --- a/src/Simulation/Common/Utils.cs +++ b/src/Simulation/Common/Utils.cs @@ -2,12 +2,14 @@ // Licensed under the MIT License. using Microsoft.Quantum.Simulation.Core; +using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace Microsoft.Quantum.Simulation.Common { - public class CommonUtils + public static class CommonUtils { /// /// Removes PauliI terms from observable and corresponding qubits from qubits. @@ -25,7 +27,7 @@ public static void PruneObservable(IQArray observable, IQArray qub /// /// Returns IEnumerable<T> that contains sub-sequence of [i], such that [i] is not equal to . /// - public static IEnumerable PrunedSequence(IQArray sequence, U value, IQArray sequenceToPrune ) + public static IEnumerable PrunedSequence(IQArray sequence, U value, IQArray sequenceToPrune) { for (uint i = 0; i < sequence.Length; ++i) { @@ -63,5 +65,65 @@ public static (long, long) Reduce(long numerator, long denominatorPower) return (numNew, denomPowerNew); } + + /// + /// Takes an array of doubles as + /// input, and returns a randomly-selected index into the array + /// as an `Int`. The probability of selecting a specific index + /// is proportional to the value of the array element at that index. + /// Array elements that are equal to zero are ignored and their indices + /// are never returned.If any array element is less than zero, or if + /// no array element is greater than zero, then the operation fails. + /// As a source of randomness uses a number uniformly distributed between 0 and 1. + /// Used for Quantum.Intrinsic.Random + /// + /// Number between Zero and one, uniformly distributed + public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) + { + if (unnormalizedDistribution.Any(prob => prob < 0.0)) + { + throw new ExecutionFailException("Random expects array of non-negative doubles."); + } + + var total = unnormalizedDistribution.Sum(); + if (total == 0) + { + throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); + } + + var sample = uniformZeroOneSample * total; + + return unnormalizedDistribution + // Get the unnormalized CDF of the distribution. + .SelectAggregates((double acc, double x) => acc + x) + // Look for the first index at which the CDF is bigger + // than the random sample of 𝑈(0, 1) that we were given + // as a parameter. + .Select((cumulativeProb, idx) => (cumulativeProb, idx)) + .Where(item => item.cumulativeProb >= sample) + // Cast that index to long, and default to returning + // the last item. + .Select( + item => (long)item.idx + ) + .DefaultIfEmpty( + unnormalizedDistribution.Length - 1 + ) + .First(); + } + + internal static IEnumerable SelectAggregates( + this IEnumerable source, + Func aggregate, + TResult initial = default + ) + { + var acc = initial; + foreach (var element in source) + { + acc = aggregate(acc, element); + yield return acc; + } + } } } diff --git a/src/Simulation/Core/AbstractCallable.cs b/src/Simulation/Core/AbstractCallable.cs index dd11d22d7cd..8fc7c712603 100644 --- a/src/Simulation/Core/AbstractCallable.cs +++ b/src/Simulation/Core/AbstractCallable.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System.Collections.Generic; namespace Microsoft.Quantum.Simulation.Core @@ -29,6 +31,12 @@ public AbstractCallable(IOperationFactory m) /// public abstract void Init(); + /// + /// Retrieves the runtime metadata of the Operation. If the Operation has no associated + /// runtime metadata, returns null. + /// + public virtual RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => null; + object IApplyData.Value => null; IEnumerable IApplyData.Qubits => null; diff --git a/src/Simulation/Core/Generics/GenericCallable.cs b/src/Simulation/Core/Generics/GenericCallable.cs index e0668b3723f..cdd4ac3fce4 100644 --- a/src/Simulation/Core/Generics/GenericCallable.cs +++ b/src/Simulation/Core/Generics/GenericCallable.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Concurrent; using System.Diagnostics; @@ -24,6 +26,8 @@ public partial interface ICallable : IApplyData O Apply(object args); ICallable Partial(object partialTuple); + + RuntimeMetadata? GetRuntimeMetadata(IApplyData args); } /// diff --git a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj index 4c36d5e4693..550e18196d4 100644 --- a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj +++ b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj @@ -13,7 +13,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -25,4 +25,8 @@ + + + + diff --git a/src/Simulation/Core/Operations/Adjoint.cs b/src/Simulation/Core/Operations/Adjoint.cs index 6db9f4a9f81..8e0efe35ad2 100644 --- a/src/Simulation/Core/Operations/Adjoint.cs +++ b/src/Simulation/Core/Operations/Adjoint.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -72,6 +74,15 @@ public override void Init() { } public override IApplyData __dataOut(QVoid data) => data; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var baseMetadata = this.BaseOp.GetRuntimeMetadata(args); + if (baseMetadata == null) return null; + baseMetadata.IsAdjoint = !baseMetadata.IsAdjoint; + return baseMetadata; + } + public override string ToString() => $"(Adjoint {BaseOp?.ToString() ?? "" })"; public override string __qsharpType() => this.BaseOp?.__qsharpType(); diff --git a/src/Simulation/Core/Operations/Controlled.cs b/src/Simulation/Core/Operations/Controlled.cs index 8df3a8eb579..770a9081f6f 100644 --- a/src/Simulation/Core/Operations/Controlled.cs +++ b/src/Simulation/Core/Operations/Controlled.cs @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace Microsoft.Quantum.Simulation.Core @@ -74,7 +77,7 @@ public override void Init() { } string ICallable.FullName => ((ICallable)this.BaseOp).FullName; OperationFunctor ICallable.Variant => ((ICallable)this.BaseOp).ControlledVariant(); - public override Func<(IQArray, I), QVoid> Body => this.BaseOp.ControlledBody; + public override Func<(IQArray, I), QVoid> Body => this.BaseOp.ControlledBody; public override Func<(IQArray, I), QVoid> AdjointBody => this.BaseOp.ControlledAdjointBody; @@ -110,6 +113,24 @@ public override void Init() { } public override IApplyData __dataOut(QVoid data) => data; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, I>, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple, I> ctrlArgs) + { + var (controls, baseArgs) = ctrlArgs; + var baseMetadata = this.BaseOp.GetRuntimeMetadata(this.BaseOp.__dataIn(baseArgs)); + if (baseMetadata == null) return null; + baseMetadata.IsControlled = true; + baseMetadata.Controls = controls.Concat(baseMetadata.Controls); + return baseMetadata; + } + + return null; + } + public override string ToString() => $"(Controlled {BaseOp?.ToString() ?? "" })"; public override string __qsharpType() => GenericControlled.AddControlQubitsToSignature(this.BaseOp?.__qsharpType()); diff --git a/src/Simulation/Core/Operations/Operation.cs b/src/Simulation/Core/Operations/Operation.cs index e81248f2528..6a20d69af6c 100644 --- a/src/Simulation/Core/Operations/Operation.cs +++ b/src/Simulation/Core/Operations/Operation.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -14,7 +16,7 @@ public partial interface ICallable : ICallable { O Apply(I args); - ICallable Partial

(Func mapper); + ICallable Partial

(Func mapper); } ///

@@ -32,7 +34,7 @@ public interface IOperationWrapper /// /// Type of input parameters. /// Type of return values. - [DebuggerTypeProxy(typeof(Operation<,>.DebuggerProxy))] + [DebuggerTypeProxy(typeof(Operation<,>.DebuggerProxy))] public abstract class Operation : AbstractCallable, ICallable { private Lazy> _adjoint; @@ -54,7 +56,7 @@ public Operation(IOperationFactory m) : base(m) public virtual IApplyData __dataIn(I data) => new QTuple(data); - + public virtual IApplyData __dataOut(O data) => new QTuple(data); [DebuggerBrowsable(DebuggerBrowsableState.Never)] @@ -75,6 +77,14 @@ public Operation(IOperationFactory m) : base(m) [DebuggerBrowsable(DebuggerBrowsableState.Never)] public ControlledOperation Controlled => _controlled.Value; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => + new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + FormattedNonQubitArgs = args.GetNonQubitArgumentsAsString() ?? "", + Targets = args.GetQubits()?.Distinct() ?? new List(), + }; public O Apply(I a) { @@ -85,7 +95,7 @@ public O Apply(I a) this.Factory?.StartOperation(this, __dataIn(a)); __result__ = this.Body(a); } - catch( Exception e) + catch (Exception e) { this.Factory?.Fail(System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(e)); throw; @@ -95,7 +105,7 @@ public O Apply(I a) this.Factory?.EndOperation(this, __dataOut(__result__)); } - return __result__; + return __result__; } public T Partial(object partialInfo) @@ -202,7 +212,7 @@ internal class DebuggerProxy { private Operation op; - public DebuggerProxy(Operation op) + public DebuggerProxy(Operation op) { this.op = op; } diff --git a/src/Simulation/Core/Operations/OperationPartial.cs b/src/Simulation/Core/Operations/OperationPartial.cs index 12e03f01913..5a68394d3eb 100644 --- a/src/Simulation/Core/Operations/OperationPartial.cs +++ b/src/Simulation/Core/Operations/OperationPartial.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -141,6 +143,10 @@ ICallable ICallable.Partial(Func mapper) IUnitary IUnitary

.Partial(Func mapper) => new OperationPartial(this, mapper); + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => + this.BaseOp.GetRuntimeMetadata(args); + public override string ToString() => $"{this.BaseOp}{{_}}"; public override string __qsharpType() { diff --git a/src/Simulation/Core/RuntimeMetadata.cs b/src/Simulation/Core/RuntimeMetadata.cs new file mode 100644 index 00000000000..d61f63050f9 --- /dev/null +++ b/src/Simulation/Core/RuntimeMetadata.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Quantum.Simulation.Core +{ + ///

+ /// Contains the metadata associated with an operation's runtime execution path. + /// + public class RuntimeMetadata + { + /// + /// Label of gate. + /// + public string Label { get; set; } = ""; + + /// + /// Non-qubit arguments provided to gate, formatted as string. + /// + public string FormattedNonQubitArgs { get; set; } = ""; + + /// + /// True if operation is an adjoint operation. + /// + public bool IsAdjoint { get; set; } + + /// + /// True if operation is a controlled operation. + /// + public bool IsControlled { get; set; } + + /// + /// True if operation is a measurement operation. + /// + public bool IsMeasurement { get; set; } + + /// + /// True if operation is composed of multiple operations. + /// + ///
+ /// + /// This is used in composite operations, such as ApplyToEach. + /// + public bool IsComposite { get; set; } + + /// + /// Group of operations for each classical branch (true and false). + /// + /// + /// This is used in classically-controlled operations. + /// + public IEnumerable>? Children { get; set; } + + /// + /// List of control registers. + /// + public IEnumerable Controls { get; set; } = new List(); + + /// + /// List of target registers. + /// + public IEnumerable Targets { get; set; } = new List(); + + private static bool OnlyOneNull(object? a, object? b) => + (a == null && b != null) || (b == null && a != null); + + private static bool IsBothNull(object? a, object? b) => + a == null && b == null; + + private static bool ListEquals(IEnumerable a, IEnumerable b) => + IsBothNull(a, b) || (!OnlyOneNull(a, b) && a.SequenceEqual(b)); + + public override bool Equals(object? obj) + { + var other = obj as RuntimeMetadata; + + if (other is null) return false; + + if (this.Label != other.Label || this.FormattedNonQubitArgs != other.FormattedNonQubitArgs || + this.IsAdjoint != other.IsAdjoint || this.IsControlled != other.IsControlled || + this.IsMeasurement != other.IsMeasurement || this.IsComposite != other.IsComposite) + return false; + + if (!ListEquals(this.Controls, other.Controls)) return false; + + if (!ListEquals(this.Targets, other.Targets)) return false; + + // If only one children is null, return false + if (OnlyOneNull(this.Children, other.Children)) return false; + + // If both children are not null, compare each child element-wise and return + // false if any of them are not equal + if (!IsBothNull(this.Children, other.Children)) + { + if (this.Children.Count() != other.Children.Count() || + this.Children.Zip(other.Children, ListEquals).Contains(false)) + return false; + } + + return true; + } + + public override int GetHashCode() + { + // Stringify qubits, concatenate as string, and get resulting hashcode + var controlsHash = string.Join(",", this.Controls.Select(q => q?.ToString() ?? "")).GetHashCode(); + var targetsHash = string.Join(",", this.Targets.Select(q => q?.ToString() ?? "")).GetHashCode(); + + // Recursively get hashcode of inner `RuntimeMetadata` objects, concatenate into a string, + // and get resulting hashcode + var childrenHash = (this.Children != null) + ? string.Join(", ", this.Children.Select(child => (child != null) + ? string.Join(",", child.Select(m => m?.GetHashCode().ToString() ?? "0")) + : "0" + )).GetHashCode() + : 0; + + // Combine all other properties and get the resulting hashcode + var otherHash = HashCode.Combine(this.Label, this.FormattedNonQubitArgs, this.IsAdjoint, this.IsControlled, + this.IsMeasurement, this.IsComposite); + + // Combine them all together to get the final hashcode + return HashCode.Combine(controlsHash, targetsHash, childrenHash, otherHash); + } + + public static bool operator ==(RuntimeMetadata? x, RuntimeMetadata? y) => + IsBothNull(x, y) || (x?.Equals(y) ?? false); + + public static bool operator !=(RuntimeMetadata? x, RuntimeMetadata? y) => !(x == y); + } +} diff --git a/src/Simulation/Core/TypeExtensions.cs b/src/Simulation/Core/TypeExtensions.cs index 94bc5ebabf6..6b7722fc234 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -1,8 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; +using System.Collections; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -144,6 +148,62 @@ public static Type[] GetTupleFieldTypes(this Type arg) } } + /// + /// Given an , retrieve its non-qubit fields as a string. + /// Returns null if no non-qubit fields found. + /// + public static string? GetNonQubitArgumentsAsString(this object o) + { + var t = o.GetType(); + + // If object is a Qubit, QVoid, or array of Qubits, ignore it (i.e. return null) + if (o is Qubit || o is QVoid || o is IEnumerable) return null; + + // If object is an ICallable, return its name + if (o is ICallable op) + { + return op.Name; + } + + // If object is a string, enclose it in quotations + if (o is string s) + { + return (s != null) ? $"\"{s}\"" : null; + } + + // If object is a list, recursively extract its inner arguments and + // concatenate them into a list string + if (typeof(IEnumerable).IsAssignableFrom(t)) + { + var elements = ((IEnumerable)o).Cast() + .Select(x => x.GetNonQubitArgumentsAsString()) + .WhereNotNull(); + return (elements.Any()) ? $"[{string.Join(", ", elements)}]" : null; + } + + // If object is a tuple, recursively extract its inner arguments and + // concatenate them into a tuple string + if (t.IsTuple()) + { + var items = t.GetFields() + .Select(f => f.GetValue(o).GetNonQubitArgumentsAsString()) + .WhereNotNull(); + return (items.Any()) ? $"({string.Join(", ", items)})" : null; + } + + // If object is an IApplyData, recursively extract arguments + if (o is IApplyData data) + { + if (data.Value != data) + { + return data.Value?.GetNonQubitArgumentsAsString(); + } + } + + // Otherwise, return argument as a string + return (o != null) ? o.ToString() : null; + } + private static ConcurrentDictionary _normalTypesCache = new ConcurrentDictionary(); /// @@ -259,7 +319,7 @@ public static string OperationVariants(this Type t, object op) return OperationVariants(generic.OperationType, op); } - return OperationVariants(t.BaseType, op); + return OperationVariants(t.BaseType, op); } public static bool TryQSharpOperationType(Type t, out string typeName) diff --git a/src/Simulation/Core/Udts/UDTPartial.cs b/src/Simulation/Core/Udts/UDTPartial.cs index 8d586d4ee80..a97a92f870f 100644 --- a/src/Simulation/Core/Udts/UDTPartial.cs +++ b/src/Simulation/Core/Udts/UDTPartial.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -62,6 +64,18 @@ public ICallable Partial(object partialTuple) return (ICallable)Activator.CreateInstance(partialType, new object[] { this, partialTuple }); } + /// + public RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is P, $"Failed to retrieve runtime metadata for {typeof(U).Name}."); + var baseArgs = this.Apply((P) args.Value); + return new RuntimeMetadata() + { + Label = typeof(U).Name, + FormattedNonQubitArgs = baseArgs?.GetNonQubitArgumentsAsString() ?? "", + }; + } + internal class DebuggerProxy { private readonly UDTPartial u; diff --git a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs index 131e7899e01..a491fe0d43f 100644 --- a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs +++ b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs @@ -1262,6 +1262,11 @@ namespace Microsoft.Quantum.Compiler.Generics { genIter(genU1, a); } + operation genericWithMultipleTypeParams<'A, 'B, 'C>() : Unit { } + + operation callsGenericWithMultipleTypeParams () : Unit { + genericWithMultipleTypeParams(); + } operation composeImpl<'A, 'B> (second : ('A => Unit), first : ('B => 'A), arg : 'B) : Unit { diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs index 90416d37e9e..7de7c97eb5a 100644 --- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs @@ -167,6 +167,7 @@ namespace N1 let genMapper = findCallable @"genMapper" let genIter = findCallable @"genIter" let usesGenerics = findCallable @"usesGenerics" + let callsGenericWithMultipleTypeParams = findCallable @"callsGenericWithMultipleTypeParams" let duplicatedDefinitionsCaller = findCallable @"duplicatedDefinitionsCaller" let nestedArgTuple1 = findCallable @"nestedArgTuple1" let nestedArgTuple2 = findCallable @"nestedArgTuple2" @@ -453,6 +454,11 @@ namespace N1 ] |> testOne usesGenerics + [ + ((NSG, "genericWithMultipleTypeParams"), "ICallable") + ] + |> testOne callsGenericWithMultipleTypeParams + [ ((NS2, "Allocate" ), "Allocate") ((NS2, "H" ), "IUnitary") @@ -872,38 +878,43 @@ namespace N1 |> testOne genU2 [ - template "Allocate" "Allocate" "Microsoft.Quantum.Intrinsic.Allocate" - template "MicrosoftQuantumIntrinsicH" "IUnitary" "Microsoft.Quantum.Intrinsic.H" + template "Allocate" "Allocate" "global::Microsoft.Quantum.Intrinsic.Allocate" + template "MicrosoftQuantumIntrinsicH" "IUnitary" "global::Microsoft.Quantum.Intrinsic.H" template "H" "ICallable" "H" - template "Release" "Release" "Microsoft.Quantum.Intrinsic.Release" - template "MicrosoftQuantumOverridesemptyFunction" "ICallable" "Microsoft.Quantum.Overrides.emptyFunction" + template "Release" "Release" "global::Microsoft.Quantum.Intrinsic.Release" + template "MicrosoftQuantumOverridesemptyFunction" "ICallable" "global::Microsoft.Quantum.Overrides.emptyFunction" template "emptyFunction" "ICallable" "emptyFunction" ] |> testOne duplicatedDefinitionsCaller [ - template "Allocate" "Allocate" "Microsoft.Quantum.Intrinsic.Allocate" - template "CNOT" "IAdjointable<(Qubit, Qubit)>" "Microsoft.Quantum.Intrinsic.CNOT" - template "MicrosoftQuantumTestingHold" "ICallable" "Microsoft.Quantum.Testing.Hold<>" - template "Release" "Release" "Microsoft.Quantum.Intrinsic.Release" + template "Allocate" "Allocate" "global::Microsoft.Quantum.Intrinsic.Allocate" + template "CNOT" "IAdjointable<(Qubit, Qubit)>" "global::Microsoft.Quantum.Intrinsic.CNOT" + template "MicrosoftQuantumTestingHold" "ICallable" "global::Microsoft.Quantum.Testing.Hold<>" + template "Release" "Release" "global::Microsoft.Quantum.Intrinsic.Release" template "ResultToString" "ICallable" "ResultToString" - template "X" "IUnitary" "Microsoft.Quantum.Intrinsic.X" + template "X" "IUnitary" "global::Microsoft.Quantum.Intrinsic.X" template "genIter" "IUnitary" "genIter<>" template "genMapper" "ICallable" "genMapper<,>" template "genU1" "IUnitary" "genU1<>" - template "MicrosoftQuantumTestingnoOpGeneric" "IUnitary" "Microsoft.Quantum.Testing.noOpGeneric<>" - template "MicrosoftQuantumTestingnoOpResult" "IUnitary" "Microsoft.Quantum.Testing.noOpResult" + template "MicrosoftQuantumTestingnoOpGeneric" "IUnitary" "global::Microsoft.Quantum.Testing.noOpGeneric<>" + template "MicrosoftQuantumTestingnoOpResult" "IUnitary" "global::Microsoft.Quantum.Testing.noOpResult" ] |> testOne usesGenerics [ - template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z" + template "genericWithMultipleTypeParams" "ICallable" "genericWithMultipleTypeParams<,,>" + ] + |> testOne callsGenericWithMultipleTypeParams + + [ + template "Z" "IUnitary" "global::Microsoft.Quantum.Intrinsic.Z" "this.self = this;" ] |> testOne selfInvokingOperation [ - template "self" "ICallable" "genRecursion<>" + template "self" "ICallable" "genRecursion<>" ] |> testOne genRecursion @@ -919,21 +930,26 @@ namespace N1 let template = sprintf "typeof(%s)" [ - template "Microsoft.Quantum.Intrinsic.Allocate" - template "Microsoft.Quantum.Intrinsic.CNOT" - template "Microsoft.Quantum.Testing.Hold<>" - template "Microsoft.Quantum.Intrinsic.Release" + template "global::Microsoft.Quantum.Intrinsic.Allocate" + template "global::Microsoft.Quantum.Intrinsic.CNOT" + template "global::Microsoft.Quantum.Testing.Hold<>" + template "global::Microsoft.Quantum.Intrinsic.Release" template "ResultToString" - template "Microsoft.Quantum.Intrinsic.X" + template "global::Microsoft.Quantum.Intrinsic.X" template "genIter<>" template "genMapper<,>" template "genU1<>" - template "Microsoft.Quantum.Testing.noOpGeneric<>" - template "Microsoft.Quantum.Testing.noOpResult" + template "global::Microsoft.Quantum.Testing.noOpGeneric<>" + template "global::Microsoft.Quantum.Testing.noOpResult" ] |> List.sort |> testOne usesGenerics + [ + template "genericWithMultipleTypeParams<,,>" + ] + |> testOne callsGenericWithMultipleTypeParams + [ template "composeImpl<,>" ] @@ -945,7 +961,7 @@ namespace N1 |> testOne genRecursion [ - template "Microsoft.Quantum.Intrinsic.Z" + template "global::Microsoft.Quantum.Intrinsic.Z" template "selfInvokingOperation" ] |> testOne selfInvokingOperation @@ -979,6 +995,11 @@ namespace N1 ] |> testOne usesGenerics + [ + template "ICallable" "genericWithMultipleTypeParams" + ] + |> testOne callsGenericWithMultipleTypeParams + [ template "IUnitary" "Z" template "IAdjointable" "self" @@ -1221,7 +1242,7 @@ namespace N1 "X.Apply(qubits.Data[0L]);" "X.Adjoint.Apply(qubits.Data[0L]);" - "X.Controlled.Apply((qubits.Data?.Slice(new QRange(1L,5L)), qubits.Data[0L]));" + "X.Controlled.Apply((qubits.Data.Slice(new QRange(1L,5L)), qubits.Data[0L]));" "call_target1.Apply((1L, X, X, X, X));" "call_target1.Apply((1L, plain.Data, adj.Data, ctr.Data, uni.Data));" @@ -1799,7 +1820,7 @@ namespace N1 "var r5 = (IQArray)QArray.Create((4L + 2L));" "var r6 = QArray.Create(r5.Length);" "var r7 = (IQArray)QArray.Add(r2, r4);" - "var r8 = (IQArray)r7?.Slice(new QRange(1L, 5L, 10L));" + "var r8 = (IQArray)r7.Slice(new QRange(1L, 5L, 10L));" "var r9 = new arrays_T1(new QArray(Pauli.PauliX, Pauli.PauliY));" "var r10 = (IQArray)QArray.Create(4L);" @@ -1807,8 +1828,8 @@ namespace N1 "var r12 = (IQArray)QArray.Create(r10.Length);" "var r13 = new arrays_T3(new QArray>(new QArray(Result.Zero, Result.One), new QArray(Result.One, Result.Zero)));" "var r14 = (IQArray)QArray.Add(qubits, register.Data);" - "var r15 = (IQArray)register.Data?.Slice(new QRange(0L, 2L));" - "var r16 = (IQArray)qubits?.Slice(new QRange(1L, -(1L)));" + "var r15 = (IQArray)register.Data.Slice(new QRange(0L, 2L));" + "var r16 = (IQArray)qubits.Slice(new QRange(1L, -(1L)));" "var r18 = (IQArray)QArray.Create(2L);" "var r19 = (IQArray)QArray.Create(7L);" "var i0 = r13.Data[0L][1L];" @@ -1839,12 +1860,12 @@ namespace N1 "var r2 = new QRange(10L,-(2L),0L);" "var ranges = (IQArray)QArray.Create(1L);" - "var s1 = (IQArray)qubits?.Slice(new QRange(0L,10L));" - "var s2 = (IQArray)qubits?.Slice(r2);" - "var s3 = (IQArray)qubits?.Slice(ranges[3L]);" - "var s4 = (IQArray)qubits?.Slice(GetMeARange.Apply(QVoid.Instance));" + "var s1 = (IQArray)qubits.Slice(new QRange(0L,10L));" + "var s2 = (IQArray)qubits.Slice(r2);" + "var s3 = (IQArray)qubits.Slice(ranges[3L]);" + "var s4 = (IQArray)qubits.Slice(GetMeARange.Apply(QVoid.Instance));" - "return qubits?.Slice(new QRange(10L,-(3L),0L));" + "return qubits.Slice(new QRange(10L,-(3L),0L));" ] |> testOneBody (applyVisitor sliceOperations) @@ -2314,7 +2335,7 @@ namespace N1 let testOneClass (_,op : QsCallable) executionTarget (expected : string) = let expected = expected.Replace("%%%", HttpUtility.JavaScriptStringEncode op.SourceFile.Value) let assemblyConstants = - new System.Collections.Generic.KeyValuePair<_,_> (AssemblyConstants.ExecutionTarget, executionTarget) + new Collections.Generic.KeyValuePair<_,_> (AssemblyConstants.ProcessorArchitecture, executionTarget) |> Seq.singleton |> ImmutableDictionary.CreateRange let compilation = {Namespaces = syntaxTree; EntryPoints = ImmutableArray.Create op.FullName} @@ -2444,7 +2465,7 @@ namespace N1 public override void Init() { - this.X = this.Factory.Get>(typeof(Microsoft.Quantum.Intrinsic.X)); + this.X = this.Factory.Get>(typeof(global::Microsoft.Quantum.Intrinsic.X)); } public override IApplyData __dataIn(Qubit data) => data; @@ -2502,7 +2523,7 @@ namespace N1 |> testOneClass genCtrl3 AssemblyConstants.HoneywellProcessor """ - [SourceLocation("%%%", OperationFunctor.Body, 1266, 1272)] + [SourceLocation("%%%", OperationFunctor.Body, 1271, 1277)] public partial class composeImpl<__A__, __B__> : Operation<(ICallable,ICallable,__B__), QVoid>, ICallable { public composeImpl(IOperationFactory m) : base(m) @@ -2579,7 +2600,7 @@ namespace N1 [] let ``buildOperationClass - access modifiers`` () = """ -[SourceLocation("%%%", OperationFunctor.Body, 1314, 1316)] +[SourceLocation("%%%", OperationFunctor.Body, 1319, 1321)] internal partial class EmptyInternalFunction : Function, ICallable { public EmptyInternalFunction(IOperationFactory m) : base(m) @@ -2613,7 +2634,7 @@ internal partial class EmptyInternalFunction : Function, ICallable |> testOneClass emptyInternalFunction null """ -[SourceLocation("%%%", OperationFunctor.Body, 1316, 1318)] +[SourceLocation("%%%", OperationFunctor.Body, 1321, 1323)] internal partial class EmptyInternalOperation : Operation, ICallable { public EmptyInternalOperation(IOperationFactory m) : base(m) @@ -2730,7 +2751,7 @@ internal partial class EmptyInternalOperation : Operation, ICallab [] let ``buildOperationClass - concrete functions`` () = """ - [SourceLocation("%%%", OperationFunctor.Body, 1301,1310)] + [SourceLocation("%%%", OperationFunctor.Body, 1306,1315)] public partial class UpdateUdtItems : Function, ICallable { public UpdateUdtItems(IOperationFactorym) : base(m) @@ -3508,7 +3529,7 @@ namespace Microsoft.Quantum.Tests.LineNumbers else { #line 20 "%%" - foreach (var c in ctrls?.Slice(new QRange(0L, 2L, r))) + foreach (var c in ctrls.Slice(new QRange(0L, 2L, r))) #line hidden { #line 21 "%%" @@ -3542,9 +3563,9 @@ namespace Microsoft.Quantum.Tests.LineNumbers ; public override void Init() { - this.Allocate = this.Factory.Get(typeof(Microsoft.Quantum.Intrinsic.Allocate)); - this.Release = this.Factory.Get(typeof(Microsoft.Quantum.Intrinsic.Release)); - this.X = this.Factory.Get>(typeof(Microsoft.Quantum.Intrinsic.X)); + this.Allocate = this.Factory.Get(typeof(global::Microsoft.Quantum.Intrinsic.Allocate)); + this.Release = this.Factory.Get(typeof(global::Microsoft.Quantum.Intrinsic.Release)); + this.X = this.Factory.Get>(typeof(global::Microsoft.Quantum.Intrinsic.X)); } public override IApplyData __dataIn(Int64 data) => new QTuple(data); diff --git a/src/Simulation/CsharpGeneration/Context.fs b/src/Simulation/CsharpGeneration/Context.fs index db612b799c3..fa80c982c4f 100644 --- a/src/Simulation/CsharpGeneration/Context.fs +++ b/src/Simulation/CsharpGeneration/Context.fs @@ -104,6 +104,11 @@ type CodegenContext = { static member public Create (syntaxTree : ImmutableArray) = CodegenContext.Create(syntaxTree, ImmutableDictionary.Empty) + member public this.ProcessorArchitecture = + match this.assemblyConstants.TryGetValue AssemblyConstants.ProcessorArchitecture with + | true, name -> name + | false, _ -> null + member public this.ExecutionTarget = match this.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget with | true, name -> name @@ -116,7 +121,7 @@ type CodegenContext = { member internal this.GenerateCodeForSource (fileName : NonNullable) = let targetsQuantumProcessor = - match this.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget with + match this.assemblyConstants.TryGetValue AssemblyConstants.ProcessorArchitecture with | true, target -> target = AssemblyConstants.HoneywellProcessor || target = AssemblyConstants.IonQProcessor || target = AssemblyConstants.QCIProcessor | _ -> false not (fileName.Value.EndsWith ".dll") || targetsQuantumProcessor diff --git a/src/Simulation/CsharpGeneration/EntryPoint.fs b/src/Simulation/CsharpGeneration/EntryPoint.fs index 8906a7403c7..5ac2196043b 100644 --- a/src/Simulation/CsharpGeneration/EntryPoint.fs +++ b/src/Simulation/CsharpGeneration/EntryPoint.fs @@ -112,7 +112,7 @@ let private createArgument context entryPoint = /// A tuple of the callable's name, argument type name, and return type name. let private callableTypeNames context (callable : QsCallable) = - let callableName = sprintf "%s.%s" callable.FullName.Namespace.Value callable.FullName.Name.Value + let callableName = sprintf "global::%s.%s" callable.FullName.Namespace.Value callable.FullName.Name.Value let argTypeName = SimulationCode.roslynTypeName context callable.Signature.ArgumentType let returnTypeName = SimulationCode.roslynTypeName context callable.Signature.ReturnType callableName, argTypeName, returnTypeName @@ -133,21 +133,28 @@ let private mainMethod context entryPoint = let private entryPointClass context entryPoint = let callableName, argTypeName, returnTypeName = callableTypeNames context entryPoint let property name typeName value = ``property-arrow_get`` typeName name [``public``] get (``=>`` value) - let summaryProperty = property "Summary" "string" (literal ((PrintSummary entryPoint.Documentation false).Trim ())) + let summaryProperty = + (PrintSummary entryPoint.Documentation false).Trim () + |> literal + |> property "Summary" "string" let parameters = parameters context entryPoint.Documentation entryPoint.ArgumentTuple let defaultSimulator = context.assemblyConstants.TryGetValue AssemblyConstants.DefaultSimulator - |> snd - |> (fun value -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value) - let defaultSimulatorNameProperty = property "DefaultSimulatorName" "string" (literal defaultSimulator) + |> fun (_, value) -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value + let defaultSimulatorNameProperty = literal defaultSimulator |> property "DefaultSimulatorName" "string" + let defaultExecutionTargetProperty = + context.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget + |> (fun (_, value) -> if value = null then "" else value) + |> literal + |> property "DefaultExecutionTarget" "string" let infoProperty = - property "Info" - (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName) - (ident callableName <|.|> ident "Info") + property "Info" (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName) + (ident callableName <|.|> ident "Info") let members : MemberDeclarationSyntax list = [ summaryProperty parameterOptionsProperty parameters defaultSimulatorNameProperty + defaultExecutionTargetProperty infoProperty customSimulatorFactory defaultSimulator createArgument context entryPoint diff --git a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 index 0c3695812f9..f669dac1860 100644 --- a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 +++ b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 @@ -21,13 +21,13 @@ using namespace System.IO -$target = 'Microsoft.Quantum.CsharpGeneration.nuspec' +$target = Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec' if (Test-Path $target) { Write-Host "$target exists. Skipping generating new one." exit } -$nuspec = [Xml](Get-Content 'Microsoft.Quantum.CsharpGeneration.nuspec.template') +$nuspec = [Xml](Get-Content (Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec.template')) $dependencies = $nuspec.CreateElement('dependencies', $nuspec.package.metadata.NamespaceURI) # Adds a dependency to the dependencies element if it does not already exist. diff --git a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj index 59d46b17145..dddbbf8c3bb 100644 --- a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj +++ b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj @@ -21,7 +21,7 @@ - + diff --git a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template index f964fcb499e..bf1d252d914 100644 --- a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template +++ b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template @@ -1,5 +1,5 @@ - + Microsoft.Quantum.CsharpGeneration $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false C# code generation for executing Q# programs on a quantum simulator. @@ -24,5 +24,6 @@ + diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs index 30e83926c90..dd853127c13 100644 --- a/src/Simulation/CsharpGeneration/SimulationCode.fs +++ b/src/Simulation/CsharpGeneration/SimulationCode.fs @@ -93,9 +93,7 @@ module SimulationCode = let isGeneric context (n: QsQualifiedName) = if context.allCallables.ContainsKey n then let signature = context.allCallables.[n].Signature - let tIn = signature.ArgumentType - let tOut = signature.ReturnType - hasTypeParameters [tIn;tOut] + not signature.TypeParameters.IsEmpty else false @@ -563,7 +561,7 @@ module SimulationCode = and buildArrayItem a i = match i.ResolvedType.Resolution with - | Range -> ``invoke`` ((buildExpression a) <|?.|> (``ident`` "Slice")) ``(`` [ (buildExpression i) ] ``)`` + | Range -> ``invoke`` ((buildExpression a) <|.|> (``ident`` "Slice")) ``(`` [ (buildExpression i) ] ``)`` | _ -> ``item`` (buildExpression a) [ (buildExpression i) ] let buildBlock (block : QsScope) = @@ -858,12 +856,10 @@ module SimulationCode = let getTypeOfOp context (n: QsQualifiedName) = let name = let sameNamespace = match context.current with | None -> false | Some o -> o.Namespace = n.Namespace - let opName = if sameNamespace then n.Name.Value else n.Namespace.Value + "." + n.Name.Value + let opName = if sameNamespace then n.Name.Value else "global::" + n.Namespace.Value + "." + n.Name.Value if isGeneric context n then let signature = context.allCallables.[n].Signature - let tIn = signature.ArgumentType - let tOut = signature.ReturnType - let count = (getTypeParameters [tIn;tOut]).Length + let count = signature.TypeParameters.Length sprintf "%s<%s>" opName (String.replicate (count - 1) ",") else opName @@ -931,7 +927,7 @@ module SimulationCode = /// Returns a static property of type OperationInfo using the operation's input and output types. let buildOperationInfoProperty (globalContext:CodegenContext) operationInput operationOutput operationName = let propertyType = - match globalContext.ExecutionTarget with + match globalContext.ProcessorArchitecture with | target when target = AssemblyConstants.HoneywellProcessor -> sprintf "HoneywellEntryPointInfo<%s, %s>" operationInput operationOutput | target when target = AssemblyConstants.IonQProcessor -> sprintf "IonQEntryPointInfo<%s, %s>" operationInput operationOutput | target when target = AssemblyConstants.QCIProcessor -> sprintf "QCIEntryPointInfo<%s, %s>" operationInput operationOutput diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs index fda063f478f..2447f3949f0 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.fs +++ b/src/Simulation/EntryPointDriver.Tests/Tests.fs @@ -4,6 +4,7 @@ module Microsoft.Quantum.EntryPointDriver.Tests open System +open System.Collections.Generic open System.Collections.Immutable open System.Globalization open System.IO @@ -59,14 +60,9 @@ let private compileQsharp source = Assert.Empty errors compilation.BuiltCompilation -/// Generates C# source code from the compiled Q# syntax tree. The given default simulator is set as an assembly -/// constant. -let private generateCsharp defaultSimulator (compilation : QsCompilation) = - let assemblyConstants = - match defaultSimulator with - | Some simulator -> ImmutableDictionary.Empty.Add (AssemblyConstants.DefaultSimulator, simulator) - | None -> ImmutableDictionary.Empty - let context = CodegenContext.Create (compilation, assemblyConstants) +/// Generates C# source code from the compiled Q# syntax tree using the given assembly constants. +let private generateCsharp constants (compilation : QsCompilation) = + let context = CodegenContext.Create (compilation, constants) let entryPoint = context.allCallables.[Seq.exactlyOne compilation.EntryPoints] [ SimulationCode.generate (NonNullable<_>.New testFile) context @@ -113,12 +109,12 @@ let private compileCsharp (sources : string seq) = Assert.Equal (0L, stream.Seek (0L, SeekOrigin.Begin)) Assembly.Load (stream.ToArray ()) -/// The assembly for the given test case and default simulator. -let private testAssembly testNum defaultSimulator = +/// The assembly for the given test case assembly constants. +let private testAssembly testNum constants = testNum |> testCase |> compileQsharp - |> generateCsharp defaultSimulator + |> generateCsharp constants |> compileCsharp /// Runs the entry point in the assembly with the given command-line arguments, and returns the output, errors, and exit @@ -165,17 +161,26 @@ let private failsWith expected (assembly, args) = Assert.True (0 <> exitCode, sprintf "Expected non-zero exit code, but got 0 with:\n\n%s\n\n%s" error out) Assert.StartsWith (normalize expected, normalize (error + out)) -/// A tuple of the test assembly and arguments using the standard default simulator. The tuple can be passed to yields -/// or fails. -let private test testNum = - let assembly = testAssembly testNum None +/// A tuple of the test assembly and arguments using the given assembly constants. The tuple can be passed to yields or +/// fails. +let private testWithConstants constants testNum = + let assembly = testAssembly testNum constants fun args -> assembly, Array.ofList args +/// A tuple of the test assembly and arguments with no assembly constants. The tuple can be passed to yields or fails. +let private test = testWithConstants ImmutableDictionary.Empty + /// A tuple of the test assembly and arguments using the given default simulator. The tuple can be passed to yields or /// fails. -let private testWith testNum defaultSimulator = - let assembly = testAssembly testNum (Some defaultSimulator) - fun args -> assembly, Array.ofList args +let private testWithSim defaultSimulator = + ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.DefaultSimulator, defaultSimulator)] + |> testWithConstants + +/// A tuple of the test assembly and arguments using the given default target. The tuple can be passed to yields or +/// fails. +let private testWithTarget defaultTarget = + ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.ExecutionTarget, defaultTarget)] + |> testWithConstants /// Standard command-line arguments for the "submit" command without specifying a target. let private submitWithoutTarget = @@ -467,8 +472,7 @@ let ``Shadows --shots`` () = given ["--shots"; "7"] |> yields "7" given (submitWithNothingTarget @ ["--shots"; "7"]) |> yields "Warning: Option --shots is overridden by an entry point parameter name. Using default value 500. - The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" // Simulators @@ -510,7 +514,7 @@ let ``Rejects unknown simulator`` () = [] let ``Supports default standard simulator`` () = - let given = testWith 32 AssemblyConstants.ResourcesEstimator + let given = testWithSim AssemblyConstants.ResourcesEstimator 32 given ["--use-h"; "false"] |> yields resourceSummary given ["--simulator"; AssemblyConstants.QuantumSimulator; "--use-h"; "false"] |> yields "Hello, World!" @@ -518,7 +522,7 @@ let ``Supports default standard simulator`` () = let ``Supports default custom simulator`` () = // This is not really a "custom" simulator, but the driver does not recognize the fully-qualified name of the // standard simulators, so it is treated as one. - let given = testWith 32 typeof.FullName + let given = testWithSim typeof.FullName 32 given ["--use-h"; "false"] |> yields "Hello, World!" given ["--use-h"; "true"] |> fails given ["--simulator"; typeof.FullName; "--use-h"; "false"] |> yields "Hello, World!" @@ -535,8 +539,7 @@ let ``Supports default custom simulator`` () = let ``Submit can submit a job`` () = let given = test 1 given submitWithNothingTarget - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit can show only the ID`` () = @@ -547,11 +550,29 @@ let ``Submit can show only the ID`` () = let ``Submit uses default values`` () = let given = test 1 given (submitWithNothingTarget @ ["--verbose"]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. + |> yields "Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing - Subscription: mySubscription + Storage: + AAD Token: + Base URI: + Job Name: + Shots: 500 + Output: FriendlyUri + Dry Run: False + Verbose: True + + https://www.example.com/00000000-0000-0000-0000-0000000000000" + +[] +let ``Submit uses default values with default target`` () = + let given = testWithTarget "test.nothing" 1 + given (submitWithoutTarget @ ["--verbose"]) + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: AAD Token: Base URI: @@ -561,7 +582,7 @@ let ``Submit uses default values`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit allows overriding default values`` () = @@ -579,11 +600,41 @@ let ``Submit allows overriding default values`` () = "--shots" "750" ]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. + |> yields "Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing - Subscription: mySubscription + Storage: myStorage + AAD Token: myToken + Base URI: myBaseUri + Job Name: myJobName + Shots: 750 + Output: FriendlyUri + Dry Run: False + Verbose: True + + https://www.example.com/00000000-0000-0000-0000-0000000000000" + +[] +let ``Submit allows overriding default values with default target`` () = + let given = testWithTarget "foo.target" 1 + given (submitWithNothingTarget @ [ + "--verbose" + "--storage" + "myStorage" + "--aad-token" + "myToken" + "--base-uri" + "myBaseUri" + "--job-name" + "myJobName" + "--shots" + "750" + ]) + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: myStorage AAD Token: myToken Base URI: myBaseUri @@ -593,14 +644,13 @@ let ``Submit allows overriding default values`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit requires a positive number of shots`` () = let given = test 1 given (submitWithNothingTarget @ ["--shots"; "1"]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" given (submitWithNothingTarget @ ["--shots"; "0"]) |> fails given (submitWithNothingTarget @ ["--shots"; "-1"]) |> fails @@ -635,8 +685,7 @@ let ``Submit has required options`` () = for args in powerSet allArgs do given (commandName :: List.concat args) |> if List.length args = List.length allArgs - then yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + then yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" else fails [] @@ -686,10 +735,10 @@ let ``Shows help text for submit command`` () = %s submit [options] Options: - --target (REQUIRED) The target device ID. --subscription (REQUIRED) The subscription ID. --resource-group (REQUIRED) The resource group name. --workspace (REQUIRED) The workspace name. + --target (REQUIRED) The target device ID. --storage The storage account connection string. --aad-token The Azure Active Directory authentication token. --base-uri The base URI of the Azure Quantum endpoint. @@ -702,6 +751,33 @@ let ``Shows help text for submit command`` () = --pauli (REQUIRED) The name of a Pauli matrix. --my-cool-bool (REQUIRED) A neat bit. -?, -h, --help Show help and usage information" - let given = test 33 given ["submit"; "--help"] |> yields message + +[] +let ``Shows help text for submit command with default target`` () = + let name = Path.GetFileNameWithoutExtension (Assembly.GetEntryAssembly().Location) + let message = + name + |> sprintf "Usage: + %s submit [options] + + Options: + --subscription (REQUIRED) The subscription ID. + --resource-group (REQUIRED) The resource group name. + --workspace (REQUIRED) The workspace name. + --target The target device ID. + --storage The storage account connection string. + --aad-token The Azure Active Directory authentication token. + --base-uri The base URI of the Azure Quantum endpoint. + --job-name The name of the submitted job. + --shots The number of times the program is executed on the target machine. + --output The information to show in the output after the job is submitted. + --dry-run Validate the program and options, but do not submit to Azure Quantum. + --verbose Show additional information about the submission. + -n (REQUIRED) A number. + --pauli (REQUIRED) The name of a Pauli matrix. + --my-cool-bool (REQUIRED) A neat bit. + -?, -h, --help Show help and usage information" + let given = testWithTarget "foo.target" 33 + given ["submit"; "--help"] |> yields message diff --git a/src/Simulation/EntryPointDriver/Azure.cs b/src/Simulation/EntryPointDriver/Azure.cs index 0f3b3a91e77..541e939b1b0 100644 --- a/src/Simulation/EntryPointDriver/Azure.cs +++ b/src/Simulation/EntryPointDriver/Azure.cs @@ -121,10 +121,21 @@ private static void DisplayJob(IQuantumMachineJob job, OutputFormat format) switch (format) { case OutputFormat.FriendlyUri: - // TODO: - DisplayWithColor(ConsoleColor.Yellow, Console.Error, - "The friendly URI for viewing job results is not available yet. Showing the job ID instead."); - Console.WriteLine(job.Id); + try + { + Console.WriteLine(job.Uri); + } + catch (Exception ex) + { + DisplayWithColor( + ConsoleColor.Yellow, + Console.Error, + $"The friendly URI for viewing job results could not be obtained.{System.Environment.NewLine}" + + $"Error details: {ex.Message}" + + $"Showing the job ID instead."); + + Console.WriteLine(job.Id); + } break; case OutputFormat.Id: Console.WriteLine(job.Id); @@ -150,9 +161,11 @@ private static void DisplayError(string summary, string message) /// Creates a quantum machine based on the Azure Quantum submission settings. /// /// The Azure Quantum submission settings. + /// Thrown if .Target is null. /// A quantum machine. private static IQuantumMachine? CreateMachine(AzureSettings settings) => settings.Target switch { + null => throw new ArgumentNullException(nameof(settings), "Target is null."), NothingMachine.TargetId => new NothingMachine(), ErrorMachine.TargetId => new ErrorMachine(), _ => QuantumMachineFactory.CreateMachine(settings.CreateWorkspace(), settings.Target, settings.Storage) @@ -190,11 +203,6 @@ internal enum OutputFormat /// internal sealed class AzureSettings { - /// - /// The target device ID. - /// - public string? Target { get; set; } - /// /// The subscription ID. /// @@ -210,6 +218,11 @@ internal sealed class AzureSettings /// public string? Workspace { get; set; } + /// + /// The target device ID. + /// + public string? Target { get; set; } + /// /// The storage account connection string. /// @@ -261,10 +274,10 @@ AadToken is null public override string ToString() => string.Join(System.Environment.NewLine, - $"Target: {Target}", $"Subscription: {Subscription}", $"Resource Group: {ResourceGroup}", $"Workspace: {Workspace}", + $"Target: {Target}", $"Storage: {Storage}", $"AAD Token: {AadToken}", $"Base URI: {BaseUri}", diff --git a/src/Simulation/EntryPointDriver/Driver.cs b/src/Simulation/EntryPointDriver/Driver.cs index 13a836e85f2..3ecbb770a3f 100644 --- a/src/Simulation/EntryPointDriver/Driver.cs +++ b/src/Simulation/EntryPointDriver/Driver.cs @@ -40,6 +40,11 @@ public sealed class Driver where TCallable : AbstractCalla /// private OptionInfo SimulatorOption { get; } + /// + /// The target option. + /// + private OptionInfo TargetOption { get; } + /// /// Creates a new driver for the entry point. /// @@ -49,6 +54,7 @@ public Driver(DriverSettings settings, IEntryPoint entryPoint) { this.settings = settings; this.entryPoint = entryPoint; + SimulatorOption = new OptionInfo( settings.SimulatorOptionAliases, entryPoint.DefaultSimulatorName, @@ -60,6 +66,12 @@ public Driver(DriverSettings settings, IEntryPoint entryPoint) settings.ResourcesEstimatorName, entryPoint.DefaultSimulatorName }); + + var targetAliases = ImmutableList.Create("--target"); + const string targetDescription = "The target device ID."; + TargetOption = string.IsNullOrWhiteSpace(entryPoint.DefaultExecutionTarget) + ? new OptionInfo(targetAliases, targetDescription) + : new OptionInfo(targetAliases, entryPoint.DefaultExecutionTarget, targetDescription); } /// @@ -80,10 +92,10 @@ public async Task Run(string[] args) IsHidden = true, Handler = CommandHandler.Create(Submit) }; - AddOptionIfAvailable(submit, TargetOption); AddOptionIfAvailable(submit, SubscriptionOption); AddOptionIfAvailable(submit, ResourceGroupOption); AddOptionIfAvailable(submit, WorkspaceOption); + AddOptionIfAvailable(submit, TargetOption); AddOptionIfAvailable(submit, StorageOption); AddOptionIfAvailable(submit, AadTokenOption); AddOptionIfAvailable(submit, BaseUriOption); @@ -132,10 +144,10 @@ await Simulation.Simulate( private async Task Submit(ParseResult parseResult, AzureSettings azureSettings) => await Azure.Submit(entryPoint, parseResult, new AzureSettings { - Target = azureSettings.Target, Subscription = azureSettings.Subscription, ResourceGroup = azureSettings.ResourceGroup, Workspace = azureSettings.Workspace, + Target = DefaultIfShadowed(TargetOption, azureSettings.Target), Storage = DefaultIfShadowed(StorageOption, azureSettings.Storage), AadToken = DefaultIfShadowed(AadTokenOption, azureSettings.AadToken), BaseUri = DefaultIfShadowed(BaseUriOption, azureSettings.BaseUri), @@ -205,12 +217,6 @@ internal static class Driver { // TODO: Define the aliases as constants. - /// - /// The target option. - /// - internal static readonly OptionInfo TargetOption = new OptionInfo( - ImmutableList.Create("--target"), "The target device ID."); - /// /// The subscription option. /// diff --git a/src/Simulation/EntryPointDriver/DriverSettings.cs b/src/Simulation/EntryPointDriver/DriverSettings.cs index 4b513cf50e4..17ec8e551a3 100644 --- a/src/Simulation/EntryPointDriver/DriverSettings.cs +++ b/src/Simulation/EntryPointDriver/DriverSettings.cs @@ -3,7 +3,7 @@ namespace Microsoft.Quantum.EntryPointDriver { /// - /// Settings for the entry point driver. + /// General settings for the entry point driver that do not depend on the entry point or compilation target. /// public sealed class DriverSettings { diff --git a/src/Simulation/EntryPointDriver/IEntryPoint.cs b/src/Simulation/EntryPointDriver/IEntryPoint.cs index b06f3e7c016..1018fc10f89 100644 --- a/src/Simulation/EntryPointDriver/IEntryPoint.cs +++ b/src/Simulation/EntryPointDriver/IEntryPoint.cs @@ -35,6 +35,11 @@ public interface IEntryPoint /// string DefaultSimulatorName { get; } + /// + /// The default execution target when to use when submitting the entry point to Azure Quantum. + /// + string DefaultExecutionTarget { get; } + /// /// Additional information about the entry point. /// diff --git a/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj b/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj index 2fa2201551c..a506e16a6f9 100644 --- a/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj +++ b/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj @@ -16,7 +16,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -34,4 +34,8 @@ + + + + diff --git a/src/Simulation/Native/CMakeLists.txt b/src/Simulation/Native/CMakeLists.txt index 0d5e14a053c..b9c22c575f7 100644 --- a/src/Simulation/Native/CMakeLists.txt +++ b/src/Simulation/Native/CMakeLists.txt @@ -19,7 +19,7 @@ set(MICROSOFT_QUANTUM_SIMULATOR_VERSION $ENV{ASSEMBLY_VERSION}) set(MICROSOFT_QUANTUM_VERSION_STRING "quarcsw simulator version ${MICROSOFT_QUANTUM_SIMULATOR_VERSION}") MESSAGE(STATUS "QUARCSW version: ${MICROSOFT_QUANTUM_SIMULATOR_VERSION}") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 59903c782db..cd32571ecd4 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -12,14 +12,21 @@ SET DROP_FOLDER=%SYSTEM_DEFAULTWORKINGDIRECTORY%\xplat\src\Simulation\Native\bui DIR %DROP_FOLDER% IF NOT EXIST linux mkdir linux -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll IF NOT EXIST osx mkdir osx -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll + +IF NOT EXIST win10 mkdir win10 +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll win10\Microsoft.Quantum.Simulator.Runtime.dll IF NOT EXIST %BUILD_FOLDER% mkdir %BUILD_FOLDER% pushd %BUILD_FOLDER% +IF NOT EXIST Release mkdir Release +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll Release\Microsoft.Quantum.Simulator.Runtime.dll + + cmake -A "x64" ^ -DBUILD_SHARED_LIBS:BOOL="1" ^ .. diff --git a/src/Simulation/Native/src/SafeInt.hpp b/src/Simulation/Native/src/SafeInt.hpp index 2c379727044..a2809449911 100644 --- a/src/Simulation/Native/src/SafeInt.hpp +++ b/src/Simulation/Native/src/SafeInt.hpp @@ -47,8 +47,10 @@ Please read the leading comments before using the class. #define CPLUSPLUS_STD CPLUSPLUS_98 #elif __cplusplus < 201402L #define CPLUSPLUS_STD CPLUSPLUS_11 -#else +#elif __cplusplus < 201703L #define CPLUSPLUS_STD CPLUSPLUS_14 +#else +#define CPLUSPLUS_STD CPLUSPLUS_17 #endif #elif SAFEINT_COMPILER == VISUAL_STUDIO_COMPILER @@ -60,10 +62,13 @@ Please read the leading comments before using the class. #elif _MSC_VER < 1910 // VS 2015 #define CPLUSPLUS_STD CPLUSPLUS_11 -#else // VS 2017 or later +#elif _MSC_VER < 1926 // VS 2017 +#define CPLUSPLUS_STD CPLUSPLUS_14 + +#else // VS 2019 or later // Note - there is a __cpp_constexpr test now, but everything prior to VS 2017 reports incorrect values // and this version always supports at least the CPLUSPLUS_14 approach -#define CPLUSPLUS_STD CPLUSPLUS_14 +#define CPLUSPLUS_STD CPLUSPLUS_17 #endif @@ -72,8 +77,8 @@ Please read the leading comments before using the class. #define CPLUSPLUS_STD CPLUSPLUS_98 #endif // Determine C++ support level -#if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_11 -#error Must compile with --std=c++11, preferably --std=c++14 to use constexpr improvements +#if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_17 +#error Must compile with --std=c++17 #endif #define CONSTEXPR_NONE 0 diff --git a/src/Simulation/Native/src/simulator/capi.cpp b/src/Simulation/Native/src/simulator/capi.cpp index 5f081acb159..344445f46c4 100644 --- a/src/Simulation/Native/src/simulator/capi.cpp +++ b/src/Simulation/Native/src/simulator/capi.cpp @@ -21,13 +21,13 @@ MICROSOFT_QUANTUM_DECL void destroy(_In_ unsigned id) MICROSOFT_QUANTUM_DECL void seed(_In_ unsigned id, _In_ unsigned s) { - psis[id]->seed(s); + Microsoft::Quantum::Simulator::get(id)->seed(s); } // non-quantum MICROSOFT_QUANTUM_DECL std::size_t random_choice(_In_ unsigned id, _In_ std::size_t n, _In_reads_(n) double* p) { - return psis[id]->random(n, p); + return Microsoft::Quantum::Simulator::get(id)->random(n, p); } MICROSOFT_QUANTUM_DECL double JointEnsembleProbability(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) int* b, _In_reads_(n) unsigned* q) @@ -36,35 +36,35 @@ MICROSOFT_QUANTUM_DECL double JointEnsembleProbability(_In_ unsigned id, _In_ un for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - return psis[id]->JointEnsembleProbability( bv, qv); + return Microsoft::Quantum::Simulator::get(id)->JointEnsembleProbability( bv, qv); } MICROSOFT_QUANTUM_DECL void allocateQubit(_In_ unsigned id, _In_ unsigned q) { - psis[id]->allocateQubit(q); + Microsoft::Quantum::Simulator::get(id)->allocateQubit(q); } MICROSOFT_QUANTUM_DECL void release(_In_ unsigned id, _In_ unsigned q) { - psis[id]->release(q); + Microsoft::Quantum::Simulator::get(id)->release(q); } MICROSOFT_QUANTUM_DECL unsigned num_qubits(_In_ unsigned id) { - return psis[id]->num_qubits(); + return Microsoft::Quantum::Simulator::get(id)->num_qubits(); } #define FWDGATE1(G) \ MICROSOFT_QUANTUM_DECL void G(_In_ unsigned id, _In_ unsigned q) \ { \ - psis[id]->G(q); \ + Microsoft::Quantum::Simulator::get(id)->G(q); \ } #define FWDCSGATE1(G) \ MICROSOFT_QUANTUM_DECL void MC##G(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* c, _In_ unsigned q) \ { \ std::vector vc(c, c + n); \ - psis[id]->C##G(vc, q); \ + Microsoft::Quantum::Simulator::get(id)->C##G(vc, q); \ } #define FWD(G) FWDGATE1(G) FWDCSGATE1(G) @@ -88,14 +88,14 @@ FWD(AdjT) MICROSOFT_QUANTUM_DECL void R(_In_ unsigned id, _In_ unsigned b, _In_ double phi, _In_ unsigned q) { - psis[id]->R(static_cast(b), phi, q); + Microsoft::Quantum::Simulator::get(id)->R(static_cast(b), phi, q); } // multi-controlled rotations MICROSOFT_QUANTUM_DECL void MCR(_In_ unsigned id, _In_ unsigned b, _In_ double phi, _In_ unsigned nc, _In_reads_(nc) unsigned* c, _In_ unsigned q) { std::vector cv(c, c + nc); - psis[id]->CR(static_cast(b), phi, cv, q); + Microsoft::Quantum::Simulator::get(id)->CR(static_cast(b), phi, cv, q); } // Exponential of Pauli operators @@ -105,7 +105,7 @@ MICROSOFT_QUANTUM_DECL void Exp(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - psis[id]->Exp(bv, phi, qv); + Microsoft::Quantum::Simulator::get(id)->Exp(bv, phi, qv); } MICROSOFT_QUANTUM_DECL void MCExp(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* b, _In_ double phi, _In_ unsigned nc, _In_reads_(nc) unsigned* c, _In_reads_(n) unsigned* q) { @@ -114,13 +114,13 @@ MICROSOFT_QUANTUM_DECL void MCExp(_In_ unsigned id, _In_ unsigned n, _In_reads_( bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); std::vector cv(c, c + nc); - psis[id]->CExp(bv, phi, cv, qv); + Microsoft::Quantum::Simulator::get(id)->CExp(bv, phi, cv, qv); } // measurements MICROSOFT_QUANTUM_DECL unsigned M(_In_ unsigned id, _In_ unsigned q) { - return (unsigned)psis[id]->M(q); + return (unsigned)Microsoft::Quantum::Simulator::get(id)->M(q); } MICROSOFT_QUANTUM_DECL unsigned Measure(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* b, _In_reads_(n) unsigned* q) { @@ -128,7 +128,7 @@ MICROSOFT_QUANTUM_DECL unsigned Measure(_In_ unsigned id, _In_ unsigned n, _In_r for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - return (unsigned)psis[id]->Measure(bv, qv); + return (unsigned)Microsoft::Quantum::Simulator::get(id)->Measure(bv, qv); } // apply permutation of basis states to the wave function @@ -136,33 +136,33 @@ MICROSOFT_QUANTUM_DECL void PermuteBasis(_In_ unsigned id, _In_ unsigned n, _In_ _In_reads_(table_size) std::size_t *permutation_table) { const std::vector qs(q, q + n); - psis[id]->permuteBasis(qs, table_size, permutation_table, false); + Microsoft::Quantum::Simulator::get(id)->permuteBasis(qs, table_size, permutation_table, false); } MICROSOFT_QUANTUM_DECL void AdjPermuteBasis(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* q, _In_ std::size_t table_size, _In_reads_(table_size) std::size_t *permutation_table) { const std::vector qs(q, q + n); - psis[id]->permuteBasis(qs, table_size, permutation_table, true); + Microsoft::Quantum::Simulator::get(id)->permuteBasis(qs, table_size, permutation_table, true); } // dump wavefunction to given callback until callback returns false MICROSOFT_QUANTUM_DECL void Dump(_In_ unsigned id, _In_ bool (*callback)(size_t, double, double)) { - psis[id]->dump(callback); + Microsoft::Quantum::Simulator::get(id)->dump(callback); } // dump the wavefunction of the subset of qubits to the given callback returns false MICROSOFT_QUANTUM_DECL bool DumpQubits(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* q, _In_ bool(*callback)(size_t, double, double)) { std::vector qs(q, q + n); - return psis[id]->dumpQubits(qs, callback); + return Microsoft::Quantum::Simulator::get(id)->dumpQubits(qs, callback); } // dump the list of logical qubit ids to given callback MICROSOFT_QUANTUM_DECL void DumpIds(_In_ unsigned id, _In_ void(*callback)(unsigned)) { - psis[id]->dumpIds(callback); + Microsoft::Quantum::Simulator::get(id)->dumpIds(callback); } } diff --git a/src/Simulation/Native/src/simulator/capi_test.cpp b/src/Simulation/Native/src/simulator/capi_test.cpp index feb725db2fa..945127e260d 100644 --- a/src/Simulation/Native/src/simulator/capi_test.cpp +++ b/src/Simulation/Native/src/simulator/capi_test.cpp @@ -23,12 +23,12 @@ void CZ(unsigned sim_id, unsigned c, unsigned q) void Ry(unsigned sim_id, double phi, unsigned q) { - R(sim_id,2,phi,q); + R(sim_id,3,phi,q); } void CRz(unsigned sim_id, double phi, unsigned c, unsigned q) { - MCR(sim_id,3,phi,1,&c,q); + MCR(sim_id,2,phi,1,&c,q); } void CRx(unsigned sim_id, double phi, unsigned c, unsigned q) @@ -115,7 +115,7 @@ void test_gates() CRx(sim_id, 1.0, 0, 1); H(sim_id, 1); - CRx(sim_id, -1.0, 0, 1); + CRz(sim_id, -1.0, 0, 1); H(sim_id, 1); assert(M(sim_id, 1)==false); diff --git a/src/Simulation/Native/src/simulator/factory.cpp b/src/Simulation/Native/src/simulator/factory.cpp index 6d46fbcf7f7..b80b02b35f6 100644 --- a/src/Simulation/Native/src/simulator/factory.cpp +++ b/src/Simulation/Native/src/simulator/factory.cpp @@ -5,6 +5,7 @@ #include "config.hpp" #include "util/cpuid.hpp" #include +#include namespace Microsoft { @@ -31,7 +32,8 @@ namespace Microsoft { namespace Simulator { - mutex_type _mutex; + std::shared_mutex _mutex; + std::vector> _psis; SimulatorInterface* createSimulator(unsigned maxlocal) { @@ -52,26 +54,26 @@ namespace Microsoft MICROSOFT_QUANTUM_DECL unsigned create(unsigned maxlocal) { - std::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); size_t emptySlot = -1; - for (auto const& s : psis) + for (auto const& s : _psis) { if (s == NULL) { - emptySlot = &s - &psis[0]; + emptySlot = &s - &_psis[0]; break; } } if (emptySlot == -1) { - psis.push_back(std::shared_ptr(createSimulator(maxlocal))); - emptySlot = psis.size() - 1; + _psis.push_back(std::shared_ptr(createSimulator(maxlocal))); + emptySlot = _psis.size() - 1; } else { - psis[emptySlot] = std::shared_ptr(createSimulator(maxlocal)); + _psis[emptySlot] = std::shared_ptr(createSimulator(maxlocal)); } return static_cast(emptySlot); @@ -79,12 +81,17 @@ namespace Microsoft MICROSOFT_QUANTUM_DECL void destroy(unsigned id) { - std::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); - psis[id].reset(); + _psis[id].reset(); } - MICROSOFT_QUANTUM_DECL std::vector> psis; + MICROSOFT_QUANTUM_DECL std::shared_ptr& get(unsigned id) + { + std::shared_lock shared_lock(_mutex); + + return _psis[id]; + } } } diff --git a/src/Simulation/Native/src/simulator/factory.hpp b/src/Simulation/Native/src/simulator/factory.hpp index ec9d097fc8a..979b4a3b052 100644 --- a/src/Simulation/Native/src/simulator/factory.hpp +++ b/src/Simulation/Native/src/simulator/factory.hpp @@ -12,8 +12,7 @@ namespace Microsoft { MICROSOFT_QUANTUM_DECL unsigned create(unsigned =0u); MICROSOFT_QUANTUM_DECL void destroy(unsigned); - - extern MICROSOFT_QUANTUM_DECL std::vector> psis; + MICROSOFT_QUANTUM_DECL std::shared_ptr& get(unsigned); } } } diff --git a/src/Simulation/Native/src/simulator/factory_test.cpp b/src/Simulation/Native/src/simulator/factory_test.cpp index 6c196205713..d4745fa2d90 100644 --- a/src/Simulation/Native/src/simulator/factory_test.cpp +++ b/src/Simulation/Native/src/simulator/factory_test.cpp @@ -8,7 +8,7 @@ using namespace Microsoft::Quantum::Simulator; int main(int argc, char** argv) { - auto& sim = psis[create()]; + auto sim = get(create()); unsigned q=0; // qubit number sim->allocateQubit(q); diff --git a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj index 4bbaca22c96..74cf526a2da 100644 --- a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj +++ b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QsharpCore/Diagnostics/Facts.qs b/src/Simulation/QsharpCore/Diagnostics/Facts.qs new file mode 100644 index 00000000000..846a65d22cf --- /dev/null +++ b/src/Simulation/QsharpCore/Diagnostics/Facts.qs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Diagnostics { + + /// # Summary + /// Declares that a classical condition is true. + /// + /// # Input + /// ## actual + /// The condition to be declared. + /// ## message + /// Failure message string to be printed in the case that the classical + /// condition is false. + /// + /// # See Also + /// - Microsoft.Quantum.Diagnostics.Contradiction + /// + /// # Example + /// The following Q# snippet will fail: + /// ```Q# + /// Fact(false, "Expected true."); + /// ``` + function Fact(actual : Bool, message : String) : Unit { + if (not actual) { fail message; } + } + + /// # Summary + /// Declares that a classical condition is false. + /// + /// # Input + /// ## actual + /// The condition to be declared. + /// ## message + /// Failure message string to be printed in the case that the classical + /// condition is true. + /// + /// # See Also + /// - Microsoft.Quantum.Diagnostics.Fact + /// + /// # Example + /// The following Q# code will print "Hello, world": + /// ```Q# + /// Contradiction(2 == 3, "2 is not equal to 3."); + /// Message("Hello, world."); + /// ``` + function Contradiction(actual : Bool, message : String) : Unit { + if (actual) { fail message; } + } + +} diff --git a/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs b/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs new file mode 100644 index 00000000000..60ad51909db --- /dev/null +++ b/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/// # Summary +/// This namespace contains functions and operations useful for diagnostic +/// purposes, including assert operations and claim functions. +namespace Microsoft.Quantum.Diagnostics {} diff --git a/src/Simulation/QsharpCore/Intrinsic.cs b/src/Simulation/QsharpCore/Intrinsic.cs new file mode 100644 index 00000000000..f7bbd4d953b --- /dev/null +++ b/src/Simulation/QsharpCore/Intrinsic.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Intrinsic +{ + public partial class CNOT + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple cnotArgs) + { + var (ctrl, target) = cnotArgs; + return new RuntimeMetadata() + { + Label = "X", + IsControlled = true, + Controls = new List() { ctrl }, + Targets = new List() { target }, + }; + } + + return null; + } + } + + public partial class CCNOT + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple ccnotArgs) + { + var (ctrl1, ctrl2, target) = ccnotArgs; + return new RuntimeMetadata() + { + Label = "X", + IsControlled = true, + Controls = new List() { ctrl1, ctrl2 }, + Targets = new List() { target }, + }; + } + + return null; + } + } + + public partial class M + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is Qubit, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is Qubit target) + { + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = new List() { target }, + }; + } + + return null; + } + } + + public partial class ResetAll + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var metadata = base.GetRuntimeMetadata(args); + if (metadata == null) throw new NullReferenceException($"Null RuntimeMetadata found for {this.ToString()}."); + metadata.IsComposite = true; + return metadata; + } + } +} diff --git a/src/Simulation/QsharpCore/Measurement.cs b/src/Simulation/QsharpCore/Measurement.cs new file mode 100644 index 00000000000..62cf6775fe1 --- /dev/null +++ b/src/Simulation/QsharpCore/Measurement.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System.Collections.Generic; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Measurement +{ + public partial class MResetX + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } + + public partial class MResetY + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } + + public partial class MResetZ + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } +} diff --git a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj index aff69318801..519f0b31367 100644 --- a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj +++ b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj @@ -1,4 +1,4 @@ - + @@ -16,7 +16,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -31,6 +31,10 @@ + + + + diff --git a/src/Simulation/QsharpCore/Random/Convienence.qs b/src/Simulation/QsharpCore/Random/Convienence.qs new file mode 100644 index 00000000000..aa35dc082c5 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Convienence.qs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + open Microsoft.Quantum.Diagnostics; + + /// # Summary + /// Draws a random sample from a categorical distribution specified by a + /// list of probablities. + /// + /// # Description + /// The probability of selecting a specific index is proportional to the value + /// of the array element at that index. + /// Array elements that are equal to zero are ignored and their indices are never + /// returned. If any array element is less than zero, + /// or if no array element is greater than zero, then the operation fails. + /// + /// # Input + /// ## probs + /// An array of floating-point numbers proportional to the probability of + /// selecting each index. + /// + /// # Output + /// An integer $i$ with probability $\Pr(i) = p_i / \sum_i p_i$, where $p_i$ + /// is the $i$th element of `probs`. + /// + /// # See Also + /// - Microsoft.Quantum.Random.CategoricalDistribution + operation DrawCategorical(probs : Double[]) : Int { + // There are nicer ways of doing this, but they require the full + // standard library to be available. + mutable sum = 0.0; + for (prob in probs) { + Fact(prob >= 0.0, "Probabilities must be positive."); + set sum += prob; + } + + let variate = DrawRandomDouble(0.0, sum); + mutable acc = 0.0; + for (idx in 0..Length(probs) - 1) { + set acc += probs[idx]; + if (variate <= acc) { + return idx; + } + } + + return Length(probs) - 1; + } + + /// # Summary + /// Draws a random Pauli value. + /// + /// # Output + /// Either `PauliI`, `PauliX`, `PauliY`, or `PauliZ` with equal + /// probability. + operation DrawRandomPauli() : Pauli { + return [PauliI, PauliX, PauliY, PauliZ][DrawRandomInt(0, 3)]; + } + + /// # Summary + /// Given an array of data and an a distribution over its indices, + /// attempts to choose an element at random. + /// + /// # Input + /// ## data + /// The array from which an element should be chosen. + /// ## indexDistribution + /// A distribution over the indices of `data`. + /// + /// # Ouput + /// A tuple `(succeeded, element)` where `succeeded` is `true` if and only + /// if the sample chosen from `indexDistribution` was a valid index into + /// `data`, and where `element` is an element of `data` chosen at random. + /// + /// # Example + /// The following Q# snippet chooses an element at random from an array: + /// ```Q# + /// let (succeeded, element) = MaybeChooseElement( + /// data, + /// DiscreteUniformDistribution(0, Length(data) - 1) + /// ); + /// Fact(succeeded, "Index chosen by MaybeChooseElement was not valid."); + /// ``` + operation MaybeChooseElement<'T>(data : 'T[], indexDistribution : DiscreteDistribution) : (Bool, 'T) { + let index = indexDistribution::Sample(); + if (index >= 0 and index < Length(data)) { + return (true, data[index]); + } else { + return (false, Default<'T>()); + } + } + + /// # Summary + /// Given a success probability, returns a single Bernoulli trial that + /// is true with the given probability. + /// + /// # Input + /// ## successProbability + /// The probability with which `true` should be returned. + /// + /// # Output + /// `true` with probability `successProbability` and `false` with + /// probability `1.0 - successProbability`. + /// + /// # Example + /// The following Q# snippet samples flips from a biased coin: + /// ```Q# + /// let flips = DrawMany(DrawRandomBool, 10, 0.6); + /// ``` + operation DrawRandomBool(successProbability : Double) : Bool { + return DrawRandomDouble(0.0, 1.0) <= successProbability; + } +} diff --git a/src/Simulation/QsharpCore/Random/Internal.qs b/src/Simulation/QsharpCore/Random/Internal.qs new file mode 100644 index 00000000000..2dad23ac5e2 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Internal.qs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + + // This operation duplicates an operation from the Q# standard libraries + // and is used to support partially applying all inputs to a given + // operation without actually executing it. + internal operation Delay<'TInput, 'TOutput>(op : ('TInput => 'TOutput), input : 'TInput, delay : Unit) : 'TOutput { + return op(input); + } +} diff --git a/src/Simulation/QsharpCore/Random/Intrinsic.qs b/src/Simulation/QsharpCore/Random/Intrinsic.qs new file mode 100644 index 00000000000..4ac4fe640ed --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Intrinsic.qs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + + /// # Summary + /// Draws a random integer in a given inclusive range. + /// + /// # Input + /// ## min + /// The smallest integer to be drawn. + /// ## max + /// The largest integer to be drawn. + /// + /// # Output + /// An integer in the inclusive range from `min` to `max` with uniform + /// probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly rolls a six-sided die: + /// ```Q# + /// let roll = DrawRandomInt(1, 6); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DiscreteUniformDistribution + operation DrawRandomInt(min : Int, max : Int) : Int { + body intrinsic; + } + + /// # Summary + /// Draws a random real number in a given inclusive interval. + /// + /// # Input + /// ## min + /// The smallest real number to be drawn. + /// ## max + /// The largest real number to be drawn. + /// + /// # Output + /// A random real number in the inclusive interval from `min` to `max` with + /// uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly draws an angle between $0$ and $2 \pi$: + /// ```Q# + /// let angle = DrawRandomDouble(0.0, 2.0 * PI()); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.ContinuousUniformDistribution + operation DrawRandomDouble(min : Double, max : Double) : Double { + body intrinsic; + } + +} diff --git a/src/Simulation/QsharpCore/Random/Normal.qs b/src/Simulation/QsharpCore/Random/Normal.qs new file mode 100644 index 00000000000..01f11b710f7 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Normal.qs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + + internal operation DrawStandardNormalVariate() : Double { + let (u1, u2) = (DrawRandomDouble(0.0, 1.0), DrawRandomDouble(0.0, 1.0)); + return Sqrt(-2.0 * Log(u1)) * Cos(2.0 * PI() * u2); + } + + /// # Summary + /// Returns a normal distribution with mean 0 and variance 1. + /// + /// # Example + /// The following draws 10 samples from the standard normal distribution: + /// ```Q# + /// let samples = DrawMany((StandardNormalDistribution())::Sample, 10, ()); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.Random.NormalDistribution + function StandardNormalDistribution() : ContinuousDistribution { + return ContinuousDistribution(DrawStandardNormalVariate); + } + + internal function StandardTransformation(mean : Double, variance : Double, variate : Double) : Double { + return mean + Sqrt(variance) * variate; + } + + /// # Summary + /// Returns a normal distribution with a given mean and variance. + /// + /// # Example + /// The following draws 10 samples from the normal distribution with mean + /// 2 and standard deviation 0.1: + /// ```Q# + /// let samples = DrawMany( + /// (NormalDistribution(2.0, PowD(0.1, 2.0)))::Sample, + /// 10, () + /// ); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.Random.StandardNormalDistribution + function NormalDistribution(mean : Double, variance : Double) : ContinuousDistribution { + return TransformedContinuousDistribution( + StandardTransformation(mean, variance, _), + StandardNormalDistribution() + ); + } + +} diff --git a/src/Simulation/QsharpCore/Random/Types.qs b/src/Simulation/QsharpCore/Random/Types.qs new file mode 100644 index 00000000000..703701814d7 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Types.qs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + + /// # Summary + /// Represents a univariate probability distribution over real numbers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype ContinuousDistribution = ( + Sample : (Unit => Double) + ); + + + /// # Summary + /// Represents a univariate probability distribution over complex numbers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype ComplexDistribution = ( + Sample : (Unit => Complex) + ); + + /// # Summary + /// Represents a univariate probability distribution over integers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype DiscreteDistribution = ( + Sample : (Unit => Int) + ); + + /// # Summary + /// Represents a univariate probability distribution over integers of + /// arbitrary size. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + newtype BigDiscreteDistribution = ( + Sample : (Unit => BigInt) + ); + + /// # Summary + /// Returns a discrete categorical distribution, in which the probability + /// for each of a finite list of given outcomes is explicitly specified. + /// + /// # Input + /// ## probs + /// The probabilities for each outcome from the categorical distribution. + /// These probabilities may not be normalized, but must all be non-negative. + /// + /// # Output + /// The index `i` with probability `probs[i] / sum`, where `sum` is the sum + /// of `probs` given by `Fold(PlusD, 0.0, probs)`. + /// + /// # Example + /// The following Q# code will display 0 with probability 30% and 1 with + /// probability 70%: + /// ```Q# + /// let dist = CategoricalDistribution([0.3, 0.7]); + /// Message($"Got sample: {dist::Sample()}"); + /// ``` + function CategoricalDistribution(probs : Double[]) : DiscreteDistribution { + return DiscreteDistribution(Delay(DrawCategorical, probs, _)); + } + + /// # Summary + /// Internal-only operation for sampling from transformed distributions. + /// Should only be used via partial application. + internal operation SampleTransformedContinuousDistribution( + transform : (Double -> Double), + distribution : ContinuousDistribution + ) : Double { + return transform(distribution::Sample()); + } + + /// # Summary + /// Given a continuous distribution, returns a new distribution that + /// transforms the original by a given function. + /// + /// # Input + /// ## transform + /// A function that transforms variates of the original distribution to the + /// transformed distribution. + /// ## distribution + /// The original distribution to be transformed. + /// + /// # Output + /// A new distribution related to `distribution` by the transformation given + /// by `transform`. + /// + /// # Example + /// The following two distributions are identical: + /// ```Q# + /// let dist1 = ContinuousUniformDistribution(1.0, 2.0); + /// let dist2 = TransformedContinuousDistribution( + /// PlusD(1.0, _), + /// ContinuousUniformDistribution(0.0, 1.0) + /// ); + /// ``` + function TransformedContinuousDistribution( + transform : (Double -> Double), + distribution : ContinuousDistribution + ) : ContinuousDistribution { + return ContinuousDistribution(Delay( + SampleTransformedContinuousDistribution, + (transform, distribution), + _ + )); + } + +} diff --git a/src/Simulation/QsharpCore/Random/Uniform.qs b/src/Simulation/QsharpCore/Random/Uniform.qs new file mode 100644 index 00000000000..e022d9f6d46 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Uniform.qs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + open Microsoft.Quantum.Diagnostics; + + /// # Summary + /// Returns a uniform distribution over a given inclusive interval. + /// + /// # Input + /// ## min + /// The smallest real number to be drawn. + /// ## max + /// The largest real number to be drawn. + /// + /// # Output + /// A distribution whose random variates are real numbers in the inclusive + /// interval from `min` to `max` with uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly draws an angle between $0$ and $2 \pi$: + /// ```Q# + /// let angleDistribution = ContinuousUniformDistribution(0.0, 2.0 * PI()); + /// let angle = angleDistribution::Sample(); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DrawRandomDouble + function ContinuousUniformDistribution( + min : Double, max : Double + ) : ContinuousDistribution { + Fact(max > min, $"Max must be larger than min, but {max} <= {min}."); + return ContinuousDistribution(Delay(DrawRandomDouble, (min, max), _)); + } + + /// # Summary + /// Returns a uniform distribution over a given inclusive range. + /// + /// # Input + /// ## min + /// The smallest integer to be drawn. + /// ## max + /// The largest integer to be drawn. + /// + /// # Output + /// A distribution whose random variates are integers in the inclusive + /// range from `min` to `max` with uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly rolls a six-sided die: + /// ```Q# + /// let dieDistribution = DiscreteUniformDistribution(1, 6); + /// let dieRoll = dieDistribution::Sample(); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DrawRandomDouble + function DiscreteUniformDistribution(min : Int, max : Int) : DiscreteDistribution { + Fact(max > min, $"Max must be larger than min, but {max} <= {min}."); + return DiscreteDistribution(Delay(DrawRandomInt, (min, max), _)); + } + +} diff --git a/src/Simulation/QsharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj b/src/Simulation/QsharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj index 74767a47432..f1400e76f30 100644 --- a/src/Simulation/QsharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj +++ b/src/Simulation/QsharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj @@ -1,4 +1,4 @@ - + @@ -16,7 +16,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -30,6 +30,10 @@ + + + + diff --git a/src/Simulation/QsharpFoundation/Random.qs b/src/Simulation/QsharpFoundation/Random.qs index 35a7239182b..c32e1fc731a 100644 --- a/src/Simulation/QsharpFoundation/Random.qs +++ b/src/Simulation/QsharpFoundation/Random.qs @@ -19,6 +19,7 @@ namespace Microsoft.Quantum.Intrinsic { /// # Output /// An integer $i$ with probability $\Pr(i) = p_i / \sum_i p_i$, where $p_i$ /// is the $i$th element of `probs`. + @Deprecated("Microsoft.Quantum.Random.DrawCategorical") operation Random (probs : Double[]) : Int { body intrinsic; } diff --git a/src/Simulation/Simulators.Tests/Circuits/Issue132.qs b/src/Simulation/Simulators.Tests/Circuits/Issue132.qs new file mode 100644 index 00000000000..9b57996913a --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/Issue132.qs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits +{ + open Microsoft.Quantum.Intrinsic; + + operation SliceGenerationTest() : Unit { + using (qs = Qubit[4]) { + PrepareCatState(qs); + if (M(qs[0]) == One) { + for (target in qs) { + X(target); + } + } + } + } + + operation PrepareCatState(register : Qubit[]) : Unit is Adj + Ctl { + H(register[0]); + for (target in register[1...]) { + CNOT(register[0], target); + } + } +} diff --git a/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs b/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs new file mode 100644 index 00000000000..59f3c17d802 --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs @@ -0,0 +1,22 @@ +// // Copyright (c) Microsoft Corporation. All rights reserved. +// // Licensed under the MIT License. + +// Will cause compilation failure if callable type references in generated C# aren't +// prepended with "global::". +namespace Issue46 { + + operation ReturnZero () : Result { + + return Zero; + } + +} + +namespace Microsoft.Quantum.Tests.Namespaces.Issue46 { + + operation TestOp () : Result { + + return Issue46.ReturnZero(); + } + +} diff --git a/src/Simulation/Simulators.Tests/Circuits/Recursion.qs b/src/Simulation/Simulators.Tests/Circuits/Recursion.qs index 7583d384a3f..f32486ecaa9 100644 --- a/src/Simulation/Simulators.Tests/Circuits/Recursion.qs +++ b/src/Simulation/Simulators.Tests/Circuits/Recursion.qs @@ -46,7 +46,7 @@ namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { return x; } else { - let fct = GenRecursionPartial(_, cnt - 1); + let fct = GenRecursionPartial<'T>(_, cnt - 1); return fct(x); } } diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs new file mode 100644 index 00000000000..5836a3426f5 --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { + + open Microsoft.Quantum.Intrinsic; + + newtype FooUDT = (String, (Qubit, Double)); + + operation FooUDTOp (foo : FooUDT) : Unit is Ctl + Adj { } + + operation Empty () : Unit is Ctl + Adj { } + + operation WrapperOp (op: (Qubit => Unit), q : Qubit) : Unit { + op(q); + Reset(q); + } + + operation HOp (q : Qubit) : Unit { + H(q); + Reset(q); + } + + operation NestedOp () : Unit { + using (q = Qubit()) { + HOp(q); + } + } + + operation TwoQubitOp (q1 : Qubit, q2 : Qubit) : Unit { + // ... + } + + operation BoolArrayOp (bits : Bool[]) : Unit { + // ... + } + +} diff --git a/src/Simulation/Simulators.Tests/CoreTests.cs b/src/Simulation/Simulators.Tests/CoreTests.cs index 185351df696..88917ff4c24 100644 --- a/src/Simulation/Simulators.Tests/CoreTests.cs +++ b/src/Simulation/Simulators.Tests/CoreTests.cs @@ -43,6 +43,20 @@ public void BasicExecution() Assert.Empty(error.ToString().Trim()); } + [Fact] + public void BasicExecutionTargetedExe() + { + var asmPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var exe = Path.Combine(asmPath, "TestTargetedExe", "TargetedExe.dll"); + + ProcessRunner.Run("dotnet", exe, out StringBuilder output, out StringBuilder error, out int exitCode, out Exception ex); + + Assert.Null(ex); + Assert.Equal(0, exitCode); + Assert.Empty(error.ToString().Trim()); + Assert.Equal("TargetedExe", output.ToString().Trim()); + } + [Fact] public void Borrowing() { diff --git a/src/Simulation/Simulators.Tests/OperationsTestHelper.cs b/src/Simulation/Simulators.Tests/OperationsTestHelper.cs index 37f0122a25c..7fa82ca1077 100644 --- a/src/Simulation/Simulators.Tests/OperationsTestHelper.cs +++ b/src/Simulation/Simulators.Tests/OperationsTestHelper.cs @@ -259,7 +259,7 @@ internal static void ctrlOnReleasedQubitTest(SimulatorBase sim, Action<(IQArray< /// internal static void ctrlOnReleasedCtrlQubitTest(SimulatorBase sim, Action<(IQArray, Qubit)> operationControlled) { - var random = new Random(); + var random = new System.Random(); ctrlTestShell(sim, operationControlled, (enabled, ctrlQs, q) => { diff --git a/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs b/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs index 59c7ae0e0d7..0cc32328fdf 100644 --- a/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs +++ b/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs @@ -31,7 +31,7 @@ public State((double, double) alpha, (double, double) beta) public partial class QuantumSimulatorTests { public const int seed = 19740212; - public static Random r = new Random(seed); + public static System.Random r = new System.Random(seed); public static double sqrt1_2 = Sqrt(1.0 / 2.0); diff --git a/src/Simulation/Simulators.Tests/QubitManagerTests.cs b/src/Simulation/Simulators.Tests/QubitManagerTests.cs index a5f2123d0f2..8ee972883a8 100644 --- a/src/Simulation/Simulators.Tests/QubitManagerTests.cs +++ b/src/Simulation/Simulators.Tests/QubitManagerTests.cs @@ -152,6 +152,91 @@ public void TestQubitManager() } } + /// + /// Test for QubitManager. + /// + [Fact] + public void TestQubitManagerDiscouragingReuse() + { + { // BLOCK testing mayExtendCapacity:false + QubitManager qm = new QubitManager(10, mayExtendCapacity: false, disableBorrowing: false, encourageReuse: false); + + // Test allocation of single qubit + Qubit q1 = qm.Allocate(); + Assert.True(q1.Id == 0); + + // Test allocation of multiple qubits + IQArray qa1 = qm.Allocate(4); + Assert.True(qa1.Length == 4); + Assert.True(qa1[0].Id == 1); + Assert.True(qa1[1].Id == 2); + Assert.True(qa1[2].Id == 3); + Assert.True(qa1[3].Id == 4); + + // Test reuse of deallocated qubits + qm.Release(qa1[1]); + + Qubit q2 = qm.Allocate(); + Assert.True(q2.Id == 5); + + IQArray qa2 = qm.Allocate(3); + Assert.True(qa2.Length == 3); + Assert.True(qa2[0].Id == 6); + Assert.True(qa2[1].Id == 7); + Assert.True(qa2[2].Id == 8); + + qm.Release(qa2); + + Qubit q3 = qm.Allocate(); + Assert.True(q3.Id == 9); + + Qubit q4 = qm.Allocate(); + Assert.True(q4.Id == 2); + + Qubit q5 = qm.Allocate(); + Assert.True(q5.Id == 8); + } + + { // BLOCK testing mayExtendCapacity:true + QubitManager qm = new QubitManager(10, mayExtendCapacity: true, disableBorrowing: false, encourageReuse: false); + + // Test allocation of single qubit + Qubit q1 = qm.Allocate(); + Assert.True(q1.Id == 0); + + // Test allocation of multiple qubits + IQArray qa1 = qm.Allocate(4); + Assert.True(qa1.Length == 4); + Assert.True(qa1[0].Id == 1); + Assert.True(qa1[1].Id == 2); + Assert.True(qa1[2].Id == 3); + Assert.True(qa1[3].Id == 4); + + // Test reuse of deallocated qubits + qm.Release(qa1[1]); + + Qubit q2 = qm.Allocate(); + Assert.True(q2.Id == 5); + + IQArray qa2 = qm.Allocate(3); + Assert.True(qa2.Length == 3); + Assert.True(qa2[0].Id == 6); + Assert.True(qa2[1].Id == 7); + Assert.True(qa2[2].Id == 8); + + qm.Release(qa2); + + Qubit q3 = qm.Allocate(); + Assert.True(q3.Id == 9); + + Qubit q4 = qm.Allocate(); + Assert.True(q4.Id == 10); + + Qubit q5 = qm.Allocate(); + Assert.True(q5.Id == 11); + } + } + /// /// Test for QubitManagerTrackingScope. /// diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs new file mode 100644 index 00000000000..2d8ee9a75cd --- /dev/null +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -0,0 +1,821 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Quantum.Simulation.Core; +using Xunit; + +namespace Microsoft.Quantum.Simulation.Simulators.Tests +{ + public class RuntimeMetadataEqualityTests + { + [Fact] + public void WrongType() + { + var a = new RuntimeMetadata { }; + var i = 5; + Assert.False(a.Equals(i)); + } + + [Fact] + public void NullEquality() + { + var a = new RuntimeMetadata { }; + RuntimeMetadata? b = null; + Assert.NotEqual(a, b); + Assert.NotEqual(b, a); + } + + [Fact] + public void CheckEquality() + { + var a = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + var b = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Label = "X"; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.Label = "H"; + + b.FormattedNonQubitArgs = "(1)"; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.FormattedNonQubitArgs = ""; + + b.IsAdjoint = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsAdjoint = false; + + b.IsControlled = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsControlled = false; + + b.IsMeasurement = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsMeasurement = false; + + b.IsComposite = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsComposite = false; + } + + [Fact] + public void ControlsEquality() + { + var a = new RuntimeMetadata() + { + Controls = new List() { }, + }; + var b = new RuntimeMetadata() + { + Controls = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Controls = new List() { new FreeQubit(1) }; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + a.Controls = new List() { new FreeQubit(1) }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + } + + [Fact] + public void TargetsEquality() + { + var a = new RuntimeMetadata() + { + Targets = new List() { }, + }; + var b = new RuntimeMetadata() + { + Targets = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Targets = new List() { new FreeQubit(1) }; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + a.Targets = new List() { new FreeQubit(1) }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + } + + [Fact] + public void ChildrenEquality() + { + var a = new RuntimeMetadata() + { + Children = new[] + { + new List(), + new List(), + }, + }; + var b = new RuntimeMetadata() + { + Children = new[] + { + new List(), + new List(), + }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + var aChildren = a.Children.ToList(); + aChildren[0] = new List() { new RuntimeMetadata() { Label = "H" } }; + a.Children = aChildren; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + var bChildren = b.Children.ToList(); + bChildren[0] = new List() { new RuntimeMetadata() { Label = "X" } }; + b.Children = bChildren; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + bChildren[0] = new List() { new RuntimeMetadata() { Label = "H" } }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Children = b.Children.SkipLast(1); + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + } + } + + public class IntrinsicTests + { + [Fact] + public void CNOT() + { + var control = new FreeQubit(1); + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((control, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void CCNOT() + { + var control1 = new FreeQubit(0); + var control2 = new FreeQubit(2); + var target = new FreeQubit(1); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((control1, control2, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control1, control2 }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void Swap() + { + var q1 = new FreeQubit(0); + var q2 = new FreeQubit(1); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((q1, q2)); + var expected = new RuntimeMetadata() + { + Label = "SWAP", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q1, q2 }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void Ry() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((2.1, target)); + var expected = new RuntimeMetadata() + { + Label = "Ry", + FormattedNonQubitArgs = "(" + 2.1 + ")", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void M() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "M", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void Reset() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "Reset", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ResetAll() + { + IQArray targets = new QArray(new[] { new FreeQubit(0) }); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(targets); + var expected = new RuntimeMetadata() + { + Label = "ResetAll", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = true, + Children = null, + Controls = new List() { }, + Targets = targets, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class MeasurementTests + { + [Fact] + public void MResetX() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetX", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void MResetY() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetY", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void MResetZ() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetZ", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class CustomCircuitTests + { + [Fact] + public void EmptyOperation() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(QVoid.Instance); + var expected = new RuntimeMetadata() + { + Label = "Empty", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void OperationAsArgument() + { + var q = new FreeQubit(0); + var opArg = new QuantumSimulator().Get(); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((opArg, q)); + var expected = new RuntimeMetadata() + { + Label = "WrapperOp", + FormattedNonQubitArgs = "(HOp)", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void NestedOperation() + { + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(QVoid.Instance); + var expected = new RuntimeMetadata() + { + Label = "NestedOp", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void DuplicateQubitArgs() + { + var q = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((q, q)); + var expected = new RuntimeMetadata() + { + Label = "TwoQubitOp", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void QArrayArgs() + { + var op = new QuantumSimulator().Get(); + IQArray bits = new QArray(new bool[] { false, true }); + var args = op.__dataIn(bits); + var expected = new RuntimeMetadata() + { + Label = "BoolArrayOp", + FormattedNonQubitArgs = "[False, True]", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class UDTTests + { + [Fact] + public void FooUDTOp() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(new Circuits.FooUDT(("bar", (target, 2.1)))); + var expected = new RuntimeMetadata() + { + Label = "FooUDTOp", + FormattedNonQubitArgs = "(\"bar\", (" + 2.1 + "))", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class ControlledOpTests + { + [Fact] + public void ControlledH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledX() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledCNOT() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit control = new FreeQubit(1); + Qubit target = new FreeQubit(2); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, (control, target))); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls.Append(control), + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledCCNOT() + { + Qubit control1 = new FreeQubit(0); + Qubit control2 = new FreeQubit(1); + Qubit control3 = new FreeQubit(2); + Qubit target = new FreeQubit(3); + IQArray controls = new QArray(new[] { control1 }); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, (control2, control3, target))); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control1, control2, control3 }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class AdjointTests + { + [Fact] + public void AdjointH() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void AdjointX() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void AdjointAdjointH() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint.Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledAdjointH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op1 = new QuantumSimulator().Get().Controlled.Adjoint; + var op2 = new QuantumSimulator().Get().Adjoint.Controlled; + var args = op1.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op1.GetRuntimeMetadata(args), expected); + Assert.Equal(op2.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledAdjointAdjointH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op1 = new QuantumSimulator().Get().Controlled.Adjoint.Adjoint; + var op2 = new QuantumSimulator().Get().Adjoint.Controlled.Adjoint; + var op3 = new QuantumSimulator().Get().Adjoint.Adjoint.Controlled; + var args = op1.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op1.GetRuntimeMetadata(args), expected); + Assert.Equal(op2.GetRuntimeMetadata(args), expected); + Assert.Equal(op3.GetRuntimeMetadata(args), expected); + } + } + + public class PartialOpTests + { + + [Fact] + public void PartialRy() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Partial((double d) => + new ValueTuple(d, target)); + var args = op.__dataIn(2.1); + var expected = new RuntimeMetadata() + { + Label = "Ry", + FormattedNonQubitArgs = "(" + 2.1 + ")", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void PartialUDT() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get>(typeof(Circuits.FooUDT)) + .Partial((double d) => (("bar", (target, d)))); + var args = new QTuple(2.1); + var expected = new RuntimeMetadata() + { + Label = "FooUDT", + FormattedNonQubitArgs = "(\"bar\", (" + 2.1 + "))", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs new file mode 100644 index 00000000000..34f140ee6b0 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs @@ -0,0 +1,679 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + operation GenericsSupport<'A, 'B, 'C>() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + SubOp2(); + } + } + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj new file mode 100644 index 00000000000..2556f1ae507 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + honeywell.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..38aa57ee876 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj new file mode 100644 index 00000000000..4fbf6b19d13 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj @@ -0,0 +1,31 @@ + + + + netcoreapp3.1 + false + true + + false + false + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs new file mode 100644 index 00000000000..ab8416de9e6 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs @@ -0,0 +1,250 @@ +namespace Microsoft.Quantum.Tests { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Canon; + open Microsoft.Quantum.Random; + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Convert; + open Microsoft.Quantum.Math; + + // Uses Welford's method to compute the mean and variance of an array + // of samples. + internal function SampleMeanAndVariance(samples : Double[]) : (Double, Double) { + mutable meanAcc = 0.0; + mutable varAcc = 0.0; + for (idx in 0..Length(samples) - 1) { + let sample = samples[idx]; + let oldMeanAcc = meanAcc; + let delta = (sample - meanAcc); + set meanAcc += delta / IntAsDouble(idx + 1); + set varAcc += delta * (sample - oldMeanAcc); + } + + return (meanAcc, varAcc / IntAsDouble(Length(samples) - 1)); + } + + internal operation EstimateMeanAndVariance(dist : ContinuousDistribution, nSamples : Int) : (Double, Double) { + mutable samples = new Double[nSamples]; + for (idx in 0..nSamples - 1) { + set samples w/= idx <- dist::Sample(); + } + return SampleMeanAndVariance(samples); + } + + internal operation CheckMeanAndVariance( + name : String, + distribution : ContinuousDistribution, + nSamples : Int, + (expectedMean : Double, expectedVariance : Double), + tolerance : Double + ) : Unit { + let (mean, variance) = EstimateMeanAndVariance( + distribution, + nSamples + ); + Fact( + expectedMean - tolerance <= mean and + mean <= expectedMean + tolerance, + $"Mean of {name} distribution should be {expectedMean}, was {mean}." + ); + Fact( + expectedVariance - tolerance <= variance and + variance <= expectedVariance + tolerance, + $"Variance of {name} distribution should be {expectedVariance}, was {variance}." + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandomdouble" obeys ranges. + @Test("QuantumSimulator") + @Test("ToffoliSimulator") + operation CheckDrawRandomDoubleObeysRanges() : Unit { + for (j in 0..10000) { + let random = DrawRandomDouble(0.0, 1.0); + if (random < 0.0 or random > 1.0) { + fail $"DrawRandomDouble(0.0, 1.0) returned {random}, outside the allowed interval."; + } + } + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandomdint" obeys ranges. + @Test("QuantumSimulator") + @Test("ToffoliSimulator") + operation CheckDrawRandomIntObeysRanges() : Unit { + let randomInt = DrawRandomInt(0, 45); + if (randomInt > 45 or randomInt < 0) { + fail $"DrawRandomInt(0, 45) returned {randomInt}, outside the allowed range."; + } + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.continuousuniformdistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckContinuousUniformDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "uniform", + ContinuousUniformDistribution(0.0, 1.0), + 1000000, + (0.5, 1.0 / 12.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.standardnormaldistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckStandardNormalDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "standard normal", + StandardNormalDistribution(), + 1000000, + (0.0, 1.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.normaldistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckNormalDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "normal(-2.0, 5.0)", + NormalDistribution(-2.0, 5.0), + 1000000, + (-2.0, 5.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandombool" has the right + /// first moment. Note that since DrawRandomBool represents a Bernoulli + /// trial, it is entirely characterized by its first moment; we don't need + /// to check variance here. + @Test("QuantumSimulator") + operation CheckDrawRandomBoolHasRightExpectation() : Unit { + // NB: DrawMany isn't available yet, since it's in the + // Microsoft.Quantum.Standard package, not QSharpCore. + let prHeads = 0.65; + let nFlips = 1000000; + let stdDev = Sqrt(IntAsDouble(nFlips) * prHeads * (1.0 - prHeads)); + let expected = IntAsDouble(nFlips) * prHeads; + let nAllowedStdDev = 4.0; + mutable nHeads = 0; + for (idx in 0..nFlips - 1) { + if (DrawRandomBool(prHeads)) { + set nHeads += 1; + } + } + + let delta = IntAsDouble(nHeads) - expected; + + Fact( + -nAllowedStdDev * stdDev <= delta and + delta <= nAllowedStdDev * stdDev, + "First moment of Bernoulli distribution was incorrect." + ); + } + + /// # Summary + /// Checks that DrawCategorical never draws elements with probability zero. + @Test("QuantumSimulator") + operation CheckImpossibleEventsAreNotDrawn() : Unit { + let distribution = CategoricalDistribution([0.5, 0.0, 0.5]); + let nTrials = 100000; + for (idxTrial in 0..nTrials - 1) { + let variate = distribution::Sample(); + Fact( + variate != 1, + "A variate of 1 was drawn from a categorical distribution, despite having a probability of 0." + ); + } + } + + // We define a couple callables to help us run continuous tests on discrete + // distributions as well. + + internal operation DrawDiscreteAsContinuous(discrete : DiscreteDistribution, delay : Unit) : Double { + return IntAsDouble(discrete::Sample()); + } + + internal function DiscreteAsContinuous(discrete : DiscreteDistribution) : ContinuousDistribution { + return ContinuousDistribution(DrawDiscreteAsContinuous(discrete, _)); + } + + @Test("QuantumSimulator") + operation CheckCategoricalMomentsAreCorrect() : Unit { + let categorical = DiscreteAsContinuous( + CategoricalDistribution([0.2, 0.5, 0.3]) + ); + let expected = 0.0 * 0.2 + 1.0 * 0.5 + 2.0 * 0.3; + let variance = PowD(0.0 - expected, 2.0) * 0.2 + + PowD(1.0 - expected, 2.0) * 0.5 + + PowD(2.0 - expected, 2.0) * 0.3; + + CheckMeanAndVariance( + "categorical([0.2, 0.5, 0.3])", + categorical, + 1000000, + (expected, variance), + 0.04 + ); + } + + @Test("QuantumSimulator") + operation CheckRescaledCategoricalMomentsAreCorrect() : Unit { + let categorical = DiscreteAsContinuous( + CategoricalDistribution([2.0, 5.0, 3.0]) + ); + let expected = 0.0 * 0.2 + 1.0 * 0.5 + 2.0 * 0.3; + let variance = PowD(0.0 - expected, 2.0) * 0.2 + + PowD(1.0 - expected, 2.0) * 0.5 + + PowD(2.0 - expected, 2.0) * 0.3; + + CheckMeanAndVariance( + "categorical([0.2, 0.5, 0.3])", + categorical, + 1000000, + (expected, variance), + 0.04 + ); + } + + @Test("QuantumSimulator") + operation CheckCategoricalHistogramIsCorrect() : Unit { + let categorical = CategoricalDistribution([0.2, 0.5, 0.3]); + mutable counts = new Int[3]; + let nSamples = 1000000; + + for (idx in 0..nSamples - 1) { + let sample = categorical::Sample(); + set counts w/= sample <- counts[sample] + 1; + } + + Fact(190000 <= counts[0] and counts[0] <= 210000, $"counts[0] was {counts[0]}, expected about 200000."); + Fact(490000 <= counts[1] and counts[1] <= 510000, $"counts[1] was {counts[1]}, expected about 500000."); + Fact(290000 <= counts[2] and counts[2] <= 310000, $"counts[2] was {counts[2]}, expected about 300000."); + } + + @Test("QuantumSimulator") + operation CheckDiscreteUniformMomentsAreCorrect() : Unit { + let (min, max) = (-3, 7); + let expected = 0.5 * (IntAsDouble(min + max)); + let variance = (1.0 / 12.0) * ( + PowD(IntAsDouble(max - min + 1), 2.0) - 1.0 + ); + CheckMeanAndVariance( + $"discrete uniform ({min}, {max})", + DiscreteAsContinuous( + DiscreteUniformDistribution(min, max) + ), + 1000000, + (expected, variance), + 0.1 + ); + } + +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj new file mode 100644 index 00000000000..c625e48ab23 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + ionq.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..f6aa40b1a84 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj index 89f9b7e7bf4..f8f5cffa07f 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 false @@ -12,9 +12,7 @@ - + diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj index 2da5c023bb3..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj index 2da5c023bb3..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs new file mode 100644 index 00000000000..26a4213a328 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs @@ -0,0 +1,679 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + operation GenericsSupport<'A, 'B, 'C>() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + SubOp2(); + } + } + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..62b81376407 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj new file mode 100644 index 00000000000..dce291568b6 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + qci.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj index 85fe87c7403..6ac84ace635 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs new file mode 100644 index 00000000000..c08b6d4188b --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs @@ -0,0 +1,16 @@ +namespace Microsoft.Quantum.Testing.Honeywell.Monomorphization { + + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Measurement; + open Microsoft.Quantum.Canon; + + @EntryPoint() + operation CallGenerics() : String { + + let arr = Default(); + using (qs = Qubit[2]) { + Ignore(Measure([PauliX, PauliX], qs)); + return "TargetedExe"; + } + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj new file mode 100644 index 00000000000..f70061d4f60 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj @@ -0,0 +1,40 @@ + + + + Exe + netcoreapp3.1 + + false + false + false + honeywell.qpu + + + + + + + + + + + + + + + + + <_ExeDir>$(MSBuildThisFileDirectory)built + + + + + + + + <_ExeFiles Include="$(OutputPath)*" /> + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs index 7d0cd650d94..8e5d87f77a8 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs @@ -1,16 +1,16 @@ -// Used for a unit test; -// do not change the name of this namespace! -namespace Microsoft.Quantum.Library { - - open Microsoft.Quantum.Intrinsic; - - // Used for a unit test; - // do not change the name or namespace of this type! - newtype Token = Unit; - - // Used for a unit test; - // do not change the name or namespace of this callable! - operation Hello(dummy : Token) : Unit { - Message("Hello!"); - } -} +// Used for a unit test; +// do not change the name of this namespace! +namespace Microsoft.Quantum.Library { + + open Microsoft.Quantum.Intrinsic; + + // Used for a unit test; + // do not change the name or namespace of this type! + newtype Token = Unit; + + // Used for a unit test; + // do not change the name or namespace of this callable! + operation Hello(dummy : Token) : Unit { + Message("Hello!"); + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs new file mode 100644 index 00000000000..5325dca658a --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests; + open Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BranchOnMeasurementTest() : Unit { + BranchOnMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BasicLiftTest() : Unit { + BasicLift(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftLoopsTest() : Unit { + LiftLoops(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSingleNonCallTest() : Unit { + LiftSingleNonCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSelfContainedMutableTest() : Unit { + LiftSelfContainedMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { + ArgumentsPartiallyResolveTypeParameters(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftFunctorApplicationTest() : Unit { + LiftFunctorApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftPartialApplicationTest() : Unit { + LiftPartialApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftArrayItemCallTest() : Unit { + LiftArrayItemCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftOneNotBothTest() : Unit { + LiftOneNotBoth(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroTest() : Unit { + ApplyIfZero_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneTest() : Unit { + ApplyIfOne_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroElseOneTest() : Unit { + ApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneElseZeroTest() : Unit { + ApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfElifTest() : Unit { + IfElif(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AndConditionTest() : Unit { + AndCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation OrConditionTest() : Unit { + OrCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyTest() : Unit { + ApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyWithNoOpTest() : Unit { + ApplyConditionallyWithNoOp(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyConditionallyTest() : Unit { + InequalityWithApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneElseZeroTest() : Unit { + InequalityWithApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroElseOneTest() : Unit { + InequalityWithApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneTest() : Unit { + InequalityWithApplyIfOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroTest() : Unit { + InequalityWithApplyIfZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiteralOnTheLeftTest() : Unit { + LiteralOnTheLeft(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation GenericsSupportTest() : Unit { + GenericsSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation WithinBlockSupportTest() : Unit { + WithinBlockSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportProvidedTest() : Unit { + AdjointSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportSelfTest() : Unit { + AdjointSupportSelf(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportInvertTest() : Unit { + AdjointSupportInvert(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportProvidedTest() : Unit { + ControlledSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportDistributeTest() : Unit { + ControlledSupportDistribute(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { + ControlledAdjointSupportProvided_ProvidedBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { + ControlledAdjointSupportProvided_ProvidedControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { + ControlledAdjointSupportDistribute_DistributeBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { + ControlledAdjointSupportDistribute_DistributeControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { + ControlledAdjointSupportInvert_InvertBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { + ControlledAdjointSupportInvert_InvertAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { + ControlledAdjointSupportInvert_InvertControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { + ControlledAdjointSupportInvert_InvertAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { + ControlledAdjointSupportSelf_SelfBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { + ControlledAdjointSupportSelf_SelfControlled(); + } + +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs new file mode 100644 index 00000000000..46ae721dce1 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs new file mode 100644 index 00000000000..8585758f894 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests; + open Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BranchOnMeasurementTest() : Unit { + BranchOnMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BasicLiftTest() : Unit { + BasicLift(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftLoopsTest() : Unit { + LiftLoops(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSingleNonCallTest() : Unit { + LiftSingleNonCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSelfContainedMutableTest() : Unit { + LiftSelfContainedMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { + ArgumentsPartiallyResolveTypeParameters(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftFunctorApplicationTest() : Unit { + LiftFunctorApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftPartialApplicationTest() : Unit { + LiftPartialApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftArrayItemCallTest() : Unit { + LiftArrayItemCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftOneNotBothTest() : Unit { + LiftOneNotBoth(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroTest() : Unit { + ApplyIfZero_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneTest() : Unit { + ApplyIfOne_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroElseOneTest() : Unit { + ApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneElseZeroTest() : Unit { + ApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfElifTest() : Unit { + IfElif(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AndConditionTest() : Unit { + AndCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation OrConditionTest() : Unit { + OrCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyTest() : Unit { + ApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyWithNoOpTest() : Unit { + ApplyConditionallyWithNoOp(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyConditionallyTest() : Unit { + InequalityWithApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneElseZeroTest() : Unit { + InequalityWithApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroElseOneTest() : Unit { + InequalityWithApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneTest() : Unit { + InequalityWithApplyIfOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroTest() : Unit { + InequalityWithApplyIfZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiteralOnTheLeftTest() : Unit { + LiteralOnTheLeft(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation GenericsSupportTest() : Unit { + GenericsSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation WithinBlockSupportTest() : Unit { + WithinBlockSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportProvidedTest() : Unit { + AdjointSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportSelfTest() : Unit { + AdjointSupportSelf(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportInvertTest() : Unit { + AdjointSupportInvert(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportProvidedTest() : Unit { + ControlledSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportDistributeTest() : Unit { + ControlledSupportDistribute(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { + ControlledAdjointSupportProvided_ProvidedBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { + ControlledAdjointSupportProvided_ProvidedControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { + ControlledAdjointSupportDistribute_DistributeBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { + ControlledAdjointSupportDistribute_DistributeControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { + ControlledAdjointSupportInvert_InvertBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { + ControlledAdjointSupportInvert_InvertAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { + ControlledAdjointSupportInvert_InvertControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { + ControlledAdjointSupportInvert_InvertAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { + ControlledAdjointSupportSelf_SelfBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { + ControlledAdjointSupportSelf_SelfControlled(); + } + +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index 5057578a2a9..ee89aad55fd 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -16,6 +16,9 @@ + + + diff --git a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj index ab4bbc9e837..01ba825325e 100644 --- a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + @@ -23,6 +23,9 @@ false + + false + @@ -38,12 +41,16 @@ <_ExeDir>$(MSBuildThisFileDirectory)TestProjects\QsharpExe\built\ + <_TargetedExeDir>$(MSBuildThisFileDirectory)TestProjects\TargetedExe\built\ <_ExeFiles Include="$(_ExeDir)*" /> + <_TargetedExeFiles Include="$(_TargetedExeDir)*" /> - + + + diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs new file mode 100644 index 00000000000..2707ca2b150 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Microsoft.Quantum.Simulation.Core; +using Xunit; + +namespace Microsoft.Quantum.Simulation.Simulators.Tests +{ + public class ApplyData : IApplyData + { + public T Data; + + public ApplyData(T data) + { + this.Data = data; + } + + object IApplyData.Value => this.Data; + + IEnumerable IApplyData.Qubits => QubitsExtractor.Get(typeof(T))?.Extract(Data); + } + + public class GetNonQubitArgumentsAsStringTests + { + [Fact] + public void BasicTypes() + { + Assert.Equal("3", 3.GetNonQubitArgumentsAsString()); + Assert.Equal("False", false.GetNonQubitArgumentsAsString()); + Assert.Equal("\"Foo\"", "Foo".GetNonQubitArgumentsAsString()); + Assert.Equal("\"\"", "".GetNonQubitArgumentsAsString()); + } + + [Fact] + public void OperationTypes() + { + var op = new QuantumSimulator().Get(); + Assert.Equal("H", op.GetNonQubitArgumentsAsString()); + + var op2 = new QuantumSimulator().Get(); + Assert.Equal("CNOT", op2.GetNonQubitArgumentsAsString()); + } + + [Fact] + public void QubitTypes() + { + var q = new FreeQubit(0); + Assert.Null(q.GetNonQubitArgumentsAsString()); + + var qs = new QArray(new[] { new FreeQubit(0) }); + Assert.Null(qs.GetNonQubitArgumentsAsString()); + + qs = new QArray(new[] { new FreeQubit(0), new FreeQubit(1) }); + Assert.Null(qs.GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple(q); + Assert.Null(qtuple.GetNonQubitArgumentsAsString()); + } + + [Fact] + public void TupleTypes() + { + Assert.Equal("(1, 2)", (1, 2).GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", \"bar\")", ("foo", "bar").GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", \"bar\", \"\")", ("foo", "bar", "").GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", (\"bar\", \"car\"))", ("foo", ("bar", "car")).GetNonQubitArgumentsAsString()); + Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", (("foo", new FreeQubit(0)), ("bar", "car")).GetNonQubitArgumentsAsString()); + + var op = new QuantumSimulator().Get(); + var opTuple = new QTuple<(ICallable, string)>((op, "foo")); + Assert.Equal("(H, \"foo\")", opTuple.GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple<(Qubit, string)>((new FreeQubit(0), "foo")); + Assert.Equal("(\"foo\")", qtuple.GetNonQubitArgumentsAsString()); + } + + [Fact] + public void ArrayTypes() + { + Assert.Equal("[1, 2, 3]", new[] { 1, 2, 3 }.GetNonQubitArgumentsAsString()); + Assert.Equal("[\"foo\", \"bar\"]", new[] { "foo", "bar" }.GetNonQubitArgumentsAsString()); + + var opArr = new ICallable[] { + new QuantumSimulator().Get(), + new QuantumSimulator().Get(), + new QuantumSimulator().Get(), + }; + Assert.Equal("[H, CNOT, Ry]", opArr.GetNonQubitArgumentsAsString()); + + var qTupleArr = new[] { + (new FreeQubit(0), "foo"), + (new FreeQubit(1), "bar"), + }; + Assert.Equal("[(\"foo\"), (\"bar\")]", qTupleArr.GetNonQubitArgumentsAsString()); + + var qArrayBool = new QArray(new[] { false, true }); + Assert.Equal("[False, True]", qArrayBool.GetNonQubitArgumentsAsString()); + } + + [Fact] + public void IApplyDataTypes() + { + IApplyData data; + data = new ApplyData(3); + Assert.Equal("3", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData(false); + Assert.Equal("False", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData("Foo"); + Assert.Equal("\"Foo\"", data.GetNonQubitArgumentsAsString()); + + var op = new QuantumSimulator().Get(); + data = new ApplyData(op); + Assert.Equal("H", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData>((1, "foo")); + Assert.Equal("(1, \"foo\")", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData, ValueTuple>>((("foo", new FreeQubit(0)), ("bar", "car"))); + Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData(new[] { 1, 2, 3 }); + Assert.Equal("[1, 2, 3]", data.GetNonQubitArgumentsAsString()); + + var arr = new[] { + (new FreeQubit(0), "foo"), + (new FreeQubit(1), "bar"), + }; + data = new ApplyData<(FreeQubit, string)[]>(arr); + Assert.Equal("[(\"foo\"), (\"bar\")]", data.GetNonQubitArgumentsAsString()); + + var qtupleWithString = new QTuple<(Qubit, string)>((new FreeQubit(0), "foo")); + data = new ApplyData>(qtupleWithString); + Assert.Equal("(\"foo\")", data.GetNonQubitArgumentsAsString()); + + var q = new FreeQubit(0); + data = new ApplyData(q); + Assert.Null(data.GetNonQubitArgumentsAsString()); + + var qs = new QArray(new[] { new FreeQubit(0), new FreeQubit(1) }); + data = new ApplyData>(qs); + Assert.Null(data.GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple(q); + data = new ApplyData>(qtuple); + Assert.Null(data.GetNonQubitArgumentsAsString()); + } + } +} diff --git a/src/Simulation/Simulators/FindNuspecReferences.ps1 b/src/Simulation/Simulators/FindNuspecReferences.ps1 index a1fd46b8f2b..993f4b0948e 100644 --- a/src/Simulation/Simulators/FindNuspecReferences.ps1 +++ b/src/Simulation/Simulators/FindNuspecReferences.ps1 @@ -19,7 +19,7 @@ # nuget is tracking this problem at: https://github.com/NuGet/Home/issues/4491 ######################################## -$target = "Microsoft.Quantum.Simulators.nuspec" +$target = Join-Path $PSScriptRoot "Microsoft.Quantum.Simulators.nuspec" if (Test-Path $target) { Write-Host "$target exists. Skipping generating new one." @@ -28,7 +28,7 @@ if (Test-Path $target) { # Start with the nuspec template -$nuspec = [xml](Get-Content "Microsoft.Quantum.Simulators.nuspec.template") +$nuspec = [xml](Get-Content (Join-Path $PSScriptRoot "Microsoft.Quantum.Simulators.nuspec.template")) $dep = $nuspec.CreateElement('dependencies', $nuspec.package.metadata.NamespaceURI) function Add-PackageReferenceIfNew($ref) diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 8229c9e9bc7..794bb15909b 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + @@ -23,5 +23,23 @@ - + + + + runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\osx-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\linux-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template index 756eaca2e6b..a6b1ee3819e 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template @@ -1,5 +1,5 @@ - + Microsoft.Quantum.Simulators $version$ @@ -8,7 +8,7 @@ QuantumEngineering, Microsoft MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Classical simulators of quantum computers for the Q# programming language. See: https://docs.microsoft.com/en-us/quantum/relnotes/ @@ -17,16 +17,15 @@ - - - - - + + + + diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs deleted file mode 100644 index 04b7b85ab33..00000000000 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Circuits -{ - open Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementation; - - // Private helper operations. - operation ApplyIfElseIntrinsic(measurementResult : Result, onResultZeroOp : (Unit => Unit) , onResultOneOp : (Unit => Unit)) : Unit { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - } - - operation ApplyIfElseIntrinsicA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Adj) , onResultOneOp : (Unit => Unit is Adj)) : Unit is Adj { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - adjoint (...) { - Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); - } - } - - operation ApplyIfElseIntrinsicC(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl) , onResultOneOp : (Unit => Unit is Ctl)) : Unit is Ctl { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled (ctrls, ...) { - Interface_ApplyIfElseC(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } - } - - operation ApplyIfElseIntrinsicCA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl + Adj) , onResultOneOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - adjoint (...) { - Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled (ctrls, ...) { - Interface_ApplyIfElseC(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled adjoint (ctrls, ...) { - Interface_ApplyIfElseCA(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } - } - - - // Private helper operations. - operation ApplyConditionallyIntrinsic(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit) , onNonEqualOp : (Unit => Unit)) : Unit { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - } - - operation ApplyConditionallyIntrinsicA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Adj) , onNonEqualOp : (Unit => Unit is Adj)) : Unit is Adj { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - adjoint (...) { - Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - } - - operation ApplyConditionallyIntrinsicC(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl) , onNonEqualOp : (Unit => Unit is Ctl)) : Unit is Ctl { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled (ctrls, ...) { - Interface_ApplyConditionallyC(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - } - - operation ApplyConditionallyIntrinsicCA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl + Adj) , onNonEqualOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - adjoint (...) { - Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled (ctrls, ...) { - Interface_ApplyConditionallyC(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled adjoint (ctrls, ...) { - Interface_ApplyConditionallyCA(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - } - -} diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs index b33effcbbe1..158dd4dabf6 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs +++ b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs @@ -78,70 +78,4 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati body intrinsic; } - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// - operation Interface_ApplyIfElse (measurementResult : Result, onResultZeroOp : (Unit => Unit) , onResultOneOp : (Unit => Unit)) : Unit { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be adjointable. - /// - operation Interface_ApplyIfElseA (measurementResult : Result, onResultZeroOp : (Unit => Unit is Adj) , onResultOneOp : (Unit => Unit is Adj)) : Unit { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be controllable. - /// - operation Interface_ApplyIfElseC (ctrls : Qubit[], measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl) , onResultOneOp : (Unit => Unit is Ctl)) : Unit { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be controllable and adjointable. - /// - operation Interface_ApplyIfElseCA (ctrls : Qubit[], measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl + Adj) , onResultOneOp : (Unit => Unit is Ctl + Adj)) : Unit { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// - operation Interface_ApplyConditionally (measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit) , onNonEqualOp : (Unit => Unit)) : Unit { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be adjointable. - /// - operation Interface_ApplyConditionallyA (measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Adj) , onNonEqualOp : (Unit => Unit is Adj)) : Unit { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be controllable. - /// - operation Interface_ApplyConditionallyC (ctrls : Qubit[], measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl) , onNonEqualOp : (Unit => Unit is Ctl)) : Unit { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be controllable and adjointable. - /// - operation Interface_ApplyConditionallyCA (ctrls : Qubit[], measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl + Adj) , onNonEqualOp : (Unit => Unit is Ctl + Adj)) : Unit { - body intrinsic; - } - } diff --git a/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs b/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs index f3beba01330..b8a4c79c1d8 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs @@ -74,19 +74,5 @@ public static partial class Extensions { return InterfaceType(t, typeof(IControllable<>)); } - - internal static IEnumerable SelectAggregates( - this IEnumerable source, - Func aggregate, - TResult initial = default - ) - { - var acc = initial; - foreach (var element in source) - { - acc = aggregate(acc, element); - yield return acc; - } - } } } \ No newline at end of file diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs index df7d799a8f1..e208131c2a1 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs @@ -114,7 +114,7 @@ private static OperationFunctor AdjustForNoControls(OperationFunctor type, IQArr #region ApplyIfElse - public class TracerApplyIfElse : Interface_ApplyIfElse + public class TracerApplyIfElse : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsic { private QCTraceSimulatorImpl tracerCore { get; } @@ -130,7 +130,7 @@ public TracerApplyIfElse(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyIfElseA : Interface_ApplyIfElseA + public class TracerApplyIfElseA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicA { private QCTraceSimulatorImpl tracerCore { get; } @@ -140,13 +140,19 @@ public TracerApplyIfElseA(QCTraceSimulatorImpl m) : base(m) } public override Func<(Result, IAdjointable, IAdjointable), QVoid> Body => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(Result, IAdjointable, IAdjointable), QVoid> AdjointBody => (q) => { (Result measurementResult, ICallable onZero, ICallable onOne) = q; return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Adjoint, null); }; } - public class TracerApplyIfElseC : Interface_ApplyIfElseC + public class TracerApplyIfElseC : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicC { private QCTraceSimulatorImpl tracerCore { get; } @@ -155,15 +161,21 @@ public TracerApplyIfElseC(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, Result, IControllable, IControllable), QVoid> Body => (q) => + public override Func<(Result, IControllable, IControllable), QVoid> Body => (q) => { - (IQArray ctrls, Result measurementResult, ICallable onZero, ICallable onOne) = q; + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, (Result, IControllable, IControllable)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); }; } - public class TracerApplyIfElseCA : Interface_ApplyIfElseCA + public class TracerApplyIfElseCA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicCA { private QCTraceSimulatorImpl tracerCore { get; } @@ -172,9 +184,28 @@ public TracerApplyIfElseCA(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, Result, IUnitary, IUnitary), QVoid> Body => (q) => + public override Func<(Result, IUnitary, IUnitary), QVoid> Body => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(Result, IUnitary, IUnitary), QVoid> AdjointBody => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Adjoint, null); + }; + + public override Func<(IQArray, (Result, IUnitary, IUnitary)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; + OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); + return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); + }; + + public override Func<(IQArray, (Result, IUnitary, IUnitary)), QVoid> ControlledAdjointBody => (q) => { - (IQArray ctrls, Result measurementResult, ICallable onZero, ICallable onOne) = q; + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.ControlledAdjoint, ctrls); return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); }; @@ -184,7 +215,7 @@ public TracerApplyIfElseCA(QCTraceSimulatorImpl m) : base(m) #region ApplyConditionally - public class TracerApplyConditionally : Interface_ApplyConditionally + public class TracerApplyConditionally : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsic { private QCTraceSimulatorImpl tracerCore { get; } @@ -200,7 +231,7 @@ public TracerApplyConditionally(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyConditionallyA : Interface_ApplyConditionallyA + public class TracerApplyConditionallyA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicA { private QCTraceSimulatorImpl tracerCore { get; } @@ -210,13 +241,19 @@ public TracerApplyConditionallyA(QCTraceSimulatorImpl m) : base(m) } public override Func<(IQArray, IQArray, IAdjointable, IAdjointable), QVoid> Body => (q) => + { + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, IQArray, IAdjointable, IAdjointable), QVoid> AdjointBody => (q) => { (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Adjoint, null); }; } - public class TracerApplyConditionallyC : Interface_ApplyConditionallyC + public class TracerApplyConditionallyC : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicC { private QCTraceSimulatorImpl tracerCore { get; } @@ -225,15 +262,21 @@ public TracerApplyConditionallyC(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, IQArray, IQArray, IControllable, IControllable), QVoid> Body => (q) => + public override Func<(IQArray, IQArray, IControllable, IControllable), QVoid> Body => (q) => { - (IQArray ctrls, IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, (IQArray, IQArray, IControllable, IControllable)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); }; } - public class TracerApplyConditionallyCA : Interface_ApplyConditionallyCA + public class TracerApplyConditionallyCA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicCA { private QCTraceSimulatorImpl tracerCore { get; } @@ -242,12 +285,31 @@ public TracerApplyConditionallyCA(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, IQArray, IQArray, IUnitary, IUnitary), QVoid> Body => (q) => + public override Func<(IQArray, IQArray, IUnitary, IUnitary), QVoid> Body => (q) => { - (IQArray ctrls, IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, IQArray, IUnitary, IUnitary), QVoid> AdjointBody => (q) => + { + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Adjoint, null); + }; + + public override Func<(IQArray, (IQArray, IQArray, IUnitary, IUnitary)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); }; + + public override Func<(IQArray, (IQArray, IQArray, IUnitary, IUnitary)), QVoid> ControlledAdjointBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; + OperationFunctor type = AdjustForNoControls(OperationFunctor.ControlledAdjoint, ctrls); + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); + }; } #endregion diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs index 1fea9dbfeea..14523f44531 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; using System; @@ -18,7 +19,7 @@ public TracerRandom(QCTraceSimulatorImpl m) : base(m) public override Func, Int64> Body => (p) => { - return SimulatorsUtils.SampleDistribution(p, core.random.NextDouble()); + return CommonUtils.SampleDistribution(p, core.RandomGenerator.NextDouble()); }; } } diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs index 53088993426..c3bd7f2de57 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs @@ -19,8 +19,6 @@ public partial class QCTraceSimulatorImpl : SimulatorBase protected readonly QCTraceSimulatorConfiguration configuration; private readonly QCTraceSimulatorCore tracingCore; private readonly double[] gateTimes; - - private readonly Random random = new Random(DateTime.Now.Millisecond); protected readonly QCTraceSimulatorCoreConfiguration tCoreConfig; private Dictionary primitiveOperationsIdToNames = diff --git a/src/Simulation/Simulators/QCTraceSimulator/Utils.cs b/src/Simulation/Simulators/QCTraceSimulator/Utils.cs index 9f991e7ed0c..ddeac1ab574 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Utils.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/Utils.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime; @@ -199,53 +200,4 @@ public static class MetricsCountersNames /// public const string widthCounter = nameof(WidthCounter); } - - static class SimulatorsUtils - { - /// - /// Takes an array of doubles as - /// input, and returns a randomly-selected index into the array - /// as an `Int`. The probability of selecting a specific index - /// is proportional to the value of the array element at that index. - /// Array elements that are equal to zero are ignored and their indices - /// are never returned.If any array element is less than zero, or if - /// no array element is greater than zero, then the operation fails. - /// As a source of randomness uses a number uniformly distributed between 0 and 1. - /// Used for Quantum.Intrinsic.Random - /// - /// Number between Zero and one, uniformly distributed - public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) - { - if (unnormalizedDistribution.Any(prob => prob < 0.0)) - { - throw new ExecutionFailException("Random expects array of non-negative doubles."); - } - - var total = unnormalizedDistribution.Sum(); - if (total == 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); - } - - var sample = uniformZeroOneSample * total; - - return unnormalizedDistribution - // Get the unnormalized CDF of the distribution. - .SelectAggregates((double acc, double x) => acc + x) - // Look for the first index at which the CDF is bigger - // than the random sample of 𝑈(0, 1) that we were given - // as a parameter. - .Select((cumulativeProb, idx) => (cumulativeProb, idx)) - .Where(item => item.cumulativeProb >= sample) - // Cast that index to long, and default to returning - // the last item. - .Select( - item => (long)item.idx - ) - .DefaultIfEmpty( - unnormalizedDistribution.Length - 1 - ) - .First(); - } - } } diff --git a/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs b/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs index fa530a28316..c941ec7e133 100644 --- a/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs +++ b/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs @@ -12,10 +12,6 @@ namespace Microsoft.Quantum.Simulation.QuantumProcessor public partial class QuantumProcessorDispatcher : SimulatorBase { private const int PreallocatedQubitCount = 256; - /// - /// Random number generator used for Microsoft.Quantum.Intrinsic.Random - /// - public readonly System.Random random; public override string Name => "QuantumProcessorDispatcher"; @@ -35,9 +31,14 @@ public IQuantumProcessor QuantumProcessor /// An instance of a class implementing interface. If the parameter is null is used. /// A seed to be used by Q# Microsoft.Quantum.Intrinsic.Random operation. public QuantumProcessorDispatcher(IQuantumProcessor? quantumProcessor = null, IQubitManager? qubitManager = null, int? randomSeed = null) - : base(qubitManager ?? new QubitManagerTrackingScope(PreallocatedQubitCount, mayExtendCapacity:true, disableBorrowing:false)) + : base( + qubitManager ?? new QubitManagerTrackingScope( + PreallocatedQubitCount, + mayExtendCapacity: true, disableBorrowing: false + ), + randomSeed + ) { - random = new System.Random(randomSeed == null ? DateTime.Now.Millisecond : randomSeed.Value); QuantumProcessor = quantumProcessor ?? new QuantumProcessorBase(); OnOperationStart += QuantumProcessor.OnOperationStart; OnOperationEnd += QuantumProcessor.OnOperationEnd; diff --git a/src/Simulation/Simulators/QuantumProcessor/random.cs b/src/Simulation/Simulators/QuantumProcessor/random.cs index d9c51cfa202..4badfd98802 100644 --- a/src/Simulation/Simulators/QuantumProcessor/random.cs +++ b/src/Simulation/Simulators/QuantumProcessor/random.cs @@ -3,41 +3,13 @@ using Microsoft.Quantum.Simulation.Core; using System; +using System.Linq; +using Microsoft.Quantum.Simulation.Common; namespace Microsoft.Quantum.Simulation.QuantumProcessor { public partial class QuantumProcessorDispatcher { - public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) - { - double total = 0.0; - foreach (double prob in unnormalizedDistribution) - { - if (prob < 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles."); - } - total += prob; - } - - if (total == 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); - } - - double sample = uniformZeroOneSample * total; - double sum = unnormalizedDistribution[0]; - for (int i = 0; i < unnormalizedDistribution.Length - 1; ++i) - { - if (sum >= sample) - { - return i; - } - sum += unnormalizedDistribution[i]; - } - return unnormalizedDistribution.Length; - } - public class QuantumProcessorDispatcherRandom : Quantum.Intrinsic.Random { private QuantumProcessorDispatcher Simulator { get; } @@ -48,7 +20,7 @@ public QuantumProcessorDispatcherRandom(QuantumProcessorDispatcher m) : base(m) public override Func, Int64> Body => (p) => { - return SampleDistribution(p, Simulator.random.NextDouble()); + return CommonUtils.SampleDistribution(p, Simulator.RandomGenerator.NextDouble()); }; } } diff --git a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs index e073a4ac39b..a4f7bf96ece 100644 --- a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs +++ b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs @@ -31,8 +31,6 @@ public partial class QuantumSimulator : SimulatorBase, IDisposable [DllImport(QSIM_DLL_NAME, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl, EntryPoint = "seed")] private static extern void SetSeed(uint id, UInt32 seedValue); - public uint Seed{ get; private set; } - /// /// Creates a an instance of a quantum simulator. /// @@ -43,14 +41,15 @@ public QuantumSimulator( bool throwOnReleasingQubitsNotInZeroState = true, UInt32? randomNumberGeneratorSeed = null, bool disableBorrowing = false) - : base(new QSimQubitManager(throwOnReleasingQubitsNotInZeroState, disableBorrowing : disableBorrowing)) + : base( + new QSimQubitManager(throwOnReleasingQubitsNotInZeroState, disableBorrowing : disableBorrowing), + (int?)randomNumberGeneratorSeed + ) { - Seed = (randomNumberGeneratorSeed.HasValue) - ? randomNumberGeneratorSeed.Value - : (uint)Guid.NewGuid().GetHashCode(); - Id = Init(); - SetSeed(this.Id, this.Seed); + // Make sure that the same seed used by the built-in System.Random + // instance is also used by the native simulator itself. + SetSeed(this.Id, (uint)this.Seed); ((QSimQubitManager)QubitManager).Init(Id); } diff --git a/src/Simulation/Simulators/ToffoliSimulator/Random.cs b/src/Simulation/Simulators/ToffoliSimulator/Random.cs index 1d9d4a3520d..aa64984ec4e 100644 --- a/src/Simulation/Simulators/ToffoliSimulator/Random.cs +++ b/src/Simulation/Simulators/ToffoliSimulator/Random.cs @@ -3,6 +3,7 @@ using System; using System.Linq; +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators @@ -12,9 +13,9 @@ public partial class ToffoliSimulator /// /// Implementation of the Random operation for the Toffoli simulator. /// - public class ToffSimRandom : Quantum.Intrinsic.Random + public class ToffSimRandom : Microsoft.Quantum.Intrinsic.Random { - Random random = new Random(); + private ToffoliSimulator Simulator; /// /// Constructs a new operation instance. @@ -22,36 +23,14 @@ public class ToffSimRandom : Quantum.Intrinsic.Random /// The simulator that this operation affects. public ToffSimRandom(ToffoliSimulator m) : base(m) { + Simulator = m; } /// /// The implementation of the operation. /// public override Func, Int64> Body => (probs) => - { - if (probs.Any(d => d < 0.0)) - { - throw new ArgumentOutOfRangeException("probs", "All probabilities must be greater than or equal to zero"); - } - var sum = probs.Sum(); - if (sum <= 0.0) - { - throw new ArgumentOutOfRangeException("probs", "At least one probability must be greater than zero"); - } - - var threshhold = random.NextDouble() * sum; - for (int i = 0; i < probs.Length; i++) - { - threshhold -= probs[i]; - if (threshhold <= 0.0) - { - return i; - } - } - - // This line should never be reached. - return probs.Length - 1; - }; + CommonUtils.SampleDistribution(probs, Simulator.RandomGenerator.NextDouble()); } } } diff --git a/src/Xunit/Microsoft.Quantum.Xunit.nuspec b/src/Xunit/Microsoft.Quantum.Xunit.nuspec index c62307ef375..19e612afdfc 100644 --- a/src/Xunit/Microsoft.Quantum.Xunit.nuspec +++ b/src/Xunit/Microsoft.Quantum.Xunit.nuspec @@ -1,5 +1,5 @@ - + $id$ $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Library for testing Q# programs and algorithms using the xUnit framework. @@ -25,4 +25,8 @@ + + + + \ No newline at end of file