Protocol and interface for quantum computing hardware backends.
This namespace defines the protocols for connecting to and executing quantum circuits on real quantum hardware or simulators. It provides a clean abstraction layer that allows the application to work with different quantum computing providers and simulators.
Protocol and interface for quantum computing hardware backends. This namespace defines the protocols for connecting to and executing quantum circuits on real quantum hardware or simulators. It provides a clean abstraction layer that allows the application to work with different quantum computing providers and simulators.
(analyze-measurement-results results)
Analyze measurement results and compute statistics.
Parameters:
Returns: Map with probabilities and statistics
Analyze measurement results and compute statistics. Parameters: - results: Map of measurement outcomes to counts Returns: Map with probabilities and statistics
Protocol for backends that support batched job submissions.
This protocol extends the basic QuantumBackend with functionality for submitting and managing batches of quantum circuits.
Protocol for backends that support batched job submissions. This protocol extends the basic QuantumBackend with functionality for submitting and managing batches of quantum circuits.
(batch-results this batch-job-id)
Get results from a completed batch job.
Parameters:
Returns: Map of individual job results
Get results from a completed batch job. Parameters: - batch-job-id: Identifier for the batch job Returns: Map of individual job results
(batch-status this batch-job-id)
Get status of a batch job.
Parameters:
Returns: Status information for all jobs in the batch
Get status of a batch job. Parameters: - batch-job-id: Identifier for the batch job Returns: Status information for all jobs in the batch
(batch-submit this circuits options)
(batch-submit this circuits device options)
Submit multiple circuits as a batch job.
Parameters:
Returns: Batch job ID for tracking all submissions
Submit multiple circuits as a batch job. Parameters: - circuits: Collection of quantum circuits - options: Execution options applied to all circuits Returns: Batch job ID for tracking all submissions
(cloud-backend? backend)
Check if a backend is a cloud backend.
Parameters:
Returns: True if the backend implements CloudQuantumBackend protocol
Check if a backend is a cloud backend. Parameters: - backend: Backend to check Returns: True if the backend implements CloudQuantumBackend protocol
Extended protocol for cloud-based quantum computing backends.
This protocol extends the basic QuantumBackend with cloud-specific functionality including authentication, device topology, cost estimation, and batch operations.
Extended protocol for cloud-based quantum computing backends. This protocol extends the basic QuantumBackend with cloud-specific functionality including authentication, device topology, cost estimation, and batch operations.
(authenticate this credentials)
Authenticate with the cloud quantum service.
Parameters:
Returns: Authentication token or session information
Authenticate with the cloud quantum service. Parameters: - credentials: Map containing authentication information (e.g., {:username 'user' :password 'pass'} or {:api-key 'key'}) Returns: Authentication token or session information
(estimate-cost this circuit options)
(estimate-cost this circuit device options)
Estimate the cost of executing a circuit.
Parameters:
Returns: Cost estimation information
Estimate the cost of executing a circuit. Parameters: - circuit: Quantum circuit to estimate cost for - options: Execution options including shots and device Returns: Cost estimation information
(session-info this)
Get current session information including authentication status.
Get current session information including authentication status.
(execute-circuit backend circuit)
(execute-circuit backend circuit options)
Execute a quantum circuit on the specified backend.
This is a convenience function that handles the full workflow: submit circuit, wait for completion, and return results.
Parameters:
Returns: Job result map with measurement outcomes
Execute a quantum circuit on the specified backend. This is a convenience function that handles the full workflow: submit circuit, wait for completion, and return results. Parameters: - backend: An implementation of QuantumBackend protocol - circuit: Quantum circuit to execute - options: Execution options (defaults: {:shots 512}) Returns: Job result map with measurement outcomes
(execute-circuit-async backend circuit)
(execute-circuit-async backend circuit options)
Execute a quantum circuit asynchronously.
Returns immediately with a job ID. Use get-job-status and get-job-result to track progress and retrieve results.
Parameters:
Returns: Job ID string
Execute a quantum circuit asynchronously. Returns immediately with a job ID. Use get-job-status and get-job-result to track progress and retrieve results. Parameters: - backend: An implementation of QuantumBackend protocol - circuit: Quantum circuit to execute - options: Execution options Returns: Job ID string
Protocol for backends that support multiple quantum devices.
This protocol extends the basic QuantumBackend with functionality for managing and selecting among multiple devices.
Protocol for backends that support multiple quantum devices. This protocol extends the basic QuantumBackend with functionality for managing and selecting among multiple devices.
(devices this)
List all quantum devices available on this backend.
Returns: Collection of device maps
List all quantum devices available on this backend. Returns: Collection of device maps
(select-device this device)
Select the device to use for job submissions.
Select the device to use for job submissions.
Protocol for quantum computing hardware backends.
This protocol defines the interface that all quantum backends must implement, whether they are simulators, cloud services, or local hardware.
Protocol for quantum computing hardware backends. This protocol defines the interface that all quantum backends must implement, whether they are simulators, cloud services, or local hardware.
(available? this)
Check if the device is currently available for job submission.
Check if the device is currently available for job submission.
(backend-info this)
Get information about this backend including type, capabilities, and configuration.
Get information about this backend including type, capabilities, and configuration.
(cancel-job this job-id)
Cancel a queued or running job.
Cancel a queued or running job.
(device this)
Return the current device.
Returns: Device map
Return the current device. Returns: Device map
(job-result this job-id)
Get the results of a completed job.
Returns: A map containing measurement results and statistics.
Get the results of a completed job. Returns: A map containing measurement results and statistics.
(job-status this job-id)
Get the current status of a submitted job.
Get the current status of a submitted job.
(queue-status this)
Get information about the current job queue.
Get information about the current job queue.
(submit-circuit this circuit options)
Submit a quantum circuit for execution.
Parameters:
Returns: A job ID for tracking the execution.
Submit a quantum circuit for execution. Parameters: - circuit: A quantum circuit from qclojure.domain.quantum-circuit - options: Execution options including shot count and result spec Returns: A job ID for tracking the execution.
(wait-for-job backend job-id)
(wait-for-job backend job-id timeout-ms)
Wait for a job to complete and return the result.
Parameters:
Returns: Job result map
Wait for a job to complete and return the result. Parameters: - backend: The backend where the job was submitted - job-id: Job identifier - timeout-ms: Maximum time to wait in milliseconds (default: 30000) Returns: Job result map
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |