Linked Questions

39 votes
6 answers
8k views

Having the derivative be an operator

How do I create an operator which acts like a derivative to everything to the right of it: for example: $ \left( \partial_x + \partial_y + z \right ) x \psi $ How do I make that evaluate to: $x \...
Andrew Spott's user avatar
  • 1,581
11 votes
2 answers
12k views

Defining quantum-mechanical Bra and Ket operations

I have the following ket in the Fock basis: $\vert3, 0 ,1\rangle$, where each entry defines the number of photons in a particular mode and can take any one of the following numbers: 0, 1, 2, 3. As a ...
Sid's user avatar
  • 977
12 votes
3 answers
3k views

Is there a way to do Quantum Computing in Mathematica notebook?

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 ...
0x90's user avatar
  • 599
12 votes
1 answer
1k views

multiplication of vector spaces

Original Question Disclaimer: The question motivated by the product of Hilbert spaces which arises from separate degrees of freedom which a system might contain in quantum technical system. Examples ...
Yair M's user avatar
  • 601
4 votes
1 answer
2k views

Hadamard Lemma and commutators algebra

I would like to implement the following formula, which goes under the name of Hadamard Lemma: $ e^A \, B \, e^{-A} = \sum_{k=0}^{+\infty} \frac{1}{k!} [A,B]_k $ where $ [A,B]_0 = B , \...
AndreaPaco's user avatar
1 vote
1 answer
378 views

Convert, using the Pauli matrices, an $n \times m$ matrix of quaternions into a $2 n \times 2 m$ matrix with complex entries, and vice versa

I'd like to go between $n \times m$ matrices with quaternionic entries to (using, it would seem, the Pauli matrix conversion scheme) to $2 n \times 2 m$ matrices with complex entries, and vice versa. ...
Paul B. Slater's user avatar
2 votes
1 answer
720 views

Multiply out product of sums

For a specific quantum mechanical problem I need to multiply out operators in order to calculate a trace by hand. For example I need a Hamiltonian squared with $H^2$. The Hamiltonian contains of a few ...
pbx's user avatar
  • 842
2 votes
0 answers
659 views

Outer product using the quantum mathematica package

I am using the quantum Mathematica package and am trying to do computations that require me to use the outer (tensor) products of Pauli matrices. I would define this as, for example, ...
user39257's user avatar
1 vote
1 answer
267 views

Forming Kronecker products for "non-adjacent" vector spaces

In quantum mechanics, we often want to build operators acting on multiple particles by simply "Kronecker-ing" operators from the single-particle spaces. That is, if I have some matrix $A$ acting on ...
miggle's user avatar
  • 667
0 votes
0 answers
176 views

Is it possible to perform the following computation in mathematica?

Consider the following defined commutation relations: $$[\hat a,\hat a^{\dagger}]=1$$ $$[\hat b,\hat b^{\dagger}]=1$$ $$[\hat a,\hat b]=0$$ (where the usual algebra of commutators holds) Let us now ...
Lost's user avatar
  • 226
3 votes
0 answers
98 views

Pattern Matching and overloading NonCommutativeMultiply [duplicate]

My goal right now is to implement some rules like linearity etc for noncommuting operators (arbitrary matrices etc). This is partly an exercise for me to understand MMA better so giving me a package ...
Lior Blech's user avatar