Questions tagged [operators]

Questions about using or composing operators--functional mappings from one state or vector space to another.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Simplifications and error in matrix integral operator

I defined the matrix integral operator ...
1
vote
1answer
30 views

DIsplaying the product of matrix operations

I am struggling to find out the option that show the final result of a matrix operations and not the necessary steps to achieve the result. The last line of the following picture demonstrates the ...
0
votes
1answer
33 views

How to apply a function if an expression evaluates to true

I'm trying to define a simple function that will accept a symbol and an expression, set the symbol equal to the expression, and then print out info about the equation. Like so: ...
0
votes
1answer
41 views

commutator between tensor products

I am interested in some quantum mechanical calculations in Mathematica. I am working with a tensor product of Hilbert spaces $\mathcal H = \mathcal H_1\otimes \mathcal H_2$. I would like to implement ...
1
vote
0answers
42 views

Quantum Mechanics operators

$$\sigma_{z}^{A}|\downarrow\rangle_{A}=-|\downarrow\rangle_{A}$$ $$\sigma_{z}^{A}|\uparrow\rangle_{A}=|\uparrow\rangle_{A}$$ We have the above relations in Quantum mechanics. Is there a way to ...
3
votes
1answer
70 views

execute a summation involving a differential operator

Below is an operator $\hat{D}=\sum_{i,j}^2 \frac{\partial}{\partial u^i}\sqrt{g}g^{ij}\frac{\partial}{\partial u^j}$ where $g_{ij}=\begin{pmatrix}p(x,y) & q(x,y)\\\ q(x,y) & r(x,y)\end{pmatrix}...
3
votes
2answers
162 views

Generating a random density matrix in Mathematica

I am interested in using Mathematica to generate random $N\times N$ density matrices describing pure quantum states; for the less physics-oriented folks, a density matrix is positive semi-definite, ...
0
votes
0answers
34 views

Computation of operation count for the numerical evaluation in Mathematica

Is there any way to find the complexity of computation in Mathematica? There is a command in Maple that computes the number of multiplications, storage, and assignments. Is there any similar command ...
0
votes
0answers
62 views

Defining an mathematical operator

I'm trying to learn mathematica to use in my thesis. I have basic problems with definitions, calculations etc. Let me ask a question. I want to define anti derivative operator and derivative operator, ...
6
votes
3answers
399 views

Iterated differential operator

I would like to implement the following differential operator in Mathematica, $$ \prod_{j=1}^n \left({\mathrm d \over \mathrm d x}-j\right) $$ On a case by case basis, I can just expand it out and ...
1
vote
0answers
51 views

Precedence of @@ vs /@ [closed]

How do I find what I think is called the "precedence" of a given operator. That is, for the following code: ...
3
votes
2answers
55 views

Define the behavior of operators without built-in meaning

I need an operation $\tilde{}$ that lifts another operation (for example, the sum, but this does not have to be limited to real numbers) in the sense that $\widetilde{ (x \oplus y)} = \tilde x + \...
2
votes
0answers
24 views

Define an operator with the distributive property that works in general expressions

This is a follow up to this question. In that question they use TagSetDelayed to give a symbol the distributive property. In my case this becomes ...
4
votes
1answer
127 views

Partial transpose of 8x8 density matrix?

Please could someone help me to knew how to compute the partial partial-transposition of the following matrix? mat = Table[ρ[i, j], {i, 1, 8}, {j, 1, 8}]
0
votes
1answer
45 views

How to define derivative operation of a series acting on normal function

In some cases, I have to do derivarive of higher order acting on some function successively. Here is a toy example: I have a function named myfunc: ...
2
votes
1answer
30 views

Is associativity of operators documented?

Operator precedence is documented. Operators without built-in meanings are documented. The word "associative" apparently does not appear in either page. It's easy enough to do an experiment to observe ...
0
votes
0answers
44 views

Defining and Squaring an Operator using Mathematica

