pub trait Client {
// Required methods
fn get_version_info<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<MultishotResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn run_and_measure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotMeasureRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<i64>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn measure_expectation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 ExpectationRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_wavefunction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 WavefunctionRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Methods supported by the QVM
Required Methods§
sourcefn get_version_info<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_version_info<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The QVM version string. Not guaranteed to comply to the semver spec.
sourcefn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<MultishotResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<MultishotResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a program on the QVM.
sourcefn run_and_measure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotMeasureRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<i64>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn run_and_measure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 MultishotMeasureRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<i64>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a program on the QVM.
The behavior of this method is different to that of Self::run
in that Self::run_and_measure will execute the program a single
time; the resulting wavefunction is then sampled some number of times
(specified in http::MultishotMeasureRequest).
This can be useful if the program is expensive to execute and does not change per “shot”.
sourcefn measure_expectation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 ExpectationRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn measure_expectation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 ExpectationRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Measure the expectation value of a program
sourcefn get_wavefunction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 WavefunctionRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_wavefunction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 WavefunctionRequest,
options: &'life2 QvmOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the wavefunction produced by a program