|
1 | 1 | use crate::byte_message::ByteMessage; |
2 | 2 | use crate::core::shot_results::ShotResult; |
3 | | -use crate::engines::{ControlEngine, Engine, EngineStage, phir, qir}; |
| 3 | +use crate::engines::{ControlEngine, Engine, EngineStage, phir}; |
4 | 4 | use dyn_clone::DynClone; |
5 | 5 | use log::debug; |
6 | 6 | use pecos_core::errors::PecosError; |
@@ -188,36 +188,6 @@ impl Engine for Box<dyn ClassicalEngine> { |
188 | 188 | } |
189 | 189 | } |
190 | 190 |
|
191 | | -/// Sets up a basic QIR engine. |
192 | | -/// |
193 | | -/// This function creates a QIR engine from the provided path. |
194 | | -/// |
195 | | -/// # Parameters |
196 | | -/// |
197 | | -/// - `program_path`: A reference to the path of the QIR program file |
198 | | -/// - `shots`: Optional number of shots to set for the engine |
199 | | -/// |
200 | | -/// # Returns |
201 | | -/// |
202 | | -/// Returns a `Box<dyn ClassicalEngine>` containing the QIR engine |
203 | | -pub fn setup_qir_engine( |
204 | | - program_path: &Path, |
205 | | - shots: Option<usize>, |
206 | | -) -> Result<Box<dyn ClassicalEngine>, PecosError> { |
207 | | - debug!("Setting up QIR engine for: {}", program_path.display()); |
208 | | - let mut engine = qir::QirEngine::new(program_path.to_path_buf()); |
209 | | - |
210 | | - // Set the number of shots assigned to this engine if specified |
211 | | - if let Some(num_shots) = shots { |
212 | | - engine.set_assigned_shots(num_shots)?; |
213 | | - } |
214 | | - |
215 | | - // Pre-compile the QIR library to prepare for efficient cloning |
216 | | - engine.pre_compile()?; |
217 | | - |
218 | | - Ok(Box::new(engine)) |
219 | | -} |
220 | | - |
221 | 191 | /// Sets up a basic PHIR engine. |
222 | 192 | /// |
223 | 193 | /// This function creates a PHIR engine from the provided path. |
|
0 commit comments