Skip to main content

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.

0 votes
1 answer
42 views

Checking inverse metric and Christoffel symbols for the Kerr metric against references

I am trying to cross-check the Christoffel symbols and other very laborious geometric components in several metrics. In particular the Kerr metric is notoriously complex and results in expressions ...
UnkemptPanda's user avatar
0 votes
0 answers
38 views

Force-simulation for graph layout: How to avoid particle collapsing into a single point?

In a force-based graph-layout simulation using Barnes-Hut, what are the conditions for collapse? With collapse I mean multiple (or even all) nodes "collapsing" into a single point. Is there ...
skep's user avatar
  • 1
1 vote
0 answers
22 views

Any quantum Monte-Carlo algorithm for calculating the lowest eigenenergy in each symmetry sector?

Suppose we have a hamiltonian which has the parity symmetry (e.g., the Heisenberg model with the open boundary condition). Is there any quantum Monte-Carlo algorithm which can be used to calculate the ...
poisson's user avatar
  • 1,957
3 votes
2 answers
172 views

About how to calculate observables in Quantum Monte Carlo with complex weights

I'm rewriting a Diagrammatic Quantum Monte Carlo algorithm following Werner, P., Oka, T., & Millis, A. J. (2009). Diagrammatic Monte Carlo simulation of nonequilibrium systems. Physical Review B, ...
pter26's user avatar
  • 165
2 votes
0 answers
54 views

Is there a proof for critical slow-down in Monte Carlo?

It is physically understood why the standard Metropolis-Hasting algorithm slows down near the critical temperature, since it doesn’t utilize the divergence of the correlation length. However, I’m ...
Andrew Yuan's user avatar
  • 2,123
0 votes
0 answers
37 views

Is Quantum State Tomography (QST) an inherently supervised or unsupervised problem in Machine Learning?

I am studying how to apply neural networks to the problem of Quantum State Tomography (QST) and I got confused when it comes to decide if this is a supervised or unsupervised learning problem. At ...
Dimitri's user avatar
  • 161
0 votes
0 answers
51 views

