Enum roqoqo_qiskit_devices::devices::IBMDevice
source · pub enum IBMDevice {
IBMLagosDevice(IBMLagosDevice),
IBMNairobiDevice(IBMNairobiDevice),
IBMPerthDevice(IBMPerthDevice),
IBMBelemDevice(IBMBelemDevice),
IBMJakartaDevice(IBMJakartaDevice),
IBMLimaDevice(IBMLimaDevice),
IBMManilaDevice(IBMManilaDevice),
IBMQuitoDevice(IBMQuitoDevice),
}
Expand description
Collection of IBM quantum devices.
Variants§
IBMLagosDevice(IBMLagosDevice)
IBMNairobiDevice(IBMNairobiDevice)
IBMPerthDevice(IBMPerthDevice)
IBMBelemDevice(IBMBelemDevice)
IBMJakartaDevice(IBMJakartaDevice)
IBMLimaDevice(IBMLimaDevice)
IBMManilaDevice(IBMManilaDevice)
IBMQuitoDevice(IBMQuitoDevice)
Implementations§
source§impl IBMDevice
impl IBMDevice
sourcepub fn set_single_qubit_gate_time(
&mut self,
gate: &str,
qubit: usize,
gate_time: f64,
) -> Result<(), RoqoqoError>
pub fn set_single_qubit_gate_time( &mut self, gate: &str, qubit: usize, gate_time: f64, ) -> Result<(), RoqoqoError>
Setting the gate time of a single qubit gate.
§Arguments
gate
- hqslang name of the single-qubit-gate.qubit
- The qubit for which the gate time is set.gate_time
- gate time for the given gate.
sourcepub fn set_two_qubit_gate_time(
&mut self,
gate: &str,
control: usize,
target: usize,
gate_time: f64,
) -> Result<(), RoqoqoError>
pub fn set_two_qubit_gate_time( &mut self, gate: &str, control: usize, target: usize, gate_time: f64, ) -> Result<(), RoqoqoError>
Setting the gate time of a two qubit gate.
§Arguments
gate
- hqslang name of the two-qubit-gate.control
- The control qubit for which the gate time is set.target
- The target qubit for which the gate time is set.gate_time
- gate time for the given gate.
sourcepub fn add_damping(
&mut self,
qubit: usize,
damping: f64,
) -> Result<(), RoqoqoError>
pub fn add_damping( &mut self, qubit: usize, damping: f64, ) -> Result<(), RoqoqoError>
Adds qubit damping to noise rates.
§Arguments
qubit
- The qubit for which the dampins is added.daming
- The damping rates.
sourcepub fn add_dephasing(
&mut self,
qubit: usize,
dephasing: f64,
) -> Result<(), RoqoqoError>
pub fn add_dephasing( &mut self, qubit: usize, dephasing: f64, ) -> Result<(), RoqoqoError>
Adds qubit dephasing to noise rates.
§Arguments
qubit
- The qubit for which the dephasing is added.dephasing
- The dephasing rates.
sourcepub fn to_generic_device(&self) -> Result<GenericDevice, RoqoqoError>
pub fn to_generic_device(&self) -> Result<GenericDevice, RoqoqoError>
Converts the device to a qoqo GenericDevice.
§Returns
GenericDevice
- The converted device.RoqoqoError
- The error propagated from adding gate times and decoherence rates.
Trait Implementations§
source§impl From<&IBMBelemDevice> for IBMDevice
impl From<&IBMBelemDevice> for IBMDevice
source§fn from(input: &IBMBelemDevice) -> Self
fn from(input: &IBMBelemDevice) -> Self
source§impl From<&IBMJakartaDevice> for IBMDevice
impl From<&IBMJakartaDevice> for IBMDevice
source§fn from(input: &IBMJakartaDevice) -> Self
fn from(input: &IBMJakartaDevice) -> Self
source§impl From<&IBMLagosDevice> for IBMDevice
impl From<&IBMLagosDevice> for IBMDevice
source§fn from(input: &IBMLagosDevice) -> Self
fn from(input: &IBMLagosDevice) -> Self
source§impl From<&IBMLimaDevice> for IBMDevice
impl From<&IBMLimaDevice> for IBMDevice
source§fn from(input: &IBMLimaDevice) -> Self
fn from(input: &IBMLimaDevice) -> Self
source§impl From<&IBMManilaDevice> for IBMDevice
impl From<&IBMManilaDevice> for IBMDevice
source§fn from(input: &IBMManilaDevice) -> Self
fn from(input: &IBMManilaDevice) -> Self
source§impl From<&IBMNairobiDevice> for IBMDevice
impl From<&IBMNairobiDevice> for IBMDevice
source§fn from(input: &IBMNairobiDevice) -> Self
fn from(input: &IBMNairobiDevice) -> Self
source§impl From<&IBMPerthDevice> for IBMDevice
impl From<&IBMPerthDevice> for IBMDevice
source§fn from(input: &IBMPerthDevice) -> Self
fn from(input: &IBMPerthDevice) -> Self
source§impl From<&IBMQuitoDevice> for IBMDevice
impl From<&IBMQuitoDevice> for IBMDevice
source§fn from(input: &IBMQuitoDevice) -> Self
fn from(input: &IBMQuitoDevice) -> Self
source§impl From<IBMBelemDevice> for IBMDevice
impl From<IBMBelemDevice> for IBMDevice
source§fn from(input: IBMBelemDevice) -> Self
fn from(input: IBMBelemDevice) -> Self
source§impl From<IBMJakartaDevice> for IBMDevice
impl From<IBMJakartaDevice> for IBMDevice
source§fn from(input: IBMJakartaDevice) -> Self
fn from(input: IBMJakartaDevice) -> Self
source§impl From<IBMLagosDevice> for IBMDevice
impl From<IBMLagosDevice> for IBMDevice
source§fn from(input: IBMLagosDevice) -> Self
fn from(input: IBMLagosDevice) -> Self
source§impl From<IBMLimaDevice> for IBMDevice
impl From<IBMLimaDevice> for IBMDevice
source§fn from(input: IBMLimaDevice) -> Self
fn from(input: IBMLimaDevice) -> Self
source§impl From<IBMManilaDevice> for IBMDevice
impl From<IBMManilaDevice> for IBMDevice
source§fn from(input: IBMManilaDevice) -> Self
fn from(input: IBMManilaDevice) -> Self
source§impl From<IBMNairobiDevice> for IBMDevice
impl From<IBMNairobiDevice> for IBMDevice
source§fn from(input: IBMNairobiDevice) -> Self
fn from(input: IBMNairobiDevice) -> Self
source§impl From<IBMPerthDevice> for IBMDevice
impl From<IBMPerthDevice> for IBMDevice
source§fn from(input: IBMPerthDevice) -> Self
fn from(input: IBMPerthDevice) -> Self
source§impl From<IBMQuitoDevice> for IBMDevice
impl From<IBMQuitoDevice> for IBMDevice
source§fn from(input: IBMQuitoDevice) -> Self
fn from(input: IBMQuitoDevice) -> Self
source§impl QoqoDevice for IBMDevice
impl QoqoDevice for IBMDevice
Implements the Device trait for IBMDevice.
Defines standard functions available for roqoqo-iqm devices.
source§fn single_qubit_gate_names(&self) -> Vec<String>
fn single_qubit_gate_names(&self) -> Vec<String>
Returns the names of a single qubit operations available on the device.
§Returns
Vec<String>
- The list of gate names.
source§fn two_qubit_gate_time(
&self,
hqslang: &str,
control: &usize,
target: &usize,
) -> Option<f64>
fn two_qubit_gate_time( &self, hqslang: &str, control: &usize, target: &usize, ) -> Option<f64>
Returns the gate time of a two qubit operation if the two qubit operation is available on device.
§Arguments
hqslang
- The hqslang name of a two qubit gate.control
- The control qubit the gate acts on.target
- The target qubit the gate acts on.
§Returns
Some<f64>
- The gate time.None
- The gate is not available on the device.
source§fn two_qubit_gate_names(&self) -> Vec<String>
fn two_qubit_gate_names(&self) -> Vec<String>
Returns the names of a two qubit operations available on the device.
§Returns
Vec<String>
- The list of gate names.
source§fn three_qubit_gate_time(
&self,
hqslang: &str,
control_0: &usize,
control_1: &usize,
target: &usize,
) -> Option<f64>
fn three_qubit_gate_time( &self, hqslang: &str, control_0: &usize, control_1: &usize, target: &usize, ) -> Option<f64>
Returns the gate time of a three qubit operation if the three qubit operation is available on device.
§Arguments
hqslang
- The hqslang name of a two qubit gate.control
- The control qubit the gate acts on.target
- The target qubit the gate acts on.
§Returns
Some<f64>
- The gate time.None
- The gate is not available on the device.
source§fn multi_qubit_gate_names(&self) -> Vec<String>
fn multi_qubit_gate_names(&self) -> Vec<String>
Returns the names of a multi qubit operations available on the device.
The list of names also includes the three qubit gate operations.
§Returns
Vec<String>
- The list of gate names.
source§fn number_qubits(&self) -> usize
fn number_qubits(&self) -> usize
Returns the number of qubits the device supports.
§Returns
usize
- The number of qubits in the device.
source§fn longest_chains(&self) -> Vec<Vec<usize>>
fn longest_chains(&self) -> Vec<Vec<usize>>
Return a list of longest linear chains through the device.
Returns at least one chain of qubits with linear connectivity in the device, that has the maximum possible number of qubits with linear connectivity in the device. Can return more that one of the possible chains but is not guaranteed to return all possible chains. (For example for all-to-all connectivity only one chain will be returned).
§Returns
Vec<Vec<usize>>
- A list of the longest chains given by vectors of qubits in the chain.
source§fn longest_closed_chains(&self) -> Vec<Vec<usize>>
fn longest_closed_chains(&self) -> Vec<Vec<usize>>
Return a list of longest closed linear chains through the device.
Returns at least one chain of qubits with linear connectivity in the device , that has the maximum possible number of qubits with linear connectivity in the device. The chain must be closed, the first qubit needs to be connected to the last qubit. Can return more that one of the possible chains but is not guaranteed to return all possible chains. (For example for all-to-all connectivity only one chain will be returned).
§Returns
Vec<Vec<usize>>
- A list of the longest chains given by vectors of qubits in the chain.
source§fn two_qubit_edges(&self) -> Vec<(usize, usize)>
fn two_qubit_edges(&self) -> Vec<(usize, usize)>
Returns the list of pairs of qubits linked with a native two-qubit-gate in the device.
A pair of qubits is considered linked by a native two-qubit-gate if the device can implement a two-qubit-gate between the two qubits without decomposing it into a sequence of gates that involves a third qubit of the device. The two-qubit-gate also has to form a universal set together with the available single qubit gates.
The returned vectors is a simple, graph-library independent, representation of the undirected connectivity graph of the device. It can be used to construct the connectivity graph in a graph library of the users choice from a list of edges and can be used for applications like routing in quantum algorithms.
§Returns
Vec<(usize, usize)>
- A list of pairs of qubits linked with a native two-qubit-gate in the device.
§fn add_active_gate_noise(
&self,
circuit: &Circuit,
) -> Result<Circuit, RoqoqoBackendError>
fn add_active_gate_noise( &self, circuit: &Circuit, ) -> Result<Circuit, RoqoqoBackendError>
Auto Trait Implementations§
impl Freeze for IBMDevice
impl RefUnwindSafe for IBMDevice
impl Send for IBMDevice
impl Sync for IBMDevice
impl Unpin for IBMDevice
impl UnwindSafe for IBMDevice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.