pub fn from_bincode(&self, input: &PyAny) -> PyResult<NoisySimulatorDeviceWrapper> {
        let bytes = input
            .extract::<Vec<u8>>()
            .map_err(|_| PyTypeError::new_err("Input cannot be converted to byte array"))?;

        Ok(NoisySimulatorDeviceWrapper {
            internal: deserialize(&bytes[..]).map_err(|_| {
                PyValueError::new_err("Input cannot be deserialized to SimulatorDevice")
            })?,
        })
    }
/// Convert the bincode representation of the SimulatorDevice to a SimulatorDevice using the [bincode] crate.
///
/// Args:
///     input (ByteArray): The serialized SimulatorDevice (in [bincode] form).
///
/// Returns:
///     SimulatorDevice: The deserialized SimulatorDevice.
///
/// Raises:
///     TypeError: Input cannot be converted to byte array.
///     ValueError: Input cannot be deserialized to SimulatorDevice.
Convert the bincode representation of the SimulatorDevice to a SimulatorDevice using the [bincode] crate.
Args:
input (ByteArray): The serialized SimulatorDevice (in [bincode] form).



Input cannot be converted to byte array.
ValueError: Input cannot be deserialized to SimulatorDevice.
Convert the bincode representation of the SimulatorDevice to a SimulatorDevice using the [ bincode ] crate . Args : input ( ByteArray ) : The serialized SimulatorDevice ( in [ bincode ] form ) . Input cannot be converted to byte array . ValueError : Input cannot be deserialized to SimulatorDevice .
pub fn from_bincode(&self, input: &PyAny) -> PyResult<NoisySimulatorDeviceWrapper> {
        let bytes = input
            .extract::<Vec<u8>>()
            .map_err(|_| PyTypeError::new_err("Input cannot be converted to byte array"))?;
        Ok(NoisySimulatorDeviceWrapper {
            internal: deserialize(&bytes[..]).map_err(|_| {
                PyValueError::new_err("Input cannot be deserialized to SimulatorDevice")
            })?,
        })
    }
pub fn from_bincode ( & self , input : & PyAny ) -> PyResult < NoisySimulatorDeviceWrapper > { let bytes = input . extract :: < Vec < u8 > > ( ) . map_err ( | _ | PyTypeError :: new_err ( " " ) ) ? ; Ok ( NoisySimulatorDeviceWrapper { internal : deserialize ( & bytes [ .. ] ) . map_err ( | _ | { PyValueError :: new_err ( " " ) } ) ? , } ) }
Convert the bincode representation of the SimulatorDevice to a SimulatorDevice using the [bincode] crate.
Convert the bincode representation of the SimulatorDevice to a SimulatorDevice using the [ bincode ] crate .
&self
input
&PyAny
&self
input
&PyAny