Skip to content

Commit

Permalink
Remove in_ket()/out_ket() (See release notes, v0.2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Feb 22, 2023
1 parent d88298e commit 1540942
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qook"
version = "0.1.3"
version = "0.2.0"
license = "MIT"
description = "qook - Pure Rust unitaryfund/qrack Wrapper"
documentation = "https://pyqrack.readthedocs.io/en/latest/"
Expand Down
24 changes: 12 additions & 12 deletions src/qrack_simulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ impl QrackSimulator {
self.check_error()
}

pub fn in_ket(&self, ket: *mut f32) -> Result<(), QrackError> {
// pub fn in_ket(&self, ket: *mut f32) -> Result<(), QrackError> {
// Set state vector
//
// Set state vector for the selected simulator ID.
Expand All @@ -2122,13 +2122,13 @@ impl QrackSimulator {
// Raises:
// RuntimeError: Not implemented for the given builds.

unsafe {
qrack_system::InKet(self.sid, ket);
}
self.check_error()
}
// unsafe {
// qrack_system::InKet(self.sid, ket);
// }
// self.check_error()
// }

pub fn out_ket(self, ket: *mut f32) -> Result<(), QrackError> {
// pub fn out_ket(self, ket: *mut f32) -> Result<(), QrackError> {
// Get state vector
//
// Returns the raw state vector of the simulator.
Expand All @@ -2142,11 +2142,11 @@ impl QrackSimulator {
// Raises:
// RuntimeError: Not implemented for the given builds.

unsafe {
qrack_system::OutKet(self.sid, ket);
}
self.check_error()
}
// unsafe {
// qrack_system::OutKet(self.sid, ket);
// }
// self.check_error()
// }

pub fn prob(&self, q: u64) -> Result<f64, QrackError> {
// Probability of `|1>`
Expand Down

0 comments on commit 1540942

Please sign in to comment.