Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.85k stars 2.29k forks source link

Synthesis algorithms for Operators #4311

Closed ajavadia closed 5 months ago

ajavadia commented 4 years ago

We need a general category of synthesis algorithms for things that have exponential descriptions. This basically means things defined by Operator or Statevector. A start of this is under qiskit.quantum_info.synthesis, but a bunch of the algorithms are scattered under qiskit.extensions.quantum_initializer.

Then I think instead of defining these operators as circuit libraries (they are really not), we just have a way to insert operators into circuits, and rely on these synthesis algorithms to give us the corresponding decomposition. This would include: Diagonal, Statevector, Unitary, Clifford, Isometry, etc.

ShellyGarion commented 3 years ago

I can help with handling this issue - could you please assign me to it?

ShellyGarion commented 3 years ago

A few questions:

  1. Where should we put all the synthesis algorithms? Should they all be in qiskit.quantum_info.synthesis ? or in another place?

  2. Should we just move all the functions in qiskit.extensions.quantum_initializer to the synthesis folder?

  3. Here is a list of the relevant synthesis algorithms - are there some more?

mtreinish commented 3 years ago

I think if they're general synthesis (where they go from a quantum_info object or a matrix) to a circuit they should live in qiskit.quantum_info.synthesis. Ideally I feel like the qiskit.extensions module really should be deprecated and we move things from there either to circuits or the circuit library (like the gate classes) and/or quantum_info.

ShellyGarion commented 3 years ago

What about qiskit.transpiler.synthesis? currently it has only graysynth.py. what should be there?

ajavadia commented 3 years ago

Where should we put all the synthesis algorithms? Should they all be in qiskit.quantum_info.synthesis ? or in another place?

I think we can make a separate qiskit.synthesis directory that can contain everything currently under qiskit.quantum_info.synthesis and qiskit.transpiler.synthesis and qiskit.extensions. This would contain all synthesis algorithms which the compiler can use. Some will be from quantum_info objects, and some will not.

Should we just move all the functions in qiskit.extensions.quantum_initializer to the synthesis folder?

Yeah. As Matthew says the extensions folder should be deprecated and removed.

Here is a list of the relevant synthesis algorithms - are there some more?

ajavadia commented 3 years ago

There is a lot here, and there are other open issues on synthesis too (https://github.com/Qiskit/qiskit-terra/issues/4687, https://github.com/Qiskit/qiskit-terra/issues/6038). @ShellyGarion can you please make an Epic from them? The good thing is there are many good synthesis algorithms already implemented in Qiskit, but user interface and compiler interface need work.

ShellyGarion commented 3 years ago

TODO: List of items related to synthesis:

Other relevant issues:

HuangJunye commented 2 years ago

Are we still planning to fix this for 0.20?