Understanding chapter 3.1 (Laplace's equation) in Introduction to electrodynamics Griffiths 4 ed [duplicate]

I really need help to understand chapter 3.1. What is the method of relaxation? How can I use the method of relaxation to solve Laplace's equation? How can I use the first and second uniqueness ...
aaa's user avatar
  • 9
0 votes
0 answers
61 views

How to efficiently calculate the inverse of the overlap matrix?

Now, we consider a non-orthonormal basis: $$\mathcal{S}_N=\{|\alpha\rangle,a^\dagger|\alpha\rangle,a^{\dagger 2}|\alpha\rangle,\ldots,a^{\dagger N}|\alpha\rangle\},$$ where $|\alpha\rangle$ is the ...
Young Q's user avatar
  • 23
1 vote
0 answers
31 views

Fringe pattern and ripples in the fringe visibility plot from interferograms

I am using a lens testing interferometer, where I record 4 to 5 interferograms with a 90$^{\circ}$ phase step between consecutive interferograms. In addition to the interferometer, I have also created ...
Hikikomori's user avatar
1 vote
0 answers
77 views

Simplest quantum Monte-Carlo method for the Bose-Hubbard model

I want to use quantum Monte-Carlo results to benchmark an algorithm for the Bose-Hubbard model. There are so many QMC methods in the market, so which one is the simplest one? I want the ground state ...
poisson's user avatar
  • 1,957
0 votes
0 answers
61 views

How are the boundary conditions given in the SIMPLE algorithm on a forward staggered grid for a lid driven cavity flow?

I have a code given by my professor in which he applies the boundary conditions for the lid driven cavity flow. All the enforcement of boundary conditions I have seen elsewhere completely differ from ...
howstheJosh's user avatar
2 votes
1 answer
121 views

Numerically computing induced magnetic field from current density

Let's say we have current density $J_i$ on a discretized grid with $(N_x \times N_y \times N_z)$ points. What is the best procedure to compute the induced magnetic field $(B_i)$ from the current ...
myresh's user avatar
  • 23
0 votes
0 answers
119 views

What are the advantages of tensor network algorithms over monte-carlo simulations in terms of time-evolution?

I understand that tensor networks and monte carlo simulations are based on completely different principles. However, to my knowledge both are used to simulate the time evolution of a system. Is there ...
Souroy's user avatar
  • 193
1 vote
1 answer
39 views

An example problem to solve using 100 qubits?

Suppose we have in our possession 100 pairs of electrons. Each electron A1 - A100 is entangled with its respective twin B1 - B100. Each entangled electron pair has been set up to have opposite spins (...
James's user avatar
  • 593
3 votes
1 answer
144 views

Grover's algorithm & using wave interference for computing

Grover's quantum search algorithm contends that it is possible to search for a specific item in an N-sized unsorted database in only $\sqrt N$ attempts. Classically, it takes N/2 attempts on average ...
James's user avatar
  • 593
0 votes
1 answer
99 views

Sensor Array Position Calibration in Anisotropic Media

Problem. I have a sensor array consisting of $n \gg 4$ receivers at unknown locations $\langle x_n, y_n, z_n\rangle$ embedded in an anisotropic medium whose index of refraction varies as a known ...
10GeV's user avatar
  • 799
1 vote
0 answers
113 views

Why are time-reversible integration algorithms in molecular dynamics simulations favorable?

I read that integration algorithms that are not time-reversible tend to be less "stable". Where stable means that the total energy stays constant (is conserved). I'd like to know what it ...
WedgeAntilles's user avatar
0 votes
0 answers
37 views

Are there ways to find representations of matrices given an algebra?

Given an equation (or a set of equations) involving matrices, is there an algorithm to find possible representations of these matrices? For example, we can consider a matrix $A$ such that $A^2=\begin{...
YeetTheorem's user avatar
1 vote
0 answers
6 views

Applying Divergence to query moving points

Problem statement :- There is a moving source($s$) and other moving points ($p_{1}.... p_{n}$). There are fixed obstacles and a fixed destination point($d$). In each time step I have to query "Is ...
Amartya's user avatar
  • 111
1 vote
0 answers
82 views

Reference request: Numerical techniques, Monte-Carlo (MC), Density Matrix Renormalization Group (DMRG), Dynamical Mean-Field Theory (DMFT)

I am an undergraduate student and my previous learning in physics is more on theory instead of numerics. I would be very grateful if you can point me to good introductory lecture notes/lecture videos ...
3 votes
1 answer
41 views

Could we have a quantum algorithm that have the quantum speed-up, but don’t need universal gates?

When it comes to building a quantum computer, it's like we need to consider how to perform universal gates fault-tolerantly, which is an unsolvable problem so far. While Clifford gates may be easier ...
Zundoko's user avatar
  • 31
0 votes
0 answers
140 views

Algorithm for solving Poisson's equation numerically

I need an algorithm to solve Poisson's equation for gravitational potential. $$ \nabla^2\phi = 4\pi G\rho $$ where, $\phi$ is Gravitational Potential. I am trying PDE for the first time so, I need ...
Owl0223's user avatar
  • 13
1 vote
0 answers
124 views

Numerical solutions to the 3D wave equation

I am doing a research to explore the existing numerical schemes that are used to solve the $3$D wave equation. The standard form of the problem in $3$ dimensional setting is : $$\Delta u= \frac{1}{c^2}...
NotaChoice's user avatar
0 votes
0 answers
67 views

Dynamic Programming and legendre transformation?

I read once (I can't find it anymore:( ), that the Legendre transformation from the Lagrange formalism to the Hamilton formalism can be seen as dynamic programming. I have never seen it like this and ...
nuemlouno's user avatar
  • 339
2 votes
1 answer
113 views

Compressing the Hilbert Space in Traditional DMRG

The traditional, non Matrix Product State, formulation of the Density Matrix Re-normalization Group (DMRG) algorithm can be coded in python. Such a code can be found in the following link: https://...
user avatar
2 votes
0 answers
34 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 ...
Lagrenge's user avatar
  • 883
0 votes
1 answer
34 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 ...
EigenAle's user avatar
  • 185
1 vote
0 answers
73 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 ...
Houpe's user avatar
  • 51
1 vote
0 answers
463 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}...
Sumit Gupta's user avatar
2 votes
0 answers
207 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 ...
WriterState's user avatar
1 vote
1 answer
336 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 ...
William's user avatar
  • 185
1 vote
0 answers
140 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
1 answer
1k 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 ...
XYZT's user avatar
  • 779
1 vote
0 answers
122 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 ...
Hans-Ulrich Rudel's user avatar
2 votes
0 answers
41 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 ...
Wang Yun's user avatar
  • 529
5 votes
2 answers
361 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 ...
LinusK's user avatar
  • 129
1 vote
1 answer
746 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 ...
Will's user avatar
  • 21
1 vote
0 answers
28 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 ...
10GeV's user avatar
  • 799
0 votes
1 answer
443 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}...
maxbear123's user avatar
0 votes
1 answer
100 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 ...
Yair Halberstadt's user avatar
5 votes
0 answers
460 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 ...
user147177's user avatar
8 votes
1 answer
173 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
0 answers
110 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 ...
user2723984's user avatar
  • 4,736
2 votes
1 answer
426 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 ...
www3's user avatar
  • 73
2 votes
1 answer
56 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 ...
B. Brekke's user avatar
  • 1,772
0 votes
2 answers
99 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 ...
david_adler's user avatar
0 votes
2 answers
1k 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 ...
mac38478's user avatar
1 vote
0 answers
70 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 ...
releseabe's user avatar
  • 2,238
1 vote
0 answers
69 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(\...
Hello's user avatar
  • 71
1 vote
0 answers
260 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 ...
Kathi's user avatar
  • 45

15 30 50 per page