qailab.qlauncher.passes.backward

qailab.qlauncher.passes.backward#

Backward pass algorithm implementation in quantum_launcher.

Summary#

Classes:

BackwardPass

Backward Pass, calculates two jacobian matrices: w.r.t.

Reference#

class qailab.qlauncher.passes.backward.BackwardPass(gradient_method: Literal['param_shift', 'spsa', 'lin_comb'] = 'param_shift', shots: int = 1024)[source]#

Bases: ForwardPass

Backward Pass, calculates two jacobian matrices: w.r.t. to input and w.r.t. weights

run(problem: Problem, backend: Backend, formatter: Callable[[...], Any] | None = None) Result[source]#

Runs the algorithm on a specific problem using a backend.

Parameters:
  • problem (Problem) – The problem to be solved.

  • backend (Backend) – The backend to be used for execution.