Closed OuCheng-Fu closed 1 year ago
The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.
I am not quite sure what is meant by are fragmented
. In any case evolvers
in Qiskit Terra are deprecated and replaced by the time_evolvers
which work with the new primitives. So any new content should use time_evolvers
.
I will just note #1391 since its also around time evolution tutorials and references the same nature paper in the issue
The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.
I am not quite sure what is meant by
are fragmented
. In any caseevolvers
in Qiskit Terra are deprecated and replaced by thetime_evolvers
which work with the new primitives. So any new content should usetime_evolvers
.I will just note #1391 since its also around time evolution tutorials and references the same nature paper in the issue
Thank you. I will try it.
The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.
I am not quite sure what is meant by
are fragmented
. In any caseevolvers
in Qiskit Terra are deprecated and replaced by thetime_evolvers
which work with the new primitives. So any new content should usetime_evolvers
.I will just note #1391 since its also around time evolution tutorials and references the same nature paper in the issue
I have tried the VarQITE module of Qiskit as mentioned in #1391, and when I tried to implement an Ising Hamiltonian based on Quadratic Program, and I got an unsupported type of parameter values, the error is mentioned in this picture: I read the source code several times but I can't find the problem, what is the real problem of this?
I commented in the PR that is adding a tutorial that is the same as this here
https://github.com/Qiskit/qiskit-tutorials/issues/1454#issuecomment-1574893830
I imagine this is the method that is checking it https://github.com/Qiskit/qiskit-terra/blob/332bd9fe0bea82c0fdf7329cea3da115d86e3fc2/qiskit/algorithms/time_evolvers/variational/var_qte.py#L234, maybe that's of help, where param_values seems to relate to initial_parameters passed. You can see the type checks its doing and the failing type should have been part of the error message.
Thank you. I will look up into it.
I commented in the PR that is adding a tutorial that is the same as this here
I imagine this is the method that is checking it https://github.com/Qiskit/qiskit-terra/blob/332bd9fe0bea82c0fdf7329cea3da115d86e3fc2/qiskit/algorithms/time_evolvers/variational/var_qte.py#L234, maybe that's of help, where param_values seems to relate to initial_parameters passed. You can see the type checks its doing and the failing type should have been part of the error message.
My reference is this picture I tried several times by first adding a list and second adding a dictionary to my code, when I added dictionary Sequence like this picture It comes out another error Unhashable Type: 'Parameter View' where can I find parameter view?
Maybe check this unit test out which sets up initial parameters for VatQITE and works https://github.com/Qiskit/qiskit-terra/blob/81964e649938ce7b201364013e4fe17098e4533c/test/python/algorithms/time_evolvers/variational/test_var_qite.py#L189
According to docs
initial_parameters (Mapping[Parameter, float] | Sequence[float]) – Initial parameter values for the ansatz.
So it should be a Sequence (list) of float values, which will give the values in the order of the Parameters they are returned by parameters, or a Mapping (dictionary) which allows you to state which parameter gets which value explicitly, rather than implicitly by the list.
Thank you. I will try it again.
Maybe check this unit test out which sets up initial parameters for VatQITE and works https://github.com/Qiskit/qiskit-terra/blob/81964e649938ce7b201364013e4fe17098e4533c/test/python/algorithms/time_evolvers/variational/test_var_qite.py#L189
According to docs
initial_parameters (Mapping[Parameter, float] | Sequence[float]) – Initial parameter values for the ansatz.
So it should be a Sequence (list) of float values, which will give the values in the order of the Parameters they are returned by parameters, or a Mapping (dictionary) which allows you to state which parameter gets which value explicitly, rather than implicitly by the list.
I have implemented it on a 5-vertex MaxCut Problem With the Hamiltonian Then I print the evolution result If I want to know the minimum eigenvalue of the system, like QAOA, what should I write the code
Maybe check this unit test out which sets up initial parameters for VatQITE and works https://github.com/Qiskit/qiskit-terra/blob/81964e649938ce7b201364013e4fe17098e4533c/test/python/algorithms/time_evolvers/variational/test_var_qite.py#L189
According to docs
initial_parameters (Mapping[Parameter, float] | Sequence[float]) – Initial parameter values for the ansatz.
So it should be a Sequence (list) of float values, which will give the values in the order of the Parameters they are returned by parameters, or a Mapping (dictionary) which allows you to state which parameter gets which value explicitly, rather than implicitly by the list.
Can I open another issue to talk about this thing?
Qiskit has a Slack workspace for discussions, support etc. You can see the link in the "Stay Connected" section, which is in the bottom bar of the qiskit.org home page. I replicate here for convenience https://qisk.it/join-slack
Qiskit has a Slack workspace for discussions, support etc. You can see the link in the "Stay Connected" section, which is in the bottom bar of the qiskit.org home page. I replicate here for convenience https://qisk.it/join-slack
I have joined the slack workspace. What channel should I post my questions on?
There are channels for various aspects of Qiskit and Qiskit Ecosystem there, so best to post it in one that is most relevant - e.g If the question relates to functionality in qiskit-terra then #terra etc. And since QITE is part of qiskit-terra then questions regarding that would seem appropriate there. Now there is a #general channel too for more general questions evidently and if you are unsure where to ask, but I think the channels are pretty obvious. You can also search the workspace to see it something like that has been asked/answered before etc.
There are channels for various aspects of Qiskit and Qiskit Ecosystem there, so best to post it in one that is most relevant - e.g If the question relates to functionality in qiskit-terra then #terra etc. And since QITE is part of qiskit-terra then questions regarding that would seem appropriate there. Now there is a #general channel too for more general questions evidently and if you are unsure where to ask, but I think the channels are pretty obvious. You can also search the workspace to see it something like that has been asked/answered before etc.
Thank you. I have posted it on terra.
The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.
I am not quite sure what is meant by
are fragmented
. In any caseevolvers
in Qiskit Terra are deprecated and replaced by thetime_evolvers
which work with the new primitives. So any new content should usetime_evolvers
. I will just note #1391 since its also around time evolution tutorials and references the same nature paper in the issueI have tried the VarQITE module of Qiskit as mentioned in #1391, and when I tried to implement an Ising Hamiltonian based on Quadratic Program, and I got an unsupported type of parameter values, the error is mentioned in this picture: I read the source code several times but I can't find the problem, what is the real problem of this?
I have tried the same code on a 5-vertex Maxcut Problem like the comment https://github.com/Qiskit/qiskit-tutorials/issues/1454#issuecomment-1595952663 It took me around 3 minutes on my Windows 10 computer to have the result already mentioned in the comment. However, When I want to implement the same code on the Hamiltonian of HCP Problem of this graph, like the pictures below The Hamiltonian is Then it continues to run for more than 10000 minutes on my Windows 10 computer, my computer has not been turned off for more than 10 days, like this picture What is the problem?
The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.
I am not quite sure what is meant by
are fragmented
. In any caseevolvers
in Qiskit Terra are deprecated and replaced by thetime_evolvers
which work with the new primitives. So any new content should usetime_evolvers
. I will just note #1391 since its also around time evolution tutorials and references the same nature paper in the issueI have tried the VarQITE module of Qiskit as mentioned in #1391, and when I tried to implement an Ising Hamiltonian based on Quadratic Program, and I got an unsupported type of parameter values, the error is mentioned in this picture: I read the source code several times but I can't find the problem, what is the real problem of this?
I have tried the same code on a 5-vertex Maxcut Problem like the comment #1454 (comment) It took me around 3 minutes on my Windows 10 computer to have the result already mentioned in the comment. However, When I want to implement the same code on the Hamiltonian of HCP Problem of this graph, like the pictures below The Hamiltonian is Then it continues to run for more than 10000 minutes on my Windows 10 computer, my computer has not been turned off for more than 10 days, like this picture What is the problem?
This is the update of the previous problem. The code has already run for more than 18000 minutes, and my computer has not been shut down for more than 13 days, like this picture below Is this normal? Or is there a problem? If there is a problem, how do I solve it?
What is the expected behavior?
Create a tutorial about Quantum Imaginary Time Evolution mentioned in these papers: 1.arXiv:2108.10846 2.https://www.nature.com/articles/s41534-021-00409-y 3.arXiv:1901.07653 The tutorial https://qiskit.org/documentation/_modules/qiskit/algorithms/evolvers/evolution_problem.html#EvolutionProblem and https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/algorithms/evolvers are fragmented.