qiskit-advocate / qamp-fall-22

Qiskit advocate mentorship program (QAMP) fall 22 cohort (Sep - Dec 2022)
15 stars 7 forks source link

Adding a "no-inline" option to Qiskit transpiler #16

Closed nelimee closed 1 year ago

nelimee commented 1 year ago

Description

Qiskit QuantumCircuit is able to represent the concept of subroutines (represented with instances of Instruction), i.e., a re-usable piece of code that implements a function. But Qiskit transpiler and most of its passes are not made to work on such a hierarchical structure, which is why all the preset levels of optimisation start by unrolling the instruction definitions in order to obtain a "flat" quantum circuit. Classical compilers are also performing "unrolling" (called inlining in the classical context) but only on some cases where not inlining would actually hit performance badly.

The benefits of having a transpiler capable of working on the hierarchical structure composed of QuantumCircuit and Instruction are multiple:

Deliverables

This is a significant work that will probably require a lot of feedback. As such, here is a list of potential deliverable in increasing level of difficulty/work needed. The expected deliverable(s) will depend on the number and profiles of mentees.

  1. Prepare a written document summarising the changes that would be needed to the current code base to introduce the "no-inline" feature.
  2. Fork Qiskit transpiler (qiskit-terra) and provide a proof-of-concept of a transpiler able to transpile QuantumCircuit instances containing classical-feedback features.
  3. Fork Qiskit transpiler (qiskit-terra) and provide a proof-of-concept of a transpiler able to transpile QuantumCircuit instances containing classical-feedback features and that does not systematically unroll the subroutines found in the circuit.
  4. Introduce an option to let the transpiler optimise gates at the interface of different subroutines.

Mentors details

Number of mentees

2

Type of mentees

As this is my first experience being a QAMP mentor I feel like 2 mentees maximum would be nice. Nevertheless, if 3 people are very interested in this I might be OK to mentor 3 people, depending on the mentees and the amount of time I will be able to dedicate to this session of QAMP.

Pranshi24 commented 1 year ago

Hi @nelimee I am interested in working on this project, I am working as a Quantum Researcher at Deloitte, and I have experience in using Qiskit as well. This will be a good experience for me. Let me know if we can connect on Slack to discuss more.

rkfqns13 commented 1 year ago

I’m mentee of this project !

rkfqns13 commented 1 year ago

@GemmaDawson Please assign me. I'm Juon Kim (the mentee of this project !)

rkfqns13 commented 1 year ago

@GemmaDawson Can you assign me again? I removed it for mistake

GemmaDawson commented 1 year ago

Please add your Checkpoint 1 presentation materials.

rkfqns13 commented 1 year ago

Checkpoint1_#16.pdf

nelimee commented 1 year ago

Checkpoint2_#16.pdf Checkpoint2_#16-image.png

GemmaDawson commented 1 year ago

@nelimee you still need to upload your image.

GemmaDawson commented 1 year ago

@rkfqns13 & @Pranshi24 - please upload your Final Showcase presentation materials, and if needed, update the project Title and/or description.

rkfqns13 commented 1 year ago

Checkpoint3_#16.pdf

GemmaDawson commented 1 year ago

Congratulations on completing all the requirements for QAMP Fall 2022!! 🌟🌟🌟