Skip to content

Commit

Permalink
Merge pull request #1067 from qiboteam/rust-u32
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido authored Oct 18, 2024
2 parents a6049a9 + 15dce6a commit 30db7ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use numpy::PyArray2;
use pyo3::prelude::*;
use pyo3::types::PyDict;

pub fn execute_qasm(circuit: String, platform: String, nshots: u32) -> PyResult<Array2<i32>> {
pub fn execute_qasm(circuit: String, platform: String, nshots: u32) -> PyResult<Array2<u32>> {
Python::with_gil(|py| {
let kwargs = PyDict::new(py);
kwargs.set_item("circuit", circuit)?;
kwargs.set_item("platform", platform)?;
kwargs.set_item("nshots", nshots)?;

let qibolab = PyModule::import(py, "qibolab")?;
let pyarray: &PyArray2<i32> = qibolab
let pyarray: &PyArray2<u32> = qibolab
.getattr("execute_qasm")?
.call((), Some(kwargs))?
.call_method0("samples")?
Expand Down

0 comments on commit 30db7ea

Please sign in to comment.