Skip to content

Commit

Permalink
Add syntax highlighting to Python code blocks (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh146 authored Sep 19, 2024
1 parent 7a3d2ec commit deaeac9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ quantum programs with a simplified syntax and run the programs on the service. I
model programming paradigm that is also used in the Amazon Braket SDK.

First, import the following modules and functions:
```
```python
import autoqasm as aq
from autoqasm.instructions import h, cnot, measure
```
Expand All @@ -66,7 +66,7 @@ This allows AutoQASM to hook into the program definition and generate an output
by quantum devices.

For instance, we can create a Bell state like so:
```
```python
# A program that generates a maximally entangled state
@aq.main
def bell_state():
Expand All @@ -79,7 +79,7 @@ You can view the output format, which is OpenQASM, by running `bell_state.build(
AutoQASM enables users to use more complicated program constructs with a compact and readable
structure. We can demonstrate this with a program that conditionally prepares multiple Bell states
on qubit pairs (1, 2) and (3, 4).
```
```python
@aq.main(num_qubits=5)
def conditional_multi_bell_states() -> None:
h(0)
Expand All @@ -99,7 +99,7 @@ them out!
AutoQASM includes a simulator which can be accessed using the Amazon Braket local simulator interface.
Let's simulate the `conditional_multi_bell_states` program:

```
```python
from braket.devices import LocalSimulator

device = LocalSimulator("autoqasm")
Expand Down

0 comments on commit deaeac9

Please sign in to comment.