Questions tagged [algorithms]

For questions about an algorithm as it relates to physics. DO NOT ask how to implement an algorithm, questions like that belong on Stack Overflow or Computational Science. DO NOT ask about the efficiency of an algorithm, or other such questions, questions like that belong on Computational Science.

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Algorithm that checks if a subspace of states contains a product state

Suppose I have two identical qudits, the full Hilbert space is $\mathcal{H}=(\mathbb{C}^{d})^{\otimes 2}$. Say I'm given a supspace of states $\Lambda\subset \mathcal{H}$. What is the fastest ...
0
votes
1answer
24 views

Why does the chain be at equilibrium in the MH algorithm?

I'm implementing the Metropolis algorithm to solve the 2D Ising model. I've understood how to implement it and now I'm trying to understand a bit of how the algorithm works. In the site I'm reading it ...
1
vote
0answers
21 views

Is Shor's algorithm for factoring still efficient in the presence of small phase noise

Quantum Fourier transform of $|a\rangle\in H_N$ $$|a\rangle\longrightarrow\sum_{l=0}^{N-1}e^{\frac{i2\pi a l}{N}}|l\rangle$$ where $N=2^n$ and $H_N$ is $N$-dimensional Hilbert space. The ...
0
votes
0answers
19 views

Determining track velocity of a transmitter given time of signal arrival at $n$ receivers

I have $3$ ground-based radio receivers (call them $i$, $j$, and $k$), with known coordinates $x_i,y_i,z_i$. A transmitter (call it $m$) with unknown coordinates $x(t)_m, y(t)_m, z(t)_m$, moving with ...
1
vote
0answers
63 views

Which is more accurate: Euler's method or modified Euler's method?

