Skip to content

Commit c43f6bf

Browse files
rwakizakadoichanj
andauthored
fix: Avoid calling non-const function of const circuit object (#129)
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
1 parent 4022da8 commit c43f6bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/providers/qkrt_backend.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ class QkrtBackend : public BackendV2 {
103103
if (shots == 0)
104104
shots = input_pubs[0].shots();
105105

106-
int ret = qkrt_sampler_job_run(&job, service_.get(), backend_, input_pubs[0].circuit().get_rust_circuit().get(), shots, NULL);
106+
auto circuit = input_pubs[0].circuit();
107+
int ret = qkrt_sampler_job_run(&job, service_.get(), backend_, circuit.get_rust_circuit().get(), shots, NULL);
107108

108109
return std::make_shared<providers::QkrtJob>(service_, std::shared_ptr<qkrt_Job>(job, qkrt_job_free));
109110
}

0 commit comments

Comments
 (0)