Required package:
pip install ipykernel qiskit pillow pylatexenc matplotlib qiskit[visualization] qiskit-ibm-runtime- Benchmarking:
pip install mqt.bench openpyxlfor 5_benchmarking.ipynb and 6_table_plot.ipynb
Build coupling graph map with available layout are: full, line, ring, grid, t_horizontal, t_vertical
- Convert quantum circuit to Direct Acyclic Graph (DAG)
- Apply
InteractionLayoutmapping of the DAG to coupling map - Rank all maps with Qubit Neighbourhood Value (QBN)
- Print best logical-to-physical with highest QBN value
- Convert quantum circuit to DAG
- Apply
InteractionLayoutmapping - Display mapped quantum circuit and logical to physical coupling map
- Convert quantum circuit to DAG
- Apply interaction layout mapping and retrieve the best layout
- Apply the mapping and fill out any empty ancilla
- Use dynamic
LookaheadSwaprouting - Show added SWAP gates and the decomposed quantum circuit (a swap gate consists of 3 CX gates)
- Compare between BasicSwap, SabreSwap, and LookaheadSwap and the total number of added swap gates
- Transpile quantum circuit using SabreSwap and LookaheadSwap
- Run both jobs on simulated backend, get the probability counts
- Compare the result of the highest occurence between SabreSwap and LookaheadSwap
- If 70% of the highest occurences are similar, it can be concluded that the results from LookeaheadSwap are correct
- Try with several layouts
- Save in JSON tree structure: circuit_size -> algorithm_name -> size, depth, swap, interval
use routing: BasicSwap, SabreSwap, and LookaheadSwap
filename:result/benchmarking_FINAL.json
- parse json result in Panda DataFrame
- sorted by benchmark and layout
- print data in table format in file
.texin folder latex - save data in
.xlsxin folder excel
| Layout | Number of qubits | Number of groups |
|---|---|---|
| Full | 20 | 1 |
| Full | 10 | 2 |
| Grid | 9 | 2 |
| Ring | 10 | 2 |
| Full | 7 | 3 |
| Grid | 8 | 3 |
| Ring | 7 | 3 |
| Full | 5 | 4 |
| Grid | 6 | 4 |
| Ring | 5 | 4 |
| T Horizontal | 5 | 4 |
| T Vertical | 5 | 4 |
| Line | 1 | 20 |