- #1
Alex Cros
- 28
- 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!
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!