qutip.qip and VQE

97 views
Skip to first unread message

Simon Cross

unread,
Oct 2, 2020, 5:27:41 AM10/2/20
to qu...@googlegroups.com
Hello,

As part of my QSOF mentorship application I started building a fairly
generic VQE library on top of qutip.qip. I'm planning to complete it
and extending it, but I thought I'd ask some questions first:

1. Does something like this already exist?

2. Should it exist outside of QuTiP as its own library? Or does it
belong in qutip.qip.algorithms?

3. Some work in qutip.qip is needed to make it work with the qutip.qip
processors -- they don't seem to currently support loading circuits
with measurement operators. I'm happy to have a go at implementing
that if no one else has plans to do so.

4. The Pauli decomposition of a Hamiltonian is a very small function.
Does it belong somewhere in qutip?

5. Constructing general Pauli measurements (really rotations of the
Pauli term eigenbasis into the computational basis) is a bit more
involved and I still need to support measurements on more than 2
qubits. Assuming I manage to implement this properly, does this belong
anywhere in QuTiP?

Apologies for all the questions in one email.

Yours sincerely,
Simon Cross

Nathan Shammah

unread,
Oct 2, 2020, 5:47:53 AM10/2/20
to qu...@googlegroups.com, Asad Raza, Boxi Li, Sidhant Saraogi
Hi Simon,

Sounds like a great idea to me. As far as I am aware of, QuTiP lacks simple ways to treat hybrid circuits. If you (or a student and collaborator of yours) found it helpful, this task could also seek support from a Unitary Fund grant, if it applies. 

More details here https://unitary.fund/ and here with reference to a specific QuTiP track, 

Adding in cc Asad Raza who has developed QuTiP.qgrad, for autodifferentiation (of Hamiltonians in unitaries). It may at least be seen as a possible plugin model to imitate if this is not fit into QuTiP/qutip. Note that there are plans to spin out QuTiP.qip into qutip-qip package, so that would make more features around qip consistent I guess. 

If you find it appropriate, also in qip.algorithms sounds nice to me.

All other points make sense and would be nice integrations. Sidhant and Boxi have also contributed to the qip processor’s capabilities recently, adding them in copy. 

Bests,

Nathan

--


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/CAD5NRCGoR6DinBrhrQ4hmvcuDdP1y0kgLAdhWqJ7dtR5dEtsXw%40mail.gmail.com.




--
Dr. Nathan Shammah


--
Dr. Nathan Shammah

Boxi Li

unread,
Oct 3, 2020, 5:22:24 AM10/3/20
to QuTiP: Quantum Toolbox in Python
Hi Simon,

Sounds like a great idea to me, too.

> 1. Does something like this already exist?
Not within QuTiP as far as I know. Probably Shahnawaz knows more about these.

> 2. Should it exist outside of QuTiP as its own library? Or does it belong in qutip.qip.algorithms? 
It probably won't be included in the main QuTiP repo for the reason of maintainness. But since qutip.qip is going to be separated out, VQE can certainly be part of it if you would like to. If it is in qutip.qip.algorithms or some other submodules can surely be further discussed.

>  3. Some work in qutip.qip is needed to make it work with the qutip.qip processors -- they don't seem to currently support loading circuits with measurement operators. I'm happy to have a go at implementing that if no one else has plans to do so.
You are right, measurement is not supported by the processor yet. This is new stuff added by Sidhant. In fact, there is so far no classical register in qutip.qip.processor. If you are interested, please feel free to have a go. Happy to help if needed.

> 4. The Pauli decomposition of a Hamiltonian is a very small function. Does it belong somewhere in qutip?
I don't have any idea about this. Probably first implement his inside VQE and if there are demands one can then promote it to the main QuTiP repo?

> 5. Constructing general Pauli measurements (really rotations of the Pauli term eigenbasis into the computational basis) is a bit more involved and I still need to support measurements on more than 2 qubits. Assuming I manage to implement this properly, does this belong anywhere in QuTiP?
I think it could be a nice extension for the measurement part in the main QuTiP repo.

Happy to discuss more!

Best
Boxi

Simon Cross

unread,
Oct 4, 2020, 6:25:29 PM10/4/20
to qu...@googlegroups.com
Thanks Boxi and Nathan for the encouragement and advice!

I'm running an online conference later this week, but I'll start
putting together an implementation PR for qutip.qip.algorithms next
week and we can take it from there! I'll keep the pieces all together
to start with and we can talk about splitting things out into other
places if that seems sensible.

Nathan: Thanks for the suggestion of applying to the Unitary Fund. I'm
going to wait to see what happens with my mentorship application (I
don't want to be juggling too many different official things at once),
but I'll keep it in mind for a bit further down the road.

Yours sincerely,
Simon Cross
Reply all
Reply to author
Forward
0 new messages