qplex.workflows package

Submodules

qplex.workflows.ggae_workflow module

qplex.workflows.ggae_workflow.ggae_workflow(model: Model, solver: Solver, options: ExecutionConfig)[source]

Runs the GGAEM (Generalized Gate-Based Algorithm Execution Manager) workflow.

Parameters:
  • model (Model) – The optimization model to be solved.

  • solver (Solver) – The solver to be used for solving the model.

  • options (Options) – A dictionary containing configuration options for the workflow.

Returns:

A dictionary of optimal parameter counts.

Return type:

dict

qplex.workflows.ibm_session_workflow module

qplex.workflows.ibm_session_workflow.compute_counts(params, solver, qc, sampler)[source]

Computes the measurement results (bitstring counts) for a given set of parameters.

This function binds the parameters to the quantum circuit, runs the circuit using the provided sampler, and parses the raw measurement results into meaningful counts.

Parameters:
  • params (np.ndarray) – An array of parameters to assign to the quantum circuit.

  • solver (Solver) – The solver instance responsible for running the quantum circuit and processing the results.

  • qc (QuantumCircuit) – The transpiled quantum circuit.

  • sampler (Sampler) – The sampler instance responsible for running the quantum circuit on the quantum backend.

Returns:

A dictionary of bitstring counts representing the measurement results from the quantum execution.

Return type:

dict

qplex.workflows.ibm_session_workflow.run_ibm_session_workflow(model: Model, ibmq_solver, options: ExecutionConfig)[source]

Executes a quantum optimization workflow using IBM Quantum Runtime.

Parameters:
  • model (Model) – The optimization model to be solved, typically formulated as a QUBO.

  • ibmq_solver (Solver) – The IBM Quantum solver instance responsible for managing the quantum backend, parsing input, and processing the results.

  • options (Options) – A dictionary containing configuration options for the workflow.

Returns:

A dictionary representing the optimal measurement results (bitstring counts) obtained after optimizing the quantum circuit’s parameters.

Return type:

dict

Module contents