Struct roqoqo_aqt::Backend [−][src]
pub struct Backend {
pub device: AqtDevice,
// some fields omitted
}
Expand description
AQT backend
provides functions to run circuits and measurements on AQT devices.
Fields
device: AqtDevice
Device the backend calls to run circuits remotely
Implementations
Creates a new AQT backend.
Arguments
device
- The AQT device the Backend uses to execute operations and circuits.
At the moment limited to the AQT simulator.
access_token
- An access_token is required to access AQT hardware and simulators.
The access_token can either be given as an argument here or set via the environmental variable $AQT_ACCESS_TOKEN
pub fn to_aqt_json<'a>(
&self,
circuit: impl Iterator<Item = &'a Operation>
) -> Result<String, RoqoqoBackendError>
pub fn to_aqt_json<'a>(
&self,
circuit: impl Iterator<Item = &'a Operation>
) -> Result<String, RoqoqoBackendError>
Creates an AQT json represenstaion of a roqoqo::Circuit.
Arguments
circuit
- An iterator over Operations that represents a circuit that is translated
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn run_circuit_iterator<'a>(
&self,
circuit: impl Iterator<Item = &'a Operation>
) -> RegisterResult
fn run_circuit_iterator<'a>(
&self,
circuit: impl Iterator<Item = &'a Operation>
) -> RegisterResult
Runs each operation obtained from an iterator over operations on the backend. Read more
Runs a circuit with the backend. Read more
Runs all circuits corresponding to one measurement with the backend. Read more
fn run_measurement<T>(
&self,
measurement: &T
) -> Result<Option<HashMap<String, f64, RandomState>>, RoqoqoBackendError> where
T: MeasureExpectationValues,
fn run_measurement<T>(
&self,
measurement: &T
) -> Result<Option<HashMap<String, f64, RandomState>>, RoqoqoBackendError> where
T: MeasureExpectationValues,
Evaluates expectation values of a measurement with the backend. Read more
Auto Trait Implementations
impl RefUnwindSafe for Backend
impl UnwindSafe for Backend
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more