Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic Objects for Local and Remote entanglement generation processes #45

Merged
merged 14 commits into from
Sep 28, 2023

Conversation

ba2tro
Copy link
Member

@ba2tro ba2tro commented Sep 23, 2023

No description provided.

@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Merging #45 (3201e1b) into master (d33a453) will decrease coverage by 0.71%.
The diff coverage is 56.73%.

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
- Coverage   64.00%   63.29%   -0.71%     
==========================================
  Files          23       27       +4     
  Lines         975     1079     +104     
==========================================
+ Hits          624      683      +59     
- Misses        351      396      +45     
Files Coverage Δ
src/QuantumSavory.jl 59.68% <ø> (ø)
src/StatesZoo/zalm_pair/ret_cxy.jl 100.00% <100.00%> (ø)
src/StatesZoo/StatesZoo.jl 50.00% <50.00%> (ø)
...ngle_dual_rail_midswap/single_dual_rail_midswap.jl 91.30% <91.30%> (ø)
src/StatesZoo/zalm_pair/zalm_pair.jl 22.22% <22.22%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Krastanov Krastanov changed the title Translated Matlab code Symbolic Objects for Local and Remote entanglement generation processes Sep 23, 2023
@Krastanov
Copy link
Member

May we reorganize things a bit. Could you make two folders inside of the newly created StatesZoo folder, one for each of the two new objects. And then keep the matlab code for each in the corresponding folder. Let's also have a name that describes a bit more the "why" not the "what".

@Krastanov
Copy link
Member

Krastanov commented Sep 23, 2023

something like

StatesZoo
- cascaded_source
-- precursor_code (that contains a readme explaining what was done to the code)
- entanglement_swap
-- precursor_code (again with explanation of what was done to it)

Keep in mind that these two things are very different types of processes and states, they should not be lumped together.

Also, keep the express statements local, do not put them in a completely different file (when you write them -- I thought they are implemented already, but I misread something).

@Krastanov
Copy link
Member

We need to figure out how to name these objects.

For the cascaded source, Saikat and Dirk refer to it as "ZALM source" for Zero-added-noise Multiplexed. It comes from https://arxiv.org/abs/2206.03670 and https://arxiv.org/abs/2206.03670
So let's call the symbolic object ZALMpair and let's have it printed out as ρᶻᵃˡᵐ.

When you set up its doc string, please leave in [](@cite) references to these two papers. In terms of how to do the references, they need to be added as bibtex to the bibfile in the doc src folder. See for instance this pull request and the bibtex and docstrings in it https://github.com/QuantumSavory/QuantumSavory.jl/pull/37/files

The best way to get up-to-date bibtex references is from google scholar.

@Krastanov
Copy link
Member

For the midswap folder, let's have two separate symbolic objects defined there. Maybe for names we can use DualRailMidSwapBell and SingleRailMidSwapBell. Not quite sure about the names, please feel free to suggest better ones. Not quite sure for their unicode/latex representation either. Maybe ρᵈʳᵐˢ and ρˢʳᵐˢ but again, please feel free suggesting something better.

@Krastanov
Copy link
Member

In terms of how to do the symbolics, check out this file and how "SpecialKet" is done there https://github.com/QuantumSavory/QuantumSymbolics.jl/blob/main/src/QSymbolicsBase/predefined.jl

The issue is that we do not really have the same for density matrices. I think a good way to do this is to make abstract type AbstractTwoQubitState <: AbstractTwoQubitState end (that probably should be in QuantumSymbolics) and then make a struct ZALMPair <: AbstractTwoQubitState (in QuantumSavory).

@ba2tro
Copy link
Member Author

ba2tro commented Sep 25, 2023

The cascaded_source folder has two functions for generating density matrices, one in the spin-spin basis(called cascaded_source_spin) which outputs a 4x4 density matrix and another in fock basis(called cascaded_source_photonic) which outputs a 36x36 matrix, currently I have implemented the symbolic object ρᶻᵃˡᵐ being expressed as the one in spin-spin basis. Let me know what we should name the other one, it would be a small change.

Also, in the above comment the part

I think a good way to do this is to make abstract type AbstractTwoQubitState <: AbstractTwoQubitState end

was not clear, so for now I did abstract type AbstractTwoQubitState <: AbstractTwoQubitOp end , let me know if you feel we should do it differently.

Then, I was not sure if we need the const cascaded_source_basis as a symbolic object, so its currently left as such, let me know what you think would be the best way to represent it.

## Overview
This folder contains the functions required to generate the spin-spin density matrix for a cascaded source swapped with emissive memories. The functions are written in MATLAB. The functions are:
- cascaded_source_photonic.m : Generates the photonic density matrix for a cascaded source from the papers Refs. 1 and 2.
- cascaded_source_spin.m : Generates the spin-spin density matrix for a cascaded source swapped with emissive spin memories from the papers Ref. 3.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Abhishek-1Bhatt , can you confirm that we currently just implement cascaded_source_spin.m - the photinic and basis files might be used in the future, but are not currently used in any symbolic objects, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the function for photonic density matrix has been translated to Julia, but there is no symbolic object for it right now. Same with the basis, I have declared it as a const in the module file StatesZoo.jl but its not used anywhere.

using QuantumSymbolics: withmetadata, @withmetadata, Metadata
import QuantumSymbolics: express_nolookup

export cascaded_source_photonic, cascaded_source_spin, midswap_dual_rail, midswap_single_rail, ZALMpair
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's export only the symbolic objects (the structs), nothing else


## Reference
1. [P. Dhara, S. J. Johnson, C. N. Gagatsos, P. G. Kwiat, S. Guha, Heralded Multiplexed High-Efficiency Cascaded Source of Dual-Rail Entangled Photon Pairs Using Spontaneous Parametric Down-Conversion. Phys. Rev. Appl. 17, 034071 (2022).](https://arxiv.org/abs/2107.14360)
2. [K. C. Chen, et al., Zero-Added-Loss Entangled-Photon Multiplexing for Ground- and Space-Based Quantum Networks. Phys. Rev. Appl. 19, 054029 (2023).](https://arxiv.org/abs/2206.03670)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference 1 and 2 also matter. In ZALMPair we should say something along the lines "cascaded source (from 1 and 2) that is then stored in spin memories (from 3)". Could you update the references to include 1 and 2?


"""
Generate symbolic object for the spin-spin density matrix for a
cascaded source swapped with emissive spin memories from the paper [prajit2023entangling](@cite)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is where I am suggestion we also mention ref 1 and 2

Generate symbolic object for the spin-spin density matrix for a
cascaded source swapped with emissive spin memories from the paper [prajit2023entangling](@cite)
"""
@withmetadata struct ZALMpair <: AbstractTwoQubitState
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To distinguish from the photonic one, let's call it ZALMSpinPair

cascaded source swapped with emissive spin memories from the paper [prajit2023entangling](@cite)
"""
@withmetadata struct ZALMpair <: AbstractTwoQubitState
Ns::Float64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you document what each of these parameters means? Prajit has that explained in his readmes -- basically just copy that, for all symbolic structs.

@Krastanov
Copy link
Member

could you add a few tests, something along the lines of:

reg = Register(2)
initialize!(reg[1:2], symbolicstate)
observable(reg[1:2], some_observable)

just to make sure that the API is not broken

@Krastanov Krastanov merged commit b784e1b into QuantumSavory:master Sep 28, 2023
1 of 9 checks passed
@ba2tro ba2tro deleted the stateszoo branch September 29, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants