Giter VIP home page Giter VIP logo

Comments (9)

nquesada avatar nquesada commented on July 3, 2024

HI @yu289333 --- You are correct, P([l]) is the power set of the first l integers. Where it is not defined?

from thewalrus.

yu289333 avatar yu289333 commented on July 3, 2024

Then |S| is the number of elements in set S? Thank you so much for explaining.

from thewalrus.

nquesada avatar nquesada commented on July 3, 2024

Correct.

from thewalrus.

yu289333 avatar yu289333 commented on July 3, 2024

Sorry for asking all the questions. I'm on the physics side and am overwhelmed by all the math. For N=2, and vector_n = {1, 0}, O{n} should be a 2x2 matrix, it's not possible to go over S∈P([ℓ]), right? Where do I get wrong?

from thewalrus.

yu289333 avatar yu289333 commented on July 3, 2024

For a Two Mode Squeezed State (TMSS), the probability of the |0>0> Fock state is 1-[tanh(r)]^2. I'm having trouble verifying with the torontorian result for vector_n={0,0}

from thewalrus.

yu289333 avatar yu289333 commented on July 3, 2024

And for vector_n={0,1} and {1,0}, the probability is (x-1)/x.(x+ln(1-x)) where x=[tanh(r)]^2. I hope to compare with the torontorian result.

from thewalrus.

nquesada avatar nquesada commented on July 3, 2024

Hi --- The easiest way to calculate these probabilities is to use threshold_detection_prob. For a two mode squeezed vacuum state you can do

import numpy as np
from thewalrus.symplectic import two_mode_squeezing
from thewalrus._torontonian import threshold_detection_prob

n_mean =  np.arcsinh(1.0)
cov = two_mode_squeezing(2*n_mean, 0)
mean = np.zeros([4])
patterns = [[0,0], [0,1], [1,0], [1,1]]
probs = [threshold_detection_prob(mean, cov, pat) for pat in patterns]
for i, pat in enumerate(patterns):
    print("The probability of the event "+str(pat)+" is "+str(probs[i]))

to get

The probability of the event [0, 0] is (0.4999999999999999+0j)
The probability of the event [0, 1] is (1.1102230246251563e-16+0j)
The probability of the event [1, 0] is (1.1102230246251563e-16+0j)
The probability of the event [1, 1] is (0.5000000000000001+0j)

As for your question

Sorry for asking all the questions. I'm on the physics side and am overwhelmed by all the math. For N=2, and vector_n = {1, 0}, O{n} should be a 2x2 matrix, it's not possible to go over S∈P([ℓ]), right? Where do I get wrong?

in that case [ℓ] = [2] = [0,1] and the P[ℓ] = [[], [0], [1], [0,1]]

from thewalrus.

yu289333 avatar yu289333 commented on July 3, 2024

Thanks. I forgot to mention that my trouble is to calculate the results of TMSS photons going through a symmetric beam splitter to compare with the original Hong-Ou-Mandel experiment.

from thewalrus.

nquesada avatar nquesada commented on July 3, 2024

You can generate the relevant covariance matrices either using the symplectic module or Strawberry Fields. Once you have the covariance matrix you can pass them to threshold_detection_prob as above.

from thewalrus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.