11using 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)
2727end
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
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
6868end
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
0 commit comments