Skip to content

Commit

Permalink
fix: doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt-aws committed Sep 27, 2024
1 parent d4a0f36 commit b8867f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ jobs:
run: |
using Documenter: DocMeta, doctest
using Braket
DocMeta.setdocmeta!(Braket, :DocTestSetup, :(using Braket); recursive=true)
DocMeta.setdocmeta!(Braket, :DocTestSetup, :(using Braket, Braket.Dates); recursive=true)
doctest(Braket)
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
push!(LOAD_PATH,"../src/")

using Documenter, Braket
using Documenter, Braket, Braket.Dates

makedocs(sitename="Braket.jl")

Expand Down
6 changes: 3 additions & 3 deletions src/circuit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ julia> circ.instructions
Braket.Instruction{Reset}(Reset(), QubitSet(0))
```
"""
Base.reset(c::Circuit, target_qubits) = foreach(t->add_instruction!(c, Instruction(Reset(), t)), target_qubits)
Base.reset(c::Circuit, target_qubits) = (foreach(t->add_instruction!(c, Instruction(Reset(), t)), target_qubits); return c)

Check warning on line 377 in src/circuit.jl

View check run for this annotation

Codecov / codecov/patch

src/circuit.jl#L377

Added line #L377 was not covered by tests

"""
delay(c::Circuit, duration::Dates.Period, target_qubits) -> Circuit
Expand All @@ -395,7 +395,7 @@ julia> circ.instructions
Braket.Instruction{Delay}(Delay(Nanosecond(10)), QubitSet(0, 1))
```
"""
delay(c::Circuit, duration::Dates.Period, target_qubits) = add_instruction!(c, Instruction(Delay(duration), target_qubits))
delay(c::Circuit, duration::Dates.Period, target_qubits) = (add_instruction!(c, Instruction(Delay(duration), target_qubits)); return c)

Check warning on line 398 in src/circuit.jl

View check run for this annotation

Codecov / codecov/patch

src/circuit.jl#L398

Added line #L398 was not covered by tests
# TODO enforce this in `Moments` as well

"""
Expand All @@ -417,7 +417,7 @@ julia> circ.instructions
Braket.Instruction{Barrier}(Barrier(), QubitSet(0, 1))
```
"""
barrier(c::Circuit, target_qubits) = add_instruction!(c, Instruction(Barrier(), target_qubits))
barrier(c::Circuit, target_qubits) = (add_instruction!(c, Instruction(Barrier(), target_qubits)); return c)

Check warning on line 420 in src/circuit.jl

View check run for this annotation

Codecov / codecov/patch

src/circuit.jl#L420

Added line #L420 was not covered by tests

function openqasm_header(c::Circuit, sps::SerializationProperties=OpenQASMSerializationProperties())
ir_instructions = ["OPENQASM 3.0;"]
Expand Down

0 comments on commit b8867f4

Please sign in to comment.