Running GHZ States on Ascella

Hello,

I have some questions regarding the execution of the GHZ state on Quandela’s optical quantum computers (Ascella/Altair).

I am trying to execute the circuit generated from the unitary matrix, as described in Decomposing gate-based circuits: qiskit and myQLM — perceval v0.12 documentation

The unitary matrix has a dimension of 10x10 since it uses heralded photons. I am having difficulty identifying which positions correspond to the heralded photons. How can I understand how to generate this matrix with heralded photons?

The circuit generated from the unitary matrix is an approximation that does not use heralded photons. Once I identify which positions correspond to the heralded photons, how should I define the input states?

After several attempts to run the simulation on Ascella, considering the last 4 states as ancillas and the input |1,0,1,0,1,0,0,0,0,0>, the results obtained are far from the expected outcome:

|1,0,1,0,1,0> 1/2
|0,1,0,1,0,1> 1/2

How should I interpret these results?

I would greatly appreciate it if someone could help me.

Thank you!

Hello,

When using a converter, the heralds are always placed on the last modes of the circuit (more generally speaking, it is always the case when you add a Processor that has heralds to another Processor).

As such, the input state you used is the correct one.
For the results, it can be explained by several things:

  • The source of the QPU is not perfect, so you can expect to have some unwanted states at the end (for example, if the photons are distinguishable, it is expected that the cnots fails).
  • Are you enforcing the photons count to be at least 3 with the min_photons_filter parameter of the Processor ? If not, it’s normal that the most probable states don’t have enough photons due to the source imperfection.
  • Can you check that you still have heralded modes defined as heralds in your RemoteProcessor ? I’m not sure that this is normal that you have to specify these modes as input. Maybe you could have to update your perceval version as well

I hope this will help you,

Best regards

Hello, Aubaert.

Indeed, the results improved with your suggestions. I used the following instructions:

input_state = pcvl.BasicState([1,0,1,0,1,0])
remote_simulator.set_circuit(ghz_circ)
remote_simulator.add_herald(6,0)
remote_simulator.add_herald(7,0)
remote_simulator.add_herald(8,0)
remote_simulator.add_herald(9,0)
remote_simulator.with_input(input_state)
remote_simulator.min_detected_photons_filter(3)

And I obtained the following results:

  |1,1,0,0,0,1>: 2547
  |0,0,1,0,1,1>: 1286
  |0,1,1,1,1,0>: 1
  |1,0,0,1,1,0>: 13
  |0,1,0,1,1,0>: 1385
  |1,0,1,0,0,1>: 19
  |1,1,0,1,0,0>: 14
  |0,1,1,0,0,1>: 1379
  |1,0,1,0,1,0>: 7526
  |1,1,0,0,1,0>: 422
  |0,1,1,1,0,0>: 22910
  |0,1,1,1,0,1>: 1
  |1,0,1,1,0,0>: 12
  |1,1,1,1,0,0>: 1
  |0,0,1,1,1,0>: 22769
  |0,0,1,1,0,1>: 30
  |0,1,1,0,1,0>: 1592
  |0,0,0,1,1,1>: 7723
  |0,1,0,1,0,1>: 7574
  |1,1,1,0,1,0>: 1
  |1,0,0,1,0,1>: 7
  |0,1,0,0,1,1>: 1391
  |1,1,1,0,0,0>: 7717
  |1,0,0,0,1,1>: 2618

However, I noticed that |0,1,1,1,0,0> and |0,0,1,1,1,0> have the highest number of samples. Is this normal? Is there any way to improve the results?

I greatly appreciate your response and any help you can provide.

Hello,

Good to hear that the results are better. I think what is still missing is the PostSelect that is needed by the postprocessed cnots to run correctly, as their name suggests.

If you want to apply it by hand afterwards, assuming your results are in a BSCount (the result of Sampler.sample_count()):

res = pcvl.sample_count_to_probs(res)
postselect = pcvl.PostSelect("[0, 1] == 1 & [2, 3] == 1 & [4, 5] == 1")

print(pcvl.post_select_distribution(res, postselect))

The PostSelect here means that you want exactly one photon on each pair of modes that encodes one qubit.

Running this on your results show that the obtained state is one of the expected ones in 77% of cases.

Notice that the adding of the circuit, the heralds and the PostSelect is done automatically if you use

quantum_processor = qiskit_converter.convert(qiskit_circuit, use_postselection=True)

remote_simulator.add(0, quantum_processor)

assuming remote_simulator is a remote Processor.

Best regards