Quantum computing in J

56 views
Skip to first unread message

Jan-Pieter Jacobs

unread,
Aug 10, 2024, 12:04:52 PMAug 10
to fo...@jsoftware.com
Hi all,

Recently, I've been getting into quantum computing. To help my understanding, I started writing stuff in J, to get a better hang of what is going on. J fit the bill precisely, as quantum computing is mostly manipulations of complex matrices. As usual, things got a bit out of hand, and it grew into something I think could be useful to others exploring quantum computing as well, keeping in mind it is a bit of a work in progress, and things might be changed around later on.

You can install it straight from Github using install'github:jpjacobs/general_qcj' on any current J, including the J playground.

The file '~addons/general/qcj/examples.ijs' contains some examples, from simple single state manipulations and visualisation, to quantum teleportation.

It also comes with a help function 'fh' for find help (try e.g. fh ' fh ')

All comments, ideas etc are welcome.

Best regards,
Jan-Pieter

Jose Mario Quintana

unread,
Aug 12, 2024, 11:48:18 AMAug 12
to fo...@jsoftware.com
You might be interested to take a look at the following:

JQuantumAlgebra
https://github.com/mcastagna/JQuantumAlgebra

A former employee produced this package as an exercise while learning to write tacitly. All the verbs are tacit with one exception (measureQubit). (It is not difficult to produce a tacit version of that verb, but he was a beginner at that stage.)



To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

LdBeth

unread,
Aug 12, 2024, 12:10:36 PMAug 12
to fo...@jsoftware.com
Just post mine take on this subject, I made the script just to
complete the Xanadu codebook https://codebook.xanadu.ai/ that is
supposed to be done in Python, so it is not very complete or
organized.

However I got stuck at implementing Schmidt decomposition from the
textbooks description and examples, and the python implementation
isn't very readable to me so I stopped working on the script since
then.

q.ijs

Jan-Pieter Jacobs

unread,
Aug 13, 2024, 8:41:21 AMAug 13
to fo...@jsoftware.com

Thanks to both for sharing. I'll go through your scripts in more detail when I have some time, but at first sight we all implemented similar functionality.
It's fun to see how many parallels there are in the implementations in all scripts.

Jan-Pieter


Reply all
Reply to author
Forward
0 new messages