-
Notifications
You must be signed in to change notification settings - Fork 24
Piecemaker #288
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
base: master
Are you sure you want to change the base?
Piecemaker #288
Conversation
…delity computation (new observable is projector of nclient-GHZ state)
… consume simulation time
… distribution time and ghz-state fidelity as dataframe
…first round of entanglement
… in piecemaker env; updated gitignore
…nglerProt (and therefore deleted SelectedEntanglerProt); added Depolarization test to the kraus_lindblad test set
…eded anymore for event driven simulation; added small testfile to see workings of initiate();
…ded docstring and jldoctest to fusioncircuit
…multiple lindblad operators); added kraus-vs-lindblad evolution test to
examples/piecemakerswitch/README.md
Outdated
| The fusion operation is performed on the switch node. Let's take a client who just managed to generate a bipartide entangled state -- entangled link -- with its associated qubit at the switch side. The switch executes a `CNOT` gate on the client's qubit (target) and the piecemaker qubit (control). Next, the switch measures the client qubit in the computational basis and sends the outcome to the client (in order to apply the necessary Pauli correction). This procedure merges the bipartide state into the (entangled) state that the piecemaker qubit is currently part of, modulo any required Pauli corrections. | ||
|
|
||
| # Noise | ||
| The memories residing in the nodes' `Register`s suffer from depolarizing noise, see [`Depolarization`](https://github.com/QuantumSavory/QuantumSavory.jl/blob/2d40bb77b2abdebdd92a0d32830d97a9234d2fa0/src/backgrounds.jl#L18). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a link to the docs, not to the code?
examples/piecemakerswitch/README.md
Outdated
| @@ -0,0 +1,52 @@ | |||
| # System Overview | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a link to your arxiv
| SwitchNode->>SwitchNode: Keep checking | ||
| end | ||
| end | ||
| ``` No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the readme of https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/simpleswitch and https://github.com/QuantumSavory/QuantumSavory.jl/tree/master/examples/state_explorer to add similar structural components like a spelled out link to docs and a link to live example (just make up one in the same style, e.g. areweentagledyet...../PICK_A_NAME) -- I will make sure it runs by the time we merge this
| - The current n-qubit state (the clients’ memory qubits) is compared to the ideal GHZₙ target state. The resulting fidelity is plotted as a point on the left over the number of taken time steps Δt. | ||
|
|
||
| Noise model: | ||
| - Memory qubits are subject to depolarizing noise ([`Depolarization`](https://github.com/QuantumSavory/QuantumSavory.jl/blob/2d40bb77b2abdebdd92a0d32830d97a9234d2fa0/src/backgrounds.jl#L18) background). The slider “mem depolar prob” controls the memory depolarization probability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to docs
| end | ||
|
|
||
| content = md""" | ||
| Pick simulation settings and hit “Run once”. The left panel plots the running fidelity to the target GHZ state; the right panel shows the network state as it evolves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to your paper
| @@ -0,0 +1,59 @@ | |||
| include("setup.jl") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this whole file to the example tests (see how they are structured)
| @@ -0,0 +1,33 @@ | |||
| include("setup.jl") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this to the example tests with plots (and check if the other examples use CairoMakie and switch to it if necessary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other examples use GLMakie and WGLMakie as well (e.g., congestionchain, simpleswitch, repeatergrid)
| @@ -0,0 +1,17 @@ | |||
| [deps] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tests run with a different project.toml file -- in case some tests fail with a missing dependency, probably you just need to add the dependency to the test project.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I run julia --project=. runtests.jl in test I get the following error
"ERROR: LoadError: UndefVarError: onchange not defined in Main.var"##234""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that might be because of a weird setup for your project environment; we can debug it with ] status
| link_success_prob::Float64, seed::Int, logging::DataFrame, rounds::Int) | ||
|
|
||
| # Set a random seed | ||
| Random.seed!(seed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep things random!
|
I forgot to share the comment from today's meeting. Here it is: |
| ) | ||
|
|
||
| timed = @elapsed run(sim) | ||
| println("Simulation finished in $(timed) seconds") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it into a log statement so that it does not pollute the logs in the test runner
|
|
||
| fig = plot_fidelity(logging) | ||
| display(fig) | ||
| wait() # keeps REPL open until the figure is closed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this block the tests?
|
|
||
| @info "Simulation with $(nclients) clients finished in $(elapsed_time) seconds" | ||
| end | ||
| println(results_per_client) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log, not print
This PR adds a quantum switch example: a central node serves n-GHZ states to n users using the Piecemaker protocol. The interactive version
live_visualization_network_interactive.jluses WGLMakie and can be integrated as interactive visualization in the docs. In this example, the user can select parameter settings forlink_success_probabilityandmemory_depolarization_probability. A live plot shows fidelity vs simulation time Δt, where points accumulate across runs so one can compare settings. A second panel shows the network evolving during protocol execution: edges appear when links are established; fusions and measurements then trigger the visual updates.The example also includes a script that produces a static plot of the performance
static_vic.jlas well as just a separate simple run filesimple_run.jlwhich only collects performance data in a table without plotting. Both of these files importsetup.jl.