This repo contains sample circuits and programs along with QIR for testing of QIR based tooling.
Qiskit based test circuits should have unique names that are valid file/directory names.
python/srcadaptive_cirquits.pycontains test cases leveraging conditions based on measurement results. Test cases should returnGenerator[QuantumCircuit, Any, Any]for circuits.circuits.pycontains test circuits.gates.pycontains gate definitions which are transpiled to the target gate set along with their controlled, power, and inverse. Test cases should returnList[QuantumCircuit]and callgenerate_circuitswith the appropriate parameters for creating their variations.
The python/artifacts directory contains a folder per test case
(e.g. duplicate_conditions, hidden_shift). Within each test case's
directory is a folder for each execution target profile (e.g. target_4bf9,
target_7ee0). Finally, within each execution target, there is a folder for
each execution profile supported for that target (e.g. AdaptiveExecution).
Each test case/target/profile combination includes:
- Input of either
- QIR source
src_ir.lland bitcodesrc_qir.bcfiles representing the test case generation_error.txtwhen the test case cannot be generate valid QIR for the chosen provider/profile
- QIR source
- An OpenQASM
circuit.qasmrepresenting the test cases circuit. This file may not exist as OpenQASM cannot represent all test cases. - QIR output of either
- QIR source
targeted_ir.lland bitcodetargeted_qirfiles with the provider/profile targeted QIR. qir_processing_error.txtcontaining the validation or transformation errors associated with the targeting of the QIR.
- QIR source
- Simulation output of either
hist.txtcontaining a sample histogram from simulating the circuit.simulation_error.txtcontaining the simulation errors encountered when running the circuit.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.