Skip to content

Commit

Permalink
chore: Update Rust crate quil-rs to 0.12.0 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
mend-for-github-com[bot] authored Jun 18, 2022
1 parent 7584bc6 commit 15b44bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion qcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy_static = "1.4.0"
log = "0.4.17"
num = "0.4.0"
qcs-api = { version = "0.0.6", path = "../qcs-api" }
quil-rs = "0.11.1"
quil-rs = "0.12.0"
reqwest = { version = "0.11.11", features = ["rustls", "json"] }
rmp-serde = "1.1.0"
serde = { version = "1.0.137", features = ["derive"] }
Expand Down
6 changes: 2 additions & 4 deletions qcs/src/qpu/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,10 @@ impl<'a> Execution<'a> {
NativeQuil::assume_native_quil(quil.to_string())
};

let program =
NativeQuilProgram::try_from(native_quil).map_err(|e| Error::Quil(format!("{}", e)))?;
let program = NativeQuilProgram::try_from(native_quil).map_err(Error::Quil)?;

Ok(Self {
program: RewrittenProgram::try_from(program)
.map_err(|e| Error::Quil(format!("{}", e)))?,
program: RewrittenProgram::try_from(program).map_err(|e| Error::Quil(e.to_string()))?,
quantum_processor_id,
shots,
qcs: None,
Expand Down
2 changes: 1 addition & 1 deletion qcs/src/qvm/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Execution {
/// Construct a new [`Execution`] from Quil. Immediately parses the Quil and returns an error if
/// there are any problems.
pub(crate) fn new(quil: &str) -> Result<Self, Error> {
let program = Program::from_str(quil).map_err(|e| Error::Parsing(format!("{}", e)))?;
let program = Program::from_str(quil).map_err(Error::Parsing)?;
Ok(Self { program })
}

Expand Down

0 comments on commit 15b44bd

Please sign in to comment.