MidCircuitDeviceExecutor

Trait MidCircuitDeviceExecutor 

Source
pub trait MidCircuitDeviceExecutor {
    // Required methods
    fn device_id(&self) -> &str;
    fn execute_gate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        gate: &'life1 dyn GateOp,
    ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn measure_qubit<'life0, 'async_trait>(
        &'life0 self,
        qubit: QubitId,
    ) -> Pin<Box<dyn Future<Output = DeviceResult<u8>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn measure_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DeviceResult<HashMap<String, usize>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn synchronize<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn reset_qubit<'life0, 'async_trait>(
        &'life0 self,
        qubit: QubitId,
    ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for device-specific mid-circuit measurement execution

Required Methods§

Source

fn device_id(&self) -> &str

Get device identifier

Source

fn execute_gate<'life0, 'life1, 'async_trait>( &'life0 self, gate: &'life1 dyn GateOp, ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a quantum gate

Source

fn measure_qubit<'life0, 'async_trait>( &'life0 self, qubit: QubitId, ) -> Pin<Box<dyn Future<Output = DeviceResult<u8>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Measure a specific qubit

Source

fn measure_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DeviceResult<HashMap<String, usize>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Measure all qubits

Source

fn synchronize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Synchronize execution (barrier)

Source

fn reset_qubit<'life0, 'async_trait>( &'life0 self, qubit: QubitId, ) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reset a qubit to |0⟩ state

Implementors§