pub fn new(
        device: AqtDevice,
        access_token: Option<String>,
    ) -> Result<Self, RoqoqoBackendError> {
        let access_token_internal: String = match access_token {
            Some(s) => s,
            None => env::var("AQT_ACCESS_TOKEN").map_err(|_| {
                RoqoqoBackendError::MissingAuthentification {
                    msg: "AQT access token is missing".to_string(),
                }
            })?,
        };

        Ok(Self {
            device,
            access_token: access_token_internal,
        })
    }
/// 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`
Creates a new AQT backend.
Creates a new AQT backend .
pub fn new(
        device: AqtDevice,
        access_token: Option<String>,
    ) -> Result<Self, RoqoqoBackendError> {
        let access_token_internal: String = match access_token {
            Some(s) => s,
            None => env::var("AQT_ACCESS_TOKEN").map_err(|_| {
                RoqoqoBackendError::MissingAuthentification {
                    msg: "AQT access token is missing".to_string(),
                }
            })?,
        };
        Ok(Self {
            device,
            access_token: access_token_internal,
        })
    }
pub fn new ( device : AqtDevice , access_token : Option < String > , ) -> Result < Self , RoqoqoBackendError > { let access_token_internal : String = match access_token { Some ( s ) => s , None => env :: var ( " " ) . map_err ( | _ | { RoqoqoBackendError :: MissingAuthentification { msg : " " . to_string ( ) , } } ) ? , } ; Ok ( Self { device , access_token : access_token_internal , } ) }
Creates a new AQT backend.
Creates a new AQT backend .
device
AqtDevice
access_token
Option<String>
device
AqtDevice
access_token
Option<String>