Skip to content

Commit 1484976

Browse files
authored
Merge pull request #6 from QuantumBFS/formatting
Fix formatting
2 parents eefc407 + c281f47 commit 1484976

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ exp_header = [Dict("description"=>"1")]
2929
3) Creating a Qobj
3030

3131
```julia
32-
q = CreateQobj([qc], id = "test_id", header= header, exp_header = exp_header)
32+
q = create_qobj([qc], id = "test_id", header= header, exp_header = exp_header)
3333
```

src/YaoBlocksQobj.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module YaoBlocksQobj
22

3-
export CreateQobj
3+
export create_qobj
44

55
using IBMQClient.Schema
66
using YaoBlocks

src/qobj.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Random
22

33
"""
4-
CreateQobj(qc, id, header, nshots, exp_header, exp_config)
4+
create_qobj(qc, id, header, nshots, exp_header, exp_config)
55
66
Creates a `Qobj` based on the IBMQClient schema.
77
@@ -20,14 +20,14 @@ using Random
2020
- `exp_config` (optional): An Array of Configuration structure for user settings that can be different in each
2121
experiment. These will override the configuration settings of the whole job.
2222
"""
23-
function CreateQobj(qc::Array{<:AbstractBlock{N}}; id::String = randstring(), header = nothing, nshots::Int = 1024, exp_header = nothing, exp_config = nothing) where N
24-
experiments = CreateExperiment(qc, exp_header, exp_config)
23+
function create_qobj(qc::Array{<:AbstractBlock{N}}; id::String = randstring(), header = nothing, nshots::Int = 1024, exp_header = nothing, exp_config = nothing) where N
24+
experiments = create_experiment(qc, exp_header, exp_config)
2525
config = ExpConfig(shots = nshots, memory_slots = length(experiments))
2626
Qobj(;qobj_id = id, type = "QASM", schema_version = v"1", header, experiments = experiments, config = config)
2727
end
2828

2929
"""
30-
CreateExperiment(qc, exp_header, exp_config)
30+
create_experiment(qc, exp_header, exp_config)
3131
3232
Returns and experiment type that consits of instructions.
3333
@@ -41,7 +41,7 @@ end
4141
- `exp_config` (optional): An Array of Configuration structure for user settings that can be different in each
4242
experiment. These will override the configuration settings of the whole job.
4343
"""
44-
function CreateExperiment(qc::Array{<:AbstractBlock{N}}, exp_header = nothing, exp_config = nothing) where N
44+
function create_experiment(qc::Array{<:AbstractBlock{N}}, exp_header = nothing, exp_config = nothing) where N
4545
experiments = Experiment[]
4646
head = false
4747
config = false
@@ -53,21 +53,21 @@ function CreateExperiment(qc::Array{<:AbstractBlock{N}}, exp_header = nothing, e
5353

5454
for i in 1:length(qc)
5555
if head && config
56-
exp = CreateExperiment!(qc[i], exp_header[i], exp_config[i])
56+
exp = create_experiment!(qc[i], exp_header[i], exp_config[i])
5757
elseif head && !config
58-
exp = CreateExperiment!(qc[i], exp_header[i], exp_config)
58+
exp = create_experiment!(qc[i], exp_header[i], exp_config)
5959
elseif !head && config
60-
exp = CreateExperiment!(qc[i], exp_header, exp_config[i])
60+
exp = create_experiment!(qc[i], exp_header, exp_config[i])
6161
else
62-
exp = CreateExperiment!(qc[i], exp_header, exp_config)
62+
exp = create_experiment!(qc[i], exp_header, exp_config)
6363
end
6464

6565
push!(experiments, exp)
6666
end
6767
return experiments
6868
end
6969

70-
function CreateExperiment!(qc::AbstractBlock{N}, exp_header = nothing, exp_config = nothing) where N
70+
function create_experiment!(qc::AbstractBlock{N}, exp_header = nothing, exp_config = nothing) where N
7171
exp_inst = generate_inst(qc)
7272
experiment = Experiment(;header = exp_header, config = exp_config, instructions = exp_inst)
7373
return experiment

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include("qobjtoqbir.jl")
1414
exp_header = [Dict("description"=>"1"), Dict("description"=>"2")]
1515

1616
circuits = [qc, qc1]
17-
q = CreateQobj(circuits, id = "test", header = header, exp_header = exp_header)
17+
q = create_qobj(circuits, id = "test", header = header, exp_header = exp_header)
1818

1919
experiments = q.experiments
2020
for i in 1:length(experiments)

0 commit comments

Comments
 (0)