mindquantum.algorithm.mapping.SABRE

View Source On Gitee
class mindquantum.algorithm.mapping.SABRE(circuit: Circuit, topology: QubitsTopology)[source]

SABRE algorithm to implement qubit mapping.

For more detail of SABRE algorithm, please refer to Tackling the Qubit Mapping Problem for NISQ-Era Quantum Devices.

Parameters
  • circuit (Circuit) – The quantum circuit you need to do qubit mapping. Currently we only support circuit constructed by one or two qubits gate, control qubit included.

  • topology (QubitsTopology) – The hardware qubit topology. Currently we only support connected coupling graph.

solve(iter_num: int, w: float, delta1: float, delta2: float)[source]

Solve qubit mapping problem with SABRE algorithm.

Parameters
  • iter_num (int) – The iteration number for when solving mapping problem.

  • w (float) – The w parameter. For more detail, please refers to the paper.

  • delta1 (float) – The delta1 parameter. For more detail, please refers to the paper.

  • delta2 (float) – The delta2 parameter. For more detail, please refers to the paper.

Returns

Tuple[Circuit, List[int], List[int]], a quantum

circuit that can execute on given device, the initial mapping order, and the final mapping order.