Can anyone please explain me the ZZFeaureMap, TwoLocal and NLocal in Qiskit. I am able to understand that they are used in some machine learning applications but don't understand how to use them and which one is better?

https://qiskit.org/documentation/stubs/qiskit.circuit.library.TwoLocal.html https://qiskit.org/documentation/stubs/qiskit.circuit.library.ZZFeatureMap.html https://qiskit.org/documentation/stubs/qiskit.circuit.library.NLocal.html Thank you for great help.


1 Answer 1


I'm also learning and I'll share the little I know about it:

These three variational quantum circuit systems are used in QML. The ZZFeatureMap is generally used in the Data Encoding process (turning your numerical input into a quantum state output so that your model can interpret it).

As for NLocal and TwoLocal, they are also two systems of variational quantum circuits but they are normally used as training models in the sense that we work by varying the parameters. Both are made up of blocks of rotation and entanglement gates.

There are simple visualization examples in the Qiskit documentation as you may have already seen

Regarding comparisons, as it is an apparently incipient area, it still seems to me that we are in an Era of study regarding the applications of each. Testing, for example, given a problem which one solves it more efficiently.

Hope I helped in some way.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.