amazon-braket / amazon-braket/Braket.jl

Lack of Guidance on Implementing Classical Controlled Instructions in Braket Using OpenQASM 3

Offen
#101 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
documentation
Vorherrschende Sprache
Julia
Sterne
110
Forks
7
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**What did you find confusing? Please describe.**
I tried to implement classical controlled instructions in Braket. However, I didn't understand how to properly create and utilize classical control structures within the Braket framework, as the documentation does not provide clear examples or guidance on this topic.

**Describe how documentation can be improved**
The documentation could be improved by including specific examples of classical controlled instructions in Braket, particularly focusing on how to implement if-else statements similar to the OpenQASM 3 example provided. It would be helpful to have a dedicated section that explains the syntax and semantics of classical control structures, along with practical examples that demonstrate their usage in quantum circuits.

**Additional context**
I am trying to achieve the following code in OpenQASM 3.0:

```qasm
OPENQASM 3.0;
bit[2] b;
qubit[3] q;
h q[1];
b[0] = measure q[1];
if (b[0]) {
x q[0];
}
```

However, I am unsure how to translate this logic into the Braket environment. Any guidance or examples would be greatly appreciated.

This is related to this [issue](https://github.com/amazon-braket/BraketSimulator.jl/issues/47)

Relevant [Qiskit Tutorial on Classical feedforward and control flow](https://docs.quantum.ibm.com/guides/classical-feedforward-and-control-flow#if-statement)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.