amazon-braket / amazon-braket-sdk-python

A Python SDK for interacting with quantum devices on Amazon Braket
https://aws.amazon.com/braket/
Apache License 2.0
300 stars 118 forks source link

[Unitary-Hack] Feature: Add Delay and Barrier to circuit #992

Closed Manvi-Agrawal closed 4 months ago

Manvi-Agrawal commented 4 months ago

Issue , if available:

Fixes https://github.com/amazon-braket/amazon-braket-sdk-python/issues/974

Testing done:

circ = Circuit().barrier([0, 1, 2]) circ = Circuit().delay([0, 1, 2], 30)

print(circ.to_ir("OPENQASM").source)


#### OUTPUT
```text
OPENQASM 3.0;
bit[3] b;
qubit[3] q;
delay[30 s] q[0], q[1], q[2];
b[0] = measure q[0];
b[1] = measure q[1];
b[2] = measure q[2];

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

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