I was solving a differential equation, the equation being, $$\frac{dv}{dt} = g-\frac{c_d}{m}v^2,$$ which can be solved analytically to give $$v = \sqrt{\frac{mg}{c_d}}\left(\frac{e^{2t\sqrt{\frac{c_dg}...
2
votes
0answers
97 views

How Do Quantum Computers Work, Like Really [closed]

I understand in plain terms superposition and entanglement, but I'm very unclear how either of these could work as a means to increase computation power. A helpful metaphor is that of the maze. A ...
1
vote
1answer
111 views

Number of qubits required in Shor's algorithm

People say that the number of qubits required in Shor's algorithm for factorizing $N$ should be $2\log N$ for control register and $\log N$ for target register. What is the reason why these numbers of ...
1
vote
0answers
42 views

Is there a comparison table for quantum algorithms like VQE, QPE, QAOA, and so on?

I have one question: Recently, I studied about several algorithms like VQE, QPE, QAOA and so on. I would like to make some comparison tables about those algorithms, their strengths and weaknesses. If ...
11
votes
1answer
592 views

Why use Crank-Nicolson over Matrix Exponential when solving Schrödinger's equation?

For Schrödinger's equation, $$\psi(x,t+\Delta t)=e^{-i H\Delta t}\psi(x,t)\approx\frac{1-\frac{1}{2}i H\Delta t}{1+\frac{1}{2}i H\Delta t}\psi(x,t).$$ The right-most expression is the Crank-Nicolson ...
1
vote
0answers
73 views

Final Hamiltonian for Adiabatic Grover

X-Posted on Quantum-Computing Stack Exchange In quantum computation, there is a famous algorithm to search a marked item in an unstructured database called Grover's algorithm. It achieves a quadratic ...
2
votes
0answers
34 views

Why is the boundary of friends-of-friends (FOF) halo corresponding to iso-density contour?

The friends-of-friends algorithm (hereafter FOF) is commonly used to find halos in cosmological simulations. (For more information, please refer to here and here) I found that some literature argues ...
2
votes
2answers
167 views

Is the universe's Kolmogorov complexity growing over time?

The Kolmogorov complexity of a deterministic universe is constant. The Kolmogorov complexity of a nondeterministic universe grows over time. It grows whenever something happens that is not ...
1
vote
1answer
136 views

Bell State Measurement Algorithm

I'm relatively new to quantum computation and am taking a course in it. I was wondering if it is possible to code an algorithm which would be able to take an input of a 2 qubit state and perform a ...
1
vote
0answers
21 views

Modeling curved light in media with "complex" indices of refraction

I've written an algorithm to solve the Time Difference of Arrival (TDoA) localization problem, using Bancroft's method (see). Given the coordinates of $n$ nodes in ...
0
votes
1answer
155 views

How to calculate acceleration due to gravity in a 3D $N$-Body system?

How do you calculate acceleration due to gravity for objects in 3D space? My current understanding for the force due to gravity on object $i$ from object $j$ is $$\mathbf{F}_g=(\mathbf{r}_j-\mathbf{r}...
0
votes
1answer
41 views

Novikov self-consistency and computability

The Wikipedia article on the Novikov self-consistency principle has a section on time loop logic, where it discusses using time travel to solve any NP problem by finding an algorithm where the only ...
4
votes
0answers
119 views

Is the only difference between tDMRG and TEBD the way the central sites are shifted?

I have been reading up on time evolution methods using matrix product states. Reading from Schollwoeck's notes on the density matrix renormalization group, (https://arxiv.org/abs/1008.3477), I looked ...
8
votes
1answer
106 views

Github for Physicists

I am wondering if there is a platform to which researchers share or publish the code they used in their research. I noticed that many researchers explain their algorithm and math and present the ...
1
vote
0answers
90 views

Numerical renormalization of 2D Ising lattice

I'm trying to make some toy computations on the $2D$ Ising model on a square lattice. I want to apply a renormalization transformation, and try to estimate observables on the renormalized lattice ...
2
votes
1answer
175 views

Is estimation partition functions without resorting to markov chain monte carlo still an open question?

I was told estimation of partition functions without resorting to MCMC was still an open question in physics about a year and a half ago. An example is that say you have some physical model that ...
2
votes
1answer
45 views

Can I have detailed balance without reverse updates?

I am implementing a Markov Chain Monte Carlo algorithm and want to obtain a stationary distribution. In order to do this I want to have detailed balance, as this is a sufficient, although not ...
0
votes
2answers
83 views

Equations of motion: Calculate location of point [closed]

The scenario is that a user is dragging an object on a touchscreen. I want to calculate the position of the object as the finger drags it across the screen. I also want to account for any acceleration ...
0
votes
2answers
417 views

Calculating end position from existing position, velocity, deceleration and time

I am writing a piece of software where the user can drag an element only on the x axis. When the user lets go of the drag while the item is in motion I can determine the x velocity and the current x ...
1
vote
0answers
65 views

Maybe a stupid question: I read about equations in physics but are algorithms not also important? [closed]

I wonder if indeed the term "equation" is being used loosely and that algorithms for describing physical reality are also used frequently in physics? Or are algorithms relatively rare? Could it be ...
1
vote
0answers
58 views

Numerically solving unbounded Fokker-Planck equation

I am wanting to solve a 3D Fokker-Planck equation of the form: $$\partial_{t}p(\mathbf{x}, t) = -\nabla \cdot \mathbf{J}$$ where $\mathbf{J} = \mathbf{v}(\mathbf{x})p(\mathbf{x}, t) - D\nabla p(\...
0
votes
1answer
121 views

Las Vegas algorithm versus Monte Carlo algorithm in Quantum Field Theory

I used the las Vegas algorithm to calculate the multidimensional integrals of a cross section in tree level. I don't quite understand what the Monte Carlo algorithm is for: Could I also calculate with ...
0
votes
1answer
283 views

How can I use Runge-Kutta4 to solve this orbit in polar coordinates?

I want to simulate a simple orbit of a planet moving around a star which is fixed in position. I have formulated the ODEs for this problem using Lagrangian Mechanics and have found the equations of ...
3
votes
2answers
300 views

How to actually find a Hartree-Fock ground state?

I am interested in finding the Hartree-Fock ground state for a system of interacting fermions (with totally local scattering, so a delta-function interaction potential). I have read through some ...
0
votes
1answer
50 views

Metropolis Algorithm Transition-Proposal Probability

I'm working my way through a short section on the Metropolis algorithm in the lecture notes on Computational Quantum Physics by Prof. Troyer. However, I am not sure what probability distribution was ...
1
vote
1answer
55 views

References about "neutronic" algorithms

I am looking forward to apply for an internship in 5 months and I looked up the Jobs offers from last year, and some of them asked for a candidate with knowledge of "algorithms applied to neutronics". ...
1
vote
1answer
557 views

Modification of the Verlet algorithms for the pendulum problem

I'm trying to write a program to integrate the motion equations of the pendulum in the damped and forced case, that is, following this equation: $$ \frac{d^2\theta}{dt^2}=-\frac{g}{L}\sin(\theta)-\mu\...
0
votes
0answers
45 views

Fluid simulations on spherical coordinate grid: How to handle $\theta=0$ axis?

I am working on a fluid simulation code written in spherical coords. Whoever wrote the original didn't do a great job with the boundary conditions at $\theta=0$ and $\theta=\pi$ axes. My task is to "...
0
votes
1answer
97 views

Veto algorithm in particle decays and Monte Carlo techniques

What is the main concept behind Veto algorithm and how does it contribute to efficiency in Monte Carlo methods like when used in designing a parton shower?
4
votes
0answers
101 views

Method to build a polyhedral die with given probabilities [closed]

Let's define a die as a polyhedron that, if rolled over a perfect horizontal plane, ends up being in a physically stable unambiguous state labelled $n$. The die has $N$ states. Each state $n$ has a ...
1
vote
0answers
82 views

Numerically Solving EM problems. Book covering: ABS, PML, Near field calcul., LU fact, BicGstab, Pardiso etc

I looking for a book (or two) covering a range of topics: numerical implementation of boundary conditions (PEC, PMC, ABS); perfect matching layer; LU factorisation; numerical solvers and when to use ...
1
vote
1answer
59 views

State of $N$-body system after time $t$ (elastic collision & no gravity)

I am creating a gas particle simulator based game. All nodes (green circles) represent gaseous particles and collide elastically. My algorithm correctly accounts for two-particle collisions, as the ...
4
votes
0answers
210 views

$N$-body gravity simulator: why does energy conservation break down when introducing an adaptive timestep?

I am playing with an N-body gravity simulator using the velocity-verlet algorithm. In the actual simulation I normalize everything so that it is nicely behaved numerically, but I'll express things in ...
2
votes
1answer
133 views

What the difference is between Størmer Verlet and regular Verlet method?

I was wondering what the difference is between the Størmer Verlet method and the regular Verlet method, if there is any.
9
votes
0answers
454 views

Using a time-like boundary as a computer?

Question and Summary Using classical calculations and the Robin boundary condition I show that one calculate the anti-derivative of a function within time $2X$ (I can compute an integral below) $$\...
1
vote
1answer
92 views

Is photon interference really random? [closed]

I know that according to the many worlds interpretation, there is no randomness and rather there is a universal wave function that simulates an observer with a continuously branching timeline. My ...
2
votes
1answer
182 views

Could you use the Barnes-Hut algorithm iteratively-- with multiple center quadrants?

I was wondering if you could use Barnes-Hut simulation beyond what it was originally intended to be. For many Barnes-Hut algorithms, the forces are only considered for a single quadrant, the centroid, ...
1
vote
0answers
391 views

Using the Kalman filter given acceleration to estimate position and velocity [closed]

I am reading data from an accelerometer. I want to use this data to estimate velocity and position. Originally, I performed a double integration of acceleration to read this data, and as confirmed by ...
0
votes
2answers
271 views

Shor's algorithm with adversary - can (delayed) erasure of value qubits cripple calculations?

Let's look at quantum subroutine of Shor's algorithm: Hadamard gates create superposition of all (exponential number) values for input qubits. Then we perform a classical function on them, which is ...
1
vote
0answers
44 views

Have there been any patented physical models or computational algorithms? [closed]

There was a recent question (linked below) on the Law SE about the potential to patent algorithms. It appears there is a lot of gray area in the subject. Of course natural laws cannot be subject to ...
1
vote
0answers
81 views

verlet/leapfrog method lorentz force application

So I ll use leapfrog/varlet algorithm to calculate the trajectory of the particle In leapfrog method for initial values we need $v_{-1/2}$ and $x_0$. Hence I can write $v_{-1/2}=v_0-Δt/2a_0$ $v_0$ ...
0
votes
1answer
131 views

Time for Quantum Computational Prime Factorisation

I ran into this graph where the red one is $$x^3$$ and represents the number of steps as a function of factorised bits for a quantum computer. The blue graph represents the classical computer and has ...
0
votes
0answers
103 views

What is order of the Wolff Cluster algorithm?

What is the order of the Wolff Cluster update algorithm for Ising Model 2D and 3D?
1
vote
2answers
765 views

How to calculate the maximal Lyapunov exponent(s) of a multidimensional system?

I've been reading up about Lyapunov exponents for a university group project on chaos theory and I'm a little confused as to how they are calculated for a system of multiple dimensions. From what I ...
1
vote
1answer
109 views

MEMS gyro measured angular velocity vector

Notations I use: Consider a world frame $\{O_0, \vec{i}_0, \vec{j}_0, \vec{k}_0\}$ coordinate system and a rigid body $B$ with a coordinate system $\{O_1, \vec{i}_1, \vec{j}_1, \vec{k}_1\}$ attached ...
2
votes
1answer
342 views

Adiabatic QC: are there known difficult problems with spectral gap not exponentially decreasing?

Adiabatic quantum computers require slow evolution to maintain global minimum: $O(1/g^2)$ time, where $g$ is spectral gap: distance between two lowest energies. The danger is that this spectral gap ...