Liking cljdoc? Tell your friends :D

org.soulspace.qclojure.application.backend

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.
raw docstring

analyze-measurement-resultsclj

(analyze-measurement-results results)

Analyze measurement results and compute statistics.

Parameters:

  • results: Map of measurement outcomes to counts

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
sourceraw docstring

BatchJobBackendcljprotocol

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-resultsclj

(batch-results this batch-job-id)

Get results from a completed batch job.

Parameters:

  • batch-job-id: Identifier for the batch job

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-statusclj

(batch-status this batch-job-id)

Get status of a batch job.

Parameters:

  • batch-job-id: Identifier for the batch job

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-submitclj

(batch-submit this circuits options)
(batch-submit this circuits device options)

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

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
sourceraw docstring

cloud-backend?clj

(cloud-backend? backend)

Check if a backend is a cloud backend.

Parameters:

  • backend: Backend to check

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
sourceraw docstring

CloudQuantumBackendcljprotocol

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.

authenticateclj

(authenticate this credentials)

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

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-costclj

(estimate-cost this circuit options)
(estimate-cost this circuit device options)

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

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-infoclj

(session-info this)

Get current session information including authentication status.

Get current session information including authentication status.
sourceraw docstring

execute-circuitclj

(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:

  • 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 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
sourceraw docstring

execute-circuit-asyncclj

(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:

  • backend: An implementation of QuantumBackend protocol
  • circuit: Quantum circuit to execute
  • options: Execution options

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
sourceraw docstring

MultiDeviceBackendcljprotocol

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.

devicesclj

(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-deviceclj

(select-device this device)

Select the device to use for job submissions.

Select the device to use for job submissions.
sourceraw docstring

QuantumBackendcljprotocol

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?clj

(available? this)

Check if the device is currently available for job submission.

Check if the device is currently available for job submission.

backend-infoclj

(backend-info this)

Get information about this backend including type, capabilities, and configuration.

Get information about this backend including type, capabilities, and configuration.

cancel-jobclj

(cancel-job this job-id)

Cancel a queued or running job.

Cancel a queued or running job.

deviceclj

(device this)

Return the current device.

Returns: Device map

Return the current device.

Returns: Device map

job-resultclj

(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-statusclj

(job-status this job-id)

Get the current status of a submitted job.

Get the current status of a submitted job.

queue-statusclj

(queue-status this)

Get information about the current job queue.

Get information about the current job queue.

submit-circuitclj

(submit-circuit this circuit options)

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.

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.
sourceraw docstring

wait-for-jobclj

(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:

  • 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

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
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close