Hello I have a question regarding the possibility of defining a operator using Mathematica. Essentially what I would like to do is define the following, \begin{gather*} {\mathcal D := \frac{1}{(x^2+...
0
votes
0answers
63 views

Evaluating a differential expression using Mathematica

I am attempting to calculate the following expression in Mathematica, but I am having a bit of difficulty doing so. I want to calculate the following expression \begin{gather*} \left(x^2\sqrt{1-...
3
votes
2answers
78 views

How to check if all the members of a list lies in specific ranges based on another list?

There are two lists as follows: lista = {i, j, k}; listb = {{1, 2}, {3, 4}, {5, 6}}; If i in ...
1
vote
0answers
39 views

Create an operator that holds its arguments [duplicate]

How can I create an operator that holds its arguments? I am looking to define something similar to oper[x_][expr_] := Hold[expr] I am expecting the following ...
-5
votes
3answers
476 views

How to calculate the divergence of stress matrix in polar coordinate system correctly

I calculate the divergence of stress matrix in polar coordinate system by the method of coordinate transformation as follows : ...
7
votes
2answers
343 views

Defining an operator in Mathematica?

How to define the following operator in Mathematica? $$\hat{\nabla}^4=\left(\frac{\partial^2}{\partial\hat{r}^2}+\frac1{\hat{r}}\frac{\partial}{\partial\hat{r}}\right)^2$$
3
votes
1answer
61 views

How to expand (not replace) the “+”, “>” infix operator on strings? [duplicate]

I went through the similar questions to overload the behavior of built-in operator, like How to overload the operator "*" as KroneckerProduct. The answers given there are usually to use new ...
19
votes
1answer
174 views

Why does OperatorApplied by default reverse the arguments?

Perhaps this is just one of those Mathematica curiosities, but I'd like to know why by default OperatorApplied[f][x][y] === f[y,x] versus the more usual way one ...
0
votes
0answers
18 views

Problem with makeOperator which yields Polynomials of an operator

Hi Is it possible to improve the macro provided by Jens Polynomial expansion of operator ...
0
votes
0answers
47 views

Nest function n times

A trivial example would be f[x_]:=x Nest[f, 7, n] which would of course be 7 because it is independent of ...
0
votes
3answers
116 views

How to use `Through` function to pass through derivative operator

Because of the need of the operation rules of variational notation, I want to achieve the following effects: Through[(f + s)'[x]] Through[(f + s)''[x]] I want to ...
2
votes
2answers
70 views

How can I concisely define a matrix-form partial derivative operator?

I have a vector $\boldsymbol{u}(x,y) = \begin{bmatrix} u_x(x,y) \\ u_y(x,y) \\ \end{bmatrix}.$ I would like to get $\boldsymbol{\sigma}(x,y) = \begin{bmatrix} \sigma_x \\ \sigma_y \\ \tau_{xy}...
4
votes
2answers
192 views

Can C-like function call syntax be easily achieved for particular function names?

I'm trying to use Mathematica as a tool to prove that some C code is equivalent to another (up to roundoff errors). For this I need to somehow paste C expressions like ...
0
votes
0answers
67 views

Simplifying a differential equation acting on a product of functions

I have a function $f(x_1, \ldots , x_n)$ in $n$-variables that satisfies a fourth order linear differential equation (say $Df=0$). The function $f(x_1, \ldots, x_n)$ is of the form $f(x_1, \ldots, x_n)...
0
votes
1answer
82 views

Simplifying $\left(f\left(x\right)\frac{\partial}{\partial x}\right)^nf\left(x\right)$ into a summation

In case you're wondering how to get differentials to act like operators in Mathematica, I stumbled across a package Carl Woll made to solve this issue in this question. There's a a more recent version ...
0
votes
0answers
33 views

Implicit definition of a coordinate in differential equation [duplicate]

I would like to solve the following differential equation $\frac{d^2 \psi(r_*)}{dr^2_*} + (\omega^2 - V(r)) \psi(r_*)=0$ and the boundary conditions are $\psi(\inf) = \psi(-inf) = 0$. The problem is ...
0
votes
1answer
94 views

Multiply function-valued matrices

I would like to create a notebook for calculations in supersymmetric quantum mechanics. The basic building blocks are two functions (or maybe better: operators): ...
10
votes
4answers
395 views

Operator currying: how to convert f[a,b][c,d] to {a+c,b+d}?

This question is related to this golfing question (but I'm not interested in golfing, only in functional operator composition): How can we convert f[a,b][c,d] to <...
3
votes
1answer
111 views

Best way to apply a list of functions to a list of values?

This question is closely related to questions 83720, 17460, and 11298. How would you write the operator F = Through[#1[#2]] & in the prettiest, fastest, or ...
0
votes
1answer
79 views

How to substitute integral operators into polynomials?

Suppose I have a polynomial $a_0+a_1 f(x,t) + a_2 f(x,t)^2 + ....$. In code, a0 + a1 y + a2 y^2 + a3 y^3 /. y :> Integrate[Subscript[y, k] E^(I k y), k] <...
0
votes
0answers
37 views

Defining a function through an ODE containing unspecified operators

I want to do some algebra using a function only defined through a DE containing unspecified operators. The DE is $$ \partial_zu(z) = \left[\hat{D}+\hat{N}(z,u)\right] u(z). $$ Here $u$ lives in ...
0
votes
2answers
170 views

How to construct — based on physics-type notation — a magical simplex $\mathcal{W}$ of bipartite qutrits?

I have a short Mathematica program: ...
3
votes
2answers
154 views

Append a function of an expression as operator form using Curry?

I fielded this q to tech support but didn't get a conclusive answer yet: Is it possible to use Curry specifically to modify ...
1
vote
0answers
59 views

Distribute && over a list [duplicate]

I cannot find an operator "RO" so that given a list, say {a,b,c}, RO[&&,{a,b,c}] produces a && b && c
2
votes
4answers
159 views

Skipping indices in a product

I have a matrix $A$ for which I want to compute the quantity $T\lambda_j = \Pi_{\lambda_i\ne \lambda_j} \frac{A - \lambda_i I}{\lambda_j-\lambda_i}$, where $\lambda_i$ ($\lambda_j$) denote the ...
0
votes
1answer
47 views

Performing a simple operation with operators [closed]

I have a map defined as $\qquad \Phi(X) = a^2\, Tr[X] |0\rangle \langle 0| + b^2\, Tr[X] |1\rangle \langle 1| + a\,b\, Tr[\sigma_z X] |0\rangle \langle 1| + a\,b\, Tr[\sigma_z X] |1\rangle \langle ...
2
votes
1answer
148 views

Problem with defining a simple linear operator

I need to define a linear operator, which should have very simple linearity: myOp[Plus[f_, g_]] := myOp[f] + myOp[g] myOp[a_ f_[x_, t_]] := a myOp[f[x, t]] where ...
1
vote
2answers
124 views

Simplify differential expressions

One can differentiate a two dimensional vector like this, ClearAll["Global`*"] u[x_, y_] := {f[x, y], g[x, y]} Div[u[x, y], {x, y}] with output ...
2
votes
1answer
41 views

Define different actions for the same operator depending on the nature of its arguments

I am working with terms of the form A**B1**B2 where A, B1, and ...
2
votes
1answer
140 views

Defining an operator with given properties

In symbolic derivations with Mathematica, one often needs to define an operator with some desired properties, which will be used to stand for a general function or transform. For example, I would ...
1
vote
1answer
89 views

Define custom operator and specific application

I want to define a specific operator that will act in generic functions that depend, say, in the variable z. My problem is that I want when a specific function is ...
1
vote
1answer
93 views

A program for finding the summation of an analytical expression

Consider the Baker-Hausdorff formula for two operators $A$ and $B$: $$e^BA e^{-B} =A+[B,A]+\frac{1}{2!}[B,[B,A]]+\frac{1}{3!}[B,[B,[B,A]]]+....,$$ where $[A,B]=AB-BA$. In the case of my problem, $[B,...
2
votes
2answers
58 views

Defining a differential operator that acts on a non-commutative basis

Given a non-commutative basis ${x_0,x_1,x_2}$ I'd like to define a differential operator that acts as so $$ \Delta_i (\sum_{n=0}^\infty c_n x_i^n) = \sum_{n=1}^\infty c_n x_i^{n-1}, \quad \Delta_i ...
21
votes
4answers
1k views

What is the definition of Curl in Mathematica?

I have a usual mathematical background in vector and tensor calculus. I was trying to use the differential operators of Mathematica, namely Grad, ...

1
2 3 4 5