Questions tagged [quantum-computing]
Questions about simulation of quantum circuits and quantum algorithms in Mathematica.
53 questions
4
votes
1
answer
148
views
How to implement a 2x2 operator in Mathematica?
I am trying to write a Mathematica program to compute the following:
For a given Hermitian matrix $\rho$, the operator $L_\theta$ with respect to a parameter $\theta$ is defined as:
\begin{equation}
...
1
vote
0
answers
81
views
Numerical inconsistency between two Interaction Pictures in NDSolveValue
I'm solving for a quantum system's evolution operator $U_S(t)$ using two different Interaction Pictures.
The physical evolution is described by the Schrodinger equation for the evolution operator $U(t)...
2
votes
1
answer
166
views
Why does NDSolve fail or slow down when simulating a driven JC model with time-dependent terms, even when the drive is off?
I'm performing a numerical check of an effective Hamiltonian transformation applied to a driven Jaynes–Cummings (JC) model. After applying a rotating frame transformation and rotating-wave ...
0
votes
0
answers
93
views
Diagonalization of Matrix for Coupled Channels Calculation [duplicate]
I am attempting to diagonalize a 2x2 matrix that includes two vibrational eigenstates and their spin-orbit coupling function. Within the code, they are referred to as follows:
...
1
vote
0
answers
146
views
Overload Issue with Solving Schrödinger Equation in Mathematica [closed]
When attempting to calculate the Franck Condon Factor for a molecule, I am encountering an issue calculating the higher vibrational levels of the molecule (which is integral to my analysis of the ...
0
votes
1
answer
98
views
Error When Computing Integral with Schrodinger Equations as Inputs [closed]
I am attempting to compute the Franck Condon Factor for a molecular system. This is the "overlap integral" between two energy states. In simple terms, I define two wavefunctions and find the ...
1
vote
1
answer
106
views
Issue with Interpolated Potential for Time-Independent Schrodinger Equation
I am attempting to use an interpolated potential for a molecule, initially in the form of (x, V(x)), as input for solving the Time Independent Schrodinger Equation.
After defining the data points, ...
1
vote
0
answers
60
views
QuantumFramework, Diagram attribute of QuatumCircuitOperator is not working properly [closed]
I'm working on wolfram cloud notebook to simulate Discrete-Time Quantum Random Walk on hypercube. But, in the QuatumCircuitOperator, I found an unexpected behaviour. Here is my code:
...
2
votes
1
answer
153
views
Seeking Recommendation on Time-Independent Schrödinger Equation Solving Method in Mathematica
I am seeking to solve a Time-Independent Schrödinger Equation using the Mathematica Platform. I will detail the problem below:
Scaling Constant is "K." This is calculated by the formula (2 m ...
3
votes
1
answer
160
views
How to correctly solve the Schrödinger equation when the Hamiltonian is driven at high frequencies?
We know that a unitary transformation should not change any physical information. In the program I’m working on, my model is like the driven Jaynes-Cummings model. I want to compute the dynamics ...
0
votes
0
answers
38
views
How to Expand and Simplify a Complex Hamiltonian in Mathematica?
I am working on a quantum system and need to expand and simplify a Hamiltonian in Mathematica. The Hamiltonian is given as:
$$
H_{I} = \hbar \frac{\chi}{2} a_{1}^{\dagger 2} a_{1}^{2} + \left(i\hbar \...
3
votes
2
answers
379
views
How to set a symbol to be commutative?
ccr = a ** ad :> ad ** a + 1
comm[A_, B_] := ExpandAll[A ** B - B ** A //. ccr];
these two commands should be enough to ...
6
votes
1
answer
329
views
How to Numerically Solve the Steady State of a Lindblad Equation with Parity Symmetry?
I am trying to reproduce some figures from this paper. like below:
The effective Hamiltonian of the system is
\begin{align}
H_{\text{eff}} = \frac{3g_x^2}{\omega} |e\rangle \langle e| + \frac{2g_x^...
3
votes
1
answer
131
views
Ket[{0}] output does not display as expected
Bug introduced in 14.0, fixed in 14.1.
The Wolfram documentation says that Ket[{k}] is displayed as
$$
\vert k \rangle
$$
However, I am following the discussion ...
1
vote
0
answers
73
views
Entropy Production Rates
I am trying to reproduce the results shown in Fig. 2(a) of the paper https://journals.aps.org/prresearch/pdf/10.1103/PhysRevResearch.6.033037 to calculate entropy production rates in a cavity ...
0
votes
1
answer
99
views
Why Doesn't My Code for Computing and Plotting Eigenvalues of a Discretized Hamiltonian Matrix Produce Any Output? [closed]
I've been working on a quantum mechanical model where I discretize the Hamiltonian using the finite difference method. My goal is to compute the eigenvalues and visualize them, but my code doesn't ...
6
votes
4
answers
864
views
Is it possible for Mathematica to output the name of a matrix as opposed to its matrix form?
I am interested in working with the names of matrices as opposed to the actual matrices themselves. I would like Mathematica to recognise the content of a matrix and output its name rather than its ...
1
vote
2
answers
95
views
How to get all possible multiplicative combinations of $5$ matrices with unique output
I have a list of five $256 \times 256$ matrices. These are called generator matrices as their multiplicative combinations generate a "Stabilizer group"
...
0
votes
1
answer
133
views
How to confirm that these tensor-product matrices commute [closed]
So I want to show that these "stabilizer operators" commute.
These operators are the tensor products of $8$ $2 \times 2$ matrices. As such the operators themselves are $256 \times 256$ ...
0
votes
0
answers
146
views
SoftmaxLayer with one-hot vectors
The quantum physics problem I am looking at is a rotated qubit. The setup involves a y-rotated qubit measured in the z-basis (hence spin-up and spin-down). This scenario typically includes modeling ...
0
votes
0
answers
122
views
Using CrossEntropyLoss function for basic neural network
Hi I am interested in understanding how to use the neural network functions in Mathematica. I have just started learning hence this is a basic query. The simple example I am looking at is as follows: ...
1
vote
2
answers
366
views
Simplification of quantum ladder operators (ideally using Using NCAlgebra)
I want to do math that involves a series of ladder operators. In the past I've tried to get it working with a 20 year old Mathematica package. But my feeling is that this is a very unused package and ...
1
vote
0
answers
345
views
Modern way to do quantum optics calculations in 2024?
Quantum Optics can often require messy algebraic simplifications of noncommuting operators (usually ladder operators and commutators). I've asked here about how to do it before.
What are some modern ...
3
votes
1
answer
227
views
Make the ```*``` operation the Kronecker product by default for Kets?
So given two "Ket" objects,
u = Ket[{-1/2}];
d = Ket[{1/2}];
Is there a way to define multiplication, *, so that by ...
2
votes
0
answers
84
views
Deriving Expressions for R1, R2, and R12 , Normalized Coincident Detection Probability, and LG Mode Formalism
I am currently reviewing a research paper on orbital angular momentum entanglement between two photons (signal and idler) generated from a pump photon via SPDC. The paper introduces the following ...
0
votes
0
answers
66
views
quantum state extraction
Here's a simple circuit with an input state applied:
...
3
votes
1
answer
531
views
Solving a Lindblad differential equation in matrix form
I am trying to solve the following Lindblad equation analytically with Mathematica:
$$\frac{d\rho}{dt}=-i[H,\rho]+\sum\nolimits_{i=0}^1 K_i\rho K_i^+-\frac12\cdot\{K_i^+K_i,\rho\},$$
where
$$H=\begin{...
0
votes
0
answers
94
views
On MacOs, I cannot use Needs["QDENSITY`Qdensity`"]
I am trying to get
Needs["QDENSITY`Qdensity`"]
from (https://library.wolfram.com/infocenter/MathSource/5715/), however, it failed and I get this error:
...
1
vote
0
answers
101
views
Why must the "&" symbol be placed inside function instead of outside? [closed]
The following code is taken from Wolfram Community "Quantum Error Correction: bit flip".
...
1
vote
2
answers
265
views
Number operator
Suppose CR is my creation operator and AR is my annihilation operator.
I have to show that ...
0
votes
0
answers
102
views
Solving a system of complex matrix equation using Reduce function
I am trying to solve a system of four matrix equations using Reduce function. The system arises in Quantum Information. The system is solvable with a solution i.e. phi, but the following code gives ...
3
votes
2
answers
436
views
Decoupling a system of four linear $1$-st order ODEs
I have a system of four $1$-st order ODEs. $$ \dot{p_1} = -2\beta^2 q_1 - \gamma p_1 + \Delta p_2 $$ $$ \dot{p_2} = -2\beta^2 q_2 - \gamma p_2 + \Delta p_1 $$ $$ \dot{q_1} = 2\alpha^2 p_1 + \gamma q_1 ...
1
vote
0
answers
142
views
Gaussian Matrix Model - Large N Expansion Physics with Mathematica
Update: Attempted 2nd time by replica method
I'm trying to implement basic large N expansion in Mathematica.
I'm trying to understand what this means on the fly as well.
The model I am trying to ...
1
vote
0
answers
179
views
How to implement an entangled measurement in mathematica?
Suppose, we have two states $|\phi^+\rangle_{AB},|\phi^+\rangle_{CD}$. Now a Bell basis measurement is performed on the qubits BC. How to code in Mathematica to find out the post-measurement state on ...
4
votes
2
answers
583
views
How to generate all permutation matrices for 4 qubits?
In quantum mechanics, a qubit can be understood as a 2 by 1 vector denoted by Dirac notation as $$|0\rangle \equiv \left( \begin{array}{c}
1\\
0\\
\end{array} \right) ,|1\rangle \equiv \left( \...
1
vote
0
answers
224
views
Wolfram Quantum Framework Shows Mixed States as Kets
Wolfram Quantum Framework consistently shows the state["Formula"] for mixed states, defined via some density matrix, in terms of simply kets! Is it ...
6
votes
1
answer
236
views
Minimizing computational time for a quantum walk problem
Any suggestions as to how to speed up the computational time for this quantum walk problem which is coded using a normalized SparseArray coin operator as follows:
...
3
votes
1
answer
197
views
Schmidt Measure of a Graph State
Based on the definition of the Schmidt measure in this work https://www.arxiv-vanity.com/papers/quant-ph/0307130/, the following code was set up, but appears to
generate errors. Is there a better way ...
1
vote
2
answers
149
views
Defining and executing large matrix operators on vectors efficiently
For an $N$-qubit system, I am interested in coding, in an efficient way, the following set of Kraus operators $\{A_c\}_c$ defined in the computational basis as
\begin{align}
\hat{A}_c := \sum_{m=...
0
votes
0
answers
71
views
Resetting rules for non comutative multiply
Im currently working on a project that intends to achieve multiple task the first if which rewrite a bra-ket notated triplet tensor product state such as the w state in terms of the pauli matrices.
i,...
2
votes
1
answer
127
views
Confusion in Eigenvalue and eigenfunction distribution using NDEigensystem [duplicate]
I have been using NDEigensystem to solve the Schrodinger equation for different potentials. However, whenever the potential has its minimum in the negative y-axis, ...
2
votes
0
answers
60
views
Simulation of Quantum pseudo-telepathy
I would like to mathematically simulate Quantum pseudo-telepathy on The magic square game from Wikipedia.
In section Pseudo-telepathic strategies we can read:
The trick is for Alice and Bob to share ...
2
votes
1
answer
532
views
Decomposing Hamiltonian in terms of Pauli strings
Does anyone know of a native Mathematica function or a package that allows one to decompose an arbitrary Hamiltonian into Pauli strings? There are a few packages for Python that do this (e.g., one ...
2
votes
1
answer
279
views
How to find complete QuantumOperator() Matrix
I am defining a quantum operator as
X1 = QuantumOperator["PauliX", {3}]
This operator is expected to act on qubit 3 and so supposed to be 8x8 matrix.
But ...
1
vote
0
answers
342
views
How to define momentum operator for use with creation and annihilation operators in quantum mechanics
I am having trouble writing the momentum operator in the differential form to complete a piece of code shown here so that I can show a commutator [P,Q] = I .
Here is what I have done so far, and I ...
2
votes
0
answers
95
views
QuantumFramework: Error message when calculating a CircuitOperator
I am running the following package and code:
...
-4
votes
1
answer
167
views
Constructing NxN tridiagonal block diagonal matrix with N is a variable [closed]
Hi please can someone help me writing a program of generating a tridiagonal block matrix with dimension of NxN where N is a variable can be 50, 100, 200, 300...etc , Well I don't know how I'm a ...
3
votes
1
answer
210
views
Calculating power series of quantum operators on kets
I am using the "Quantum" add-on package to perform some quantum mechanical calculations using SU(1,1) generators. The code that I've developed reads
...
0
votes
1
answer
88
views
How to export integration values to a data file? [closed]
I'm calculating quantum mechanical expectation value for a very high order truncation value. But due to low ram, it gets hung each time. So I am trying to write those data to a .dat file into the HDD ...
2
votes
0
answers
313
views
Defining a non-commutative algebra
I'm new to Mathematica, and I'm trying to learn the ropes.
I'm trying to write a little boson algebra engine, with basic useful functions such as non-commutative algebra, normal-ordering and vacuum ...