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

Add syntax highlighting to Python code blocks #43

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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