Quantum Annealing with mesolve in QuTiP

196 views
Skip to first unread message

Aki

unread,
Jul 28, 2023, 1:21:30 AM7/28/23
to QuTiP: Quantum Toolbox in Python
I am currently making on a program using QuTiP to simulate the physical behavior of quantum annealing using "mesolve". The attached program uses pyqubo to create an Ising model for a 4-point traveling salesman problem, and aims to solve this Ising model using quantum annealing.
In principle, as the computation time (defined as time in the program) in quantum annealing is increased, the expected value of the ideal state increases. However, in this program, there is a phenomenon in which the expected value decreases as the value of the computation time is increased.
I would like to know the solution to this problem.
salesman.py

Neill Lambert

unread,
Aug 1, 2023, 12:39:02 AM8/1/23
to qu...@googlegroups.com
Dear Aki,

I had a quick play around with your code. It is very interesting, thanks for sharing. I have never actually messed around with qubo+annealing things before, but after looking at the pyqubo documentation i spotted a couple of things;

1) you put a minus sign on H0 terms...  wasn't clear to me why?
2) i am not sure where you get the ideal solution from, but i think it might be inverted with respect to the spin basis?

to check the above i removed the minus signs on H0, swapped the basis in eket so it reads:
eket0 = tensor([basis(2,0) if (33345>>i) & 1 else basis(2,1) for i in range(N)])
I also looked at the solutions provided by sa = neal.SimulatedAnnealingSampler().  
eket0 and neal both gave an energy of -18.05

In making these two changes, I found for time =100, the overlap with the modified eket0 and one of the low energy solutions from neal was:
0.20110908112627024
with an energy of -17.887669020610808

for time 200, i see an overlap of 
0.3401019799776224
with an energy of -17.975861565097063

which seems reasonable?  Again, I am not an expert on this, so maybe theres good reasons for the two issues I mentioned above. also, I think there seemed to be multiple optimal solutions from neal.SimulatedAnnealing,  so 
perhaps the fidelity as defined will never go very high

i think your example is very nice, maybe when you are finished you might want to contribute it to qutip-tutorials?  though i am not sure if having a pyqubo dependency will be ok.

all the best
neill

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/7fbfb0ae-49ae-4b9c-963f-75b46cc5c484n%40googlegroups.com.


--
-----------------------------------
Senior Research Scientist
RIKEN, Japan
Research Homepage
Reply all
Reply to author
Forward
0 new messages