pub struct CVQuantumDevice {
pub system_type: CVSystemType,
pub num_modes: usize,
pub mode_frequencies: Vec<f64>,
pub gaussian_state: GaussianState,
pub config: CVDeviceConfig,
pub is_connected: bool,
pub measurement_history: Vec<CVMeasurementResult>,
}Expand description
Continuous variable quantum device
Fields§
§system_type: CVSystemTypeSystem type
num_modes: usizeNumber of modes
mode_frequencies: Vec<f64>Mode frequencies (Hz)
gaussian_state: GaussianStateCurrent Gaussian state
config: CVDeviceConfigDevice configuration
is_connected: boolConnection status
measurement_history: Vec<CVMeasurementResult>Measurement results history
Implementations§
Source§impl CVQuantumDevice
impl CVQuantumDevice
Sourcepub fn new(
system_type: CVSystemType,
num_modes: usize,
config: CVDeviceConfig,
) -> DeviceResult<Self>
pub fn new( system_type: CVSystemType, num_modes: usize, config: CVDeviceConfig, ) -> DeviceResult<Self>
Create a new CV quantum device
Sourcepub async fn connect(&mut self) -> DeviceResult<()>
pub async fn connect(&mut self) -> DeviceResult<()>
Connect to the CV quantum hardware
Sourcepub async fn disconnect(&mut self) -> DeviceResult<()>
pub async fn disconnect(&mut self) -> DeviceResult<()>
Disconnect from hardware
Sourcepub async fn displacement(
&mut self,
mode: usize,
amplitude: f64,
phase: f64,
) -> DeviceResult<()>
pub async fn displacement( &mut self, mode: usize, amplitude: f64, phase: f64, ) -> DeviceResult<()>
Apply displacement operation to a mode
Sourcepub async fn squeezing(
&mut self,
mode: usize,
squeezing_param: f64,
phase: f64,
) -> DeviceResult<()>
pub async fn squeezing( &mut self, mode: usize, squeezing_param: f64, phase: f64, ) -> DeviceResult<()>
Apply squeezing operation to a mode
Sourcepub async fn two_mode_squeezing(
&mut self,
mode1: usize,
mode2: usize,
squeezing_param: f64,
phase: f64,
) -> DeviceResult<()>
pub async fn two_mode_squeezing( &mut self, mode1: usize, mode2: usize, squeezing_param: f64, phase: f64, ) -> DeviceResult<()>
Apply two-mode squeezing
Sourcepub async fn beamsplitter(
&mut self,
mode1: usize,
mode2: usize,
transmittance: f64,
phase: f64,
) -> DeviceResult<()>
pub async fn beamsplitter( &mut self, mode1: usize, mode2: usize, transmittance: f64, phase: f64, ) -> DeviceResult<()>
Apply beamsplitter operation
Sourcepub async fn phase_rotation(
&mut self,
mode: usize,
phase: f64,
) -> DeviceResult<()>
pub async fn phase_rotation( &mut self, mode: usize, phase: f64, ) -> DeviceResult<()>
Apply phase rotation
Sourcepub async fn homodyne_measurement(
&mut self,
mode: usize,
phase: f64,
) -> DeviceResult<f64>
pub async fn homodyne_measurement( &mut self, mode: usize, phase: f64, ) -> DeviceResult<f64>
Perform homodyne measurement
Sourcepub async fn heterodyne_measurement(
&mut self,
mode: usize,
) -> DeviceResult<Complex>
pub async fn heterodyne_measurement( &mut self, mode: usize, ) -> DeviceResult<Complex>
Perform heterodyne measurement
Sourcepub async fn reset_mode(&mut self, mode: usize) -> DeviceResult<()>
pub async fn reset_mode(&mut self, mode: usize) -> DeviceResult<()>
Reset a mode to vacuum state
Sourcepub fn get_mode_state(&self, mode: usize) -> DeviceResult<CVModeState>
pub fn get_mode_state(&self, mode: usize) -> DeviceResult<CVModeState>
Get current mode state information
Sourcepub fn get_entanglement_measures(&self) -> CVEntanglementMeasures
pub fn get_entanglement_measures(&self) -> CVEntanglementMeasures
Get system entanglement
Sourcepub async fn get_diagnostics(&self) -> CVDeviceDiagnostics
pub async fn get_diagnostics(&self) -> CVDeviceDiagnostics
Get device diagnostics
Trait Implementations§
Source§impl QuantumDevice for CVQuantumDevice
impl QuantumDevice for CVQuantumDevice
Source§fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the device is available for use
Source§fn qubit_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn qubit_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the number of qubits on the device
Source§fn properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<HashMap<String, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<HashMap<String, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get device properties such as error rates, connectivity, etc.
Source§fn is_simulator<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_simulator<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the device is a simulator
Auto Trait Implementations§
impl Freeze for CVQuantumDevice
impl RefUnwindSafe for CVQuantumDevice
impl Send for CVQuantumDevice
impl Sync for CVQuantumDevice
impl Unpin for CVQuantumDevice
impl UnwindSafe for CVQuantumDevice
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.