Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenQASM Local Simulator and OpenQASM default IR #418

Merged
merged 49 commits into from
Aug 5, 2022
Merged

Conversation

ajberdy
Copy link
Contributor

@ajberdy ajberdy commented Aug 2, 2022

Issue #, if available:

#328

Description of changes:

  • Support OpenQASM simulation with the LocalSimulator 🚀
  • Switch default IR to OpenQASM

Testing done:

Unit/integ

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

kshitijc and others added 30 commits April 13, 2022 16:03
* feature: support openQASM serialization of ry gate
* feature: support openQASM serialization of I-gate
* feature: support openQASM serialization of H gate
feature: support openQASM serialization of y gate
feature: support openQASM serialization of rz gate
feature: implement openqasm function generation for z-gate
Co-authored-by: Kira Fox <Littlelime21@Kiras-MacBook-Pro.local>
feature: support openQASM serialization of v gate
Feature: Implemented openQASM serialization of CZ-gate
* feature: support openQASM serialization of H gate

* feature: support openQASM serialization of h gate

* feature: support openQASM serialization of v gate

* feature: support openQASM serialization of – gate

* feature: support openQASM serialization of t gate
* feature: support openQASM serialization of y gate

* feature: support openQASM serialization of y gate

* feature: support openQASM serialization of zz gate

* remove test.py file

Co-authored-by: Megha Shenoy <msheno3@uic.edu>
* feature: support openQASM serialization of ry gate

* commit on ry-gate, used linters to fix issues with Python Packages

* feature: support openQASM serialization of I-gate

* feature: resolved some issues from improper capitalization in I gate and ran more tests to verify results

* Update test_gates.py

* Update test_gates.py

* feature: Implemented openQASM serialization of iSwap-gate

* fix: removed blank lines
feature: support openQASM serialization of vi gate
feature: support openQASM serialization of cv gate
feature: implemented openQASM serialization of ECR-gate
feature: support openQASM serialization of xx gate
Feature: Implemented openQASM serialization of CSwap-gate
feature: support openQASM serialization of yy-gate
feature: support openQASM serialization of xy gate
feature: support openQASM serialization of swap gate
 Feature: Implement openQASM serialization of CPhaseShift01-gate
Feature: Implemented openQASM serialization of CPhaseShift-gate
Feature: Implemented openQASM serialization of CPhaseShift00-gate
Sync latest changes from main
@ajberdy ajberdy requested a review from a team as a code owner August 2, 2022 22:47
@ajberdy ajberdy changed the title Feature/openqasm OpenQASM Local Simulator and OpenQASM default IR Aug 2, 2022
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #418 (9ae7e1c) into main (bdd19ac) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              main      #418    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           83        84     +1     
  Lines         5462      5829   +367     
  Branches       768       822    +54     
==========================================
+ Hits          5462      5829   +367     
Impacted Files Coverage Δ
src/braket/aws/aws_quantum_task.py 100.00% <100.00%> (ø)
src/braket/circuits/circuit.py 100.00% <100.00%> (ø)
src/braket/circuits/compiler_directive.py 100.00% <100.00%> (ø)
src/braket/circuits/compiler_directives.py 100.00% <100.00%> (ø)
src/braket/circuits/gate.py 100.00% <100.00%> (ø)
src/braket/circuits/gates.py 100.00% <100.00%> (ø)
src/braket/circuits/instruction.py 100.00% <100.00%> (ø)
src/braket/circuits/noise.py 100.00% <100.00%> (ø)
src/braket/circuits/noises.py 100.00% <100.00%> (ø)
src/braket/circuits/observable.py 100.00% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

examples/job.py Outdated Show resolved Hide resolved
examples/bell.py Outdated Show resolved Hide resolved
@ajberdy ajberdy requested a review from speller26 August 4, 2022 17:15
speller26
speller26 previously approved these changes Aug 4, 2022
speller26
speller26 previously approved these changes Aug 4, 2022
@ajberdy
Copy link
Contributor Author

ajberdy commented Aug 4, 2022

Docs didn't find the new simulator release and can't be retired. Doc string change incoming to retry tests

@ajberdy ajberdy requested a review from speller26 August 4, 2022 20:44
speller26
speller26 previously approved these changes Aug 4, 2022
@ajberdy ajberdy merged commit 0cf2f59 into main Aug 5, 2022
@ajberdy ajberdy deleted the feature/openqasm branch August 5, 2022 00:56
krneta pushed a commit that referenced this pull request Aug 31, 2022
BDK now uses OpenQASM 3.0 as the default IR for Circuits. This support is made possible by the new local simulator support for OpenQASM 3.0 programs. The local simulators (braket_sv, braket_dm) now support OpenQASM 3.0, including advanced language features not currently supported elsewhere in the service. Check out [Simulating_Advanced_OpenQASM_Programs_with_the_Local_Simulator.ipynb](https://github.com/aws/amazon-braket-examples/blob/main/examples/braket_features/Simulating_Advanced_OpenQASM_Programs_with_the_Local_Simulator.ipynb) to see examples!

Co-authored-by: Kshitij Chhabra <kshitijc@users.noreply.github.com>
Co-authored-by: Synthia <93848130+synthia2080@users.noreply.github.com>
Co-authored-by: valegogu <104395310+valegogu@users.noreply.github.com>
Co-authored-by: Megha <57037661+mshenoy87@users.noreply.github.com>
Co-authored-by: toniraggs <105249045+toniraggs@users.noreply.github.com>
Co-authored-by: kfox808 <kalenafox808@gmail.com>
Co-authored-by: Kira Fox <Littlelime21@Kiras-MacBook-Pro.local>
Co-authored-by: Megha Shenoy <msheno3@uic.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants