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§
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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 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
Sourcefn synchronize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DeviceResult<()>> + 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,
Synchronize execution (barrier)
Sourcefn 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,
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