Simulating quantum coefficients

Click For Summary

Discussion Overview

The discussion focuses on generating random variables to form complex numbers that satisfy a specific constraint for a quantum simulation involving 4 qubits. Participants explore methods for generating these variables while ensuring that the sum of their squares equals unity, with references to Monte-Carlo simulations and geometric considerations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks to generate 8 random variables to form 4 complex numbers, constrained by the condition that their squared sum equals unity, for a quantum simulation.
  • Another participant suggests using spherical coordinates to efficiently sample points on a sphere, noting the challenge of uneven distribution and proposing a method to address it.
  • A third participant questions the need for independence among the qubits and suggests generating points on the Bloch sphere as a potential approach.
  • Several participants propose normalizing random variables generated from a uniform distribution over the interval [-1,1] to meet the constraint, while discussing the implications of uneven distribution.

Areas of Agreement / Disagreement

Participants express varying methods and ideas for generating the required random variables, with no consensus on a single approach. Some propose normalization techniques, while others discuss geometric sampling methods, indicating multiple competing views remain.

Contextual Notes

Participants reference the complexity of working in higher dimensions and the implications of uneven distributions when sampling points. There are unresolved questions regarding the specific constraints and distribution preferences for the random variables.

Alex Cros
Messages
28
Reaction score
1
Hi everyone,

I want to generate 8 random variables (in reality to form 4 complex numbers) such that the sum of the 8 variables squared is equal to unity. The aim of generating such numbers is to perform a quantum simulation of 4 qubits (thus the 8 parameters). I've been trying to use RandomVariate[NormalDistribution[]] in Mathematica (since the rest of the calculations are there) but I'm not quite sure how to satisfy the constraint described before. I'm not familiar with Monte-Carlo simulations.

Thanks in advance!
 
Technology news on Phys.org
Alex Cros said:
I'm not familiar with Monte-Carlo simulations.
You will have to do something about that ...

8D is too complicated for me.

In a 3D equivalent: suppose you generate sets of 3 uniformly distributed random numbers -- i.e. a cube, uniformly filled with points. If you want the sphere ##r^2 = 1## then picking only the points that satisfy that constraint is totally inefficient. Switch to spherical coordinates and pick ##\phi## and ##\theta##: all points are on the sphere.

Alas, now they are unevenly distributed over the surface of the sphere. Easily fixed by not distributing ##\theta## itself evenly, but ##\cos\theta## instead (Something to do with ##dA = r \sin\theta \,d\theta d\phi \ ## -- check this because I quote from long term-memory that may have suffered from radiation damage :smile:).​

And this concludes your first MC101 lesson :rolleyes: . Homework: extrapolate to 8D :wink: .

By the way: is ##r^2 = 1## the only constraint ? And is it right to assume you want the points evenly distributed over the 7D 'sphere' ? Why do you have 'NormalDistribution' in there ?
 
Last edited:
  • Like
Likes   Reactions: Alex Cros
Alex Cros said:
I want to generate 8 random variables (in reality to form 4 complex numbers) such that the sum of the 8 variables squared is equal to unity. The aim of generating such numbers is to perform a quantum simulation of 4 qubits (thus the 8 parameters).
I don't understand what you want. Do you need to determine the state of 4 qubits, independent of each other? If that is the case, then you can use @BvU's advice and generate 4 locations on the Bloch sphere.
 
  • Like
Likes   Reactions: Alex Cros
How about creating 8 random variables on the interval [-1,1] and then normalizing them?
##X_{i}=random(-1,1), i=1,8##
##A=\sqrt{X{_1}^2+X_{2}^2+...X_{8}^2}##
##Y_{i}=X_{i}/A##
 
  • Like
Likes   Reactions: Alex Cros
Gene Naden said:
How about creating 8 random variables on the interval [-1,1] and then normalizing them?
##X_{i}=random(-1,1), i=1,8##
##A=\sqrt{X{_1}^2+X_{2}^2+...X_{8}^2}##
##Y_{i}=X_{i}/A##
In 3D that would be projecting the 'cube' on the 'sphere' -- unevenly distributed, which may or may not be ok, depending on what it is that you do want evenly distributed...
 
  • Like
Likes   Reactions: Alex Cros

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
1K
Replies
9
Views
3K
  • · Replies 7 ·
Replies
7
Views
8K
Replies
1
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K