Struct roqoqo_qiskit_devices::devices::IBMPerthDevice
source · pub struct IBMPerthDevice { /* private fields */ }
Implementations§
source§impl IBMPerthDevice
impl IBMPerthDevice
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.
Trait Implementations§
source§impl Clone for IBMPerthDevice
impl Clone for IBMPerthDevice
source§fn clone(&self) -> IBMPerthDevice
fn clone(&self) -> IBMPerthDevice
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IBMPerthDevice
impl Debug for IBMPerthDevice
source§impl Default for IBMPerthDevice
impl Default for IBMPerthDevice
source§impl<'de> Deserialize<'de> for IBMPerthDevice
impl<'de> Deserialize<'de> for IBMPerthDevice
source§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>,
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<IBMPerthDevice> for IBMDevice
impl From<IBMPerthDevice> for IBMDevice
source§fn from(input: IBMPerthDevice) -> Self
fn from(input: IBMPerthDevice) -> Self
source§impl PartialEq for IBMPerthDevice
impl PartialEq for IBMPerthDevice
source§fn eq(&self, other: &IBMPerthDevice) -> bool
fn eq(&self, other: &IBMPerthDevice) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl QoqoDevice for IBMPerthDevice
impl QoqoDevice for IBMPerthDevice
Implements QoqoDevice trait for IBMPerthDevice.
The QoqoDevice trait defines standard functions available for roqoqo 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_0
- The control_0 qubit the gate acts on.control_1
- The control_1 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
A list (Vec) 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>
source§impl Serialize for IBMPerthDevice
impl Serialize for IBMPerthDevice
impl StructuralPartialEq for IBMPerthDevice
Auto Trait Implementations§
impl Freeze for IBMPerthDevice
impl RefUnwindSafe for IBMPerthDevice
impl Send for IBMPerthDevice
impl Sync for IBMPerthDevice
impl Unpin for IBMPerthDevice
impl UnwindSafe for IBMPerthDevice
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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.