Skip to content

Clean-up #47

@eggerdj

Description

@eggerdj

What should we add?

We need to clean-up the transpilation part of the best-practices. This involves making the annotated transpilation the default. Ideally, from the user's perspective the workflow should look like the following (in pseudo code):

cost_op = ...  # cost-operator obtained from an optimization modelling framework

# SAT mapping to pre-process the cost operator
sat_mapper = SATMapper()
mapped_op = sat_mapper.remap_with_sat(cost_op, swap_strategy)

# Qubit selection based on a subclass of BackendEvaluator
qubit_evaluator = ChildOfBackendEvaluator(backend)
qubit_layout = qubit_evaluator.find(mapped_op)

# Prepare the transpilation pass
config = {
    "initial_layout": qubit_layout,
    "swap_strategy": swap_strategy,
}
pm = preset_qaoa_passmanager(backend, **config)

ansatz = annotated_qaoa_ansatz(cost_op, reps=2)

isa_ansatz = pm.run(ansatz)  # A hardware ready circuit

This objective defines the following set of TODOs:

  • Allow the SAT mapper to accept cost operators as input. (See PR Refactor the qaoa preset pass manager #48 )
  • Create the function preset_qaoa_passmanager by refactoring qaoa_swap_strategy_pm in preset_qaoa_passmanager.py (See PR Refactor the qaoa preset pass manager #48 )
  • Allow more flexibility in the qubit evaluation and support more options (e.g. HW native)
  • Make the annotated functionality centre stage by giving the different classes their own files.
  • Make it clear the the pauli-evolution is for older Qiskit version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions