Struct qoqo_aqt::devices::SimulatorDeviceWrapper [−][src]
pub struct SimulatorDeviceWrapper {
pub internal: SimulatorDevice,
}
Expand description
AQT quantum simulator device
Provides endpoint that receives instructions that are simulated and returns measurement results.
Fields
internal: SimulatorDevice
Internal storage of [roqoqo_aqt::SimulatorDevice]
Implementations
Create new simulator device.
Args: number_qubits (int): Number of qubits that should be simulated
Return a copy of the SimulatorDevice (copy here produces a deepcopy).
Returns: SimulatorDevice: A deep copy of self.
Return a deep copy of the SimulatorDevice.
Returns: SimulatorDevice: A deep copy of self.
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.
Return number of qubits simulated by Simulator.
Returns: int: The number of qubits.
Return the URL of the remote host executing Circuits.
Returns: str: The URL of the remote host executing the Circuits.
Return the bincode representation of the Enum variant of the Device.
Only used for internal interfacing.
Returns: ByteArray: The serialized AqtDevice (in bincode form).
Raises: ValueError: Cannot serialize Device to bytes.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Dict = PyClassDummySlot
type Dict = PyClassDummySlot
Specify this class has #[pyclass(dict)]
or not.
type WeakRef = PyClassDummySlot
type WeakRef = PyClassDummySlot
Specify this class has #[pyclass(weakref)]
or not.
type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read more
impl PyClassDescriptors<SimulatorDeviceWrapper> for PyClassImplCollector<SimulatorDeviceWrapper>
impl PyClassDescriptors<SimulatorDeviceWrapper> for PyClassImplCollector<SimulatorDeviceWrapper>
#[pyclass(subclass)]
#[pyclass(extends=…)]
type ThreadChecker = ThreadCheckerStub<SimulatorDeviceWrapper>
type ThreadChecker = ThreadCheckerStub<SimulatorDeviceWrapper>
This handles following two situations: Read more
type AsRefTarget = PyCell<Self>
type AsRefTarget = PyCell<Self>
Utility type to make Py::as_ref work.
PyTypeObject instance for this type.
Checks if object
is an instance of this type or a subclass of this type.
Checks if object
is an instance of this type.
Auto Trait Implementations
impl RefUnwindSafe for SimulatorDeviceWrapper
impl Send for SimulatorDeviceWrapper
impl Sync for SimulatorDeviceWrapper
impl Unpin for SimulatorDeviceWrapper
impl UnwindSafe for SimulatorDeviceWrapper
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Returns the safe abstraction over the type object.
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