Recent content by cpt_carrot

  1. C

    Using Simpson's method to integrate a complex function

    By default I think quad calls qagse which does support singularities, you can also specify a series of domains to avoid them. With the right set of options you can get to most of the quadpack routines.
  2. C

    Using Simpson's method to integrate a complex function

    Scipy provides an interface to quadpack via the integrate.quad function
  3. C

    Trace of a subsystem of a two qubit system

    You need to include the cross terms in the outer product. The density matrix for your pure state ##|\psi\rangle## is ##\rho= |\psi\rangle\langle\psi|## which includes terms like ##|00\rangle\langle 01|##
  4. C

    Trace of a subsystem of a two qubit system

    You might want to think again about the result you got for ##\rho^{AB}##
  5. C

    Vector Spaces Question

    For part (ii) of task 1 you want to write ## y = av_1 + bv_2 + cv_3 ## and find ##a##, ##b## and ##c##. What happens if you e.g. take the inner product of this equation with ##v_1##?
  6. C

    Enrollment in C programming course

    As far as I can tell that is what my program does, as long as reaching a blank register causes all I/O to stop. What do you think is wrong with it?
  7. C

    Enrollment in C programming course

    Thanks for those, they gave me a fun half hour! My solution to hte last puzzle is below for anyone interested, I think it works....
  8. C

    How to calculate Fourier Transform of e^-a*|t|?

    Not quite. The function g(t) is even but you are integrating g(t)e^{j\omega t} which isn't even, so you need to do the other half of the integral, or notice that the negative time part is the complex conjugate of the positive time part.
  9. C

    Complex numbers

    This is incorrect since |u|=1 it should be u= -1/2- i\sqrt{3}/2 from which the algebra follows
  10. C

    Complex numbers

    Note that u^2=u^* and so u^2+u is real
  11. C

    Very hard integral. please help me guys

    Try adding together the new integral and the old one
  12. C

    Fourier transform of a lorentzian function

    The Fourier transform of a Lorentzian isn't a Lorentzian (its a decaying oscillation) The Fourier transform of a Gaussian is a Gaussian, which is I guess what you mean? Do you know any theorems about the Fourier transform of a derivative to help answer your other question?
  13. C

    MATLAB Simple Matlab Graphics Question

    If you do something like fullscreen = get(0,'ScreenSize'); set(0, 'DefaultFigurePosition', [0 -50 fullscreen(3) fullscreen(4)]) before plotting anything then it will set the default size for new figures to be maximised. Hope that helps :-)
  14. C

    Importance of adding the constant of integration.

    Not quite, this is why the constant of integration is important. The first integration gives \frac{df}{dx}=\frac{x^4}{4}+5x+c_1 and the second integration gives f(x)=\frac{x^5}{20}+\frac{5x^2}{2}+c_1x+c_2 Which is why we need one constant of integration for each integral
  15. C

    Lazer but with sound?

    Also don't forget the" which creates a coherent beam of phonons