12

I saw 2 efforts in that direction: WSS17 and WSS16, but I am not sure if there is something in the latest Mathematica that actually allows users to simulate quantum gates.

Can anyone please point me to the current state of the art way to do Quantum Computing in Mathematica?

Alexey Golyshev
  • 9,526
  • 2
  • 27
  • 57
0x90
  • 599
  • 5
  • 16
  • There isn't anything documented in the current version. I would comment on those W Community threads and ask for the package. – Szabolcs Jan 29 '18 at 20:35
  • @Szabolcs any 3rd parties alternatives. – 0x90 Jan 29 '18 at 20:37
  • I think it really depends on what you mean with "Doing QC in MMA". If you mean using MMA as an interface to program a QC (e.g. the IBM experience or the Rigetti machine), I'm not aware of anything in that direction. Instead, if you mean using MMA for simulating small quantum algorithms with your "classical laptop", there are some packages around (e.g. link ) but I'm not a big fan of those. Also, it really depends on what kind of QC are you interested in. I personally write my own codes/packages and atm I think is the best solution. – Fraccalo Jul 31 '18 at 13:38
  • @Fraccalo simulating stuff. – 0x90 Jul 31 '18 at 13:52
  • 1
    This April fools post actually has some relevant info in the “Quantum” section. http://blog.stephenwolfram.com/2018/04/buzzword-convergence-making-sense-of-quantum-neural-blockchain-ai/ – Greg Hurst Jul 31 '18 at 15:24

3 Answers3

8

As Mathematica has most necessary matrix algebra functions (crucially the matrix exponential) built in natively (both for symbolic and numerics) it is quite simple to roll most things yourself. For more complicated manipulations QuantumUtils is useful (disclaimer this was made by some colleagues).

I should point out that the focus of this library is not on building and simulating algorithms (although possible) but the description and manipulation of quantum channels and hamiltonians. Hamiltonian simulation and GRAPE pulse design is also baked in.

ThomasAlexander
  • 181
  • 1
  • 3
  • 1
    Do you want to elaborate more or show some example? – 0x90 Aug 01 '18 at 11:46
  • 4
    @0x90 The question is very broad, so a broad answer is all I'd expect. – Jens Aug 01 '18 at 15:03
  • @Jens maybe, but in the answer there is a specific link to a library an example in such a popular answer is reasonable thing to expect. – 0x90 Aug 02 '18 at 12:46
  • If you give a more specific example of what you'd like to do, it could well turn out that someone will post a solution without need for any package, since Mathematica already contains all the needed functionality. Most external packages seem to spend the bulk of their effort on wrapping this existing functionality in more traditional form. Unless you really want a port of Mathematica to the D-Wave hardware... – Jens Aug 02 '18 at 14:50
  • 1
    @0x90 As Jens points out, it's hard to show specific examples. For example, HadamardMatrix[2].{{1}, {0}} if you want is already a quantum circuit, and it's done with a built-in MMA function. Also, you have PauliMatrix[n] that gives you basic single qubit operations. And if you also add a CNOT ({{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}}) you can simulate a universal quantum computer with your pc, all without any external library :D – Fraccalo Aug 04 '18 at 08:43
  • 1
    @Fraccalo And don't forget the secret sauce, KroneckerProduct for multi-"qbit" states, see my answer here – Jens Aug 05 '18 at 03:55
3

Completely out of my domain of expertise, however I stumbled across the "Live CEOing" videos Wolfram is doing on YouTube. Quantum computing seems to be a focus. For example:

https://www.youtube.com/watch?v=-1VX6dDrb_Y

Looks to be destined for the Wolfram Language and Mathematica in the future. Not sure if it is of interest to you, but thought I would mention it. Clearly not something available now though.

flyingmind
  • 489
  • 2
  • 10
2

Yes, there is the Wolfram Quantum Framework, here are some useful links.

https://community.wolfram.com/groups/-/m/t/2416125 https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/QuantumFramework/

"The Wolfram Quantum Framework brings a broad, coherent design for quantum computation, together with a host of leading-edge capabilities and full integration into Mathematica and Wolfram Language. Starting from discrete quantum mechanics, the Framework provides a high-level symbolic representation of quantum bases, states and operators. The Framework can perform measurements and is equipped with various well-known states and operators, such as Bell states and Pauli operators. Using such simulation capabilities as a foundation, one can use the Framework to model and simulate quantum circuits and algorithms.

All functions and objects in the Wolfram Quantum Framework work seamlessly with the 5,000+ built-in functions made available through Wolfram Language. The immediate availability of such functions allows one to study a full range of questions around quantum computation and can serve as a helpful resource for teaching."

johndaly
  • 21
  • 2