-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from tqsd/time-awareness
Time awareness
- Loading branch information
Showing
87 changed files
with
2,806 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.local_dir.el | ||
.*.el | ||
|
||
.DS_Store | ||
.idea | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "photon-weave"] | ||
path = photon-weave | ||
url = git@github.com:tqsd/photon_weave.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .custom_phase_shifter_device import CustomPhaseShift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from .custom_phase_shifter_device import CustomPhaseShift | ||
|
||
|
||
from quasi.simulation import Simulation, SimulationType, ModeManager | ||
from quasi.devices.sources import IdealNPhotonSource, IdealCoherentSource | ||
from quasi.devices.control import SimpleTrigger | ||
from quasi.backend.fock_first_backend import FockBackendFirst | ||
from quasi.signals import GenericBoolSignal, GenericQuantumSignal | ||
|
||
import numpy as np | ||
from math import pi | ||
np.set_printoptions(suppress=True) | ||
np.set_printoptions(linewidth=200) | ||
|
||
sim = Simulation() | ||
sim.set_backend(FockBackendFirst()) | ||
sim.set_dimensions(3) | ||
|
||
|
||
S = IdealNPhotonSource("Source") | ||
S.set_photon_num(1) | ||
trigger = SimpleTrigger() | ||
|
||
signals = {} | ||
signals["trigger"] = GenericBoolSignal() | ||
signals["qsig1"] = GenericQuantumSignal() | ||
|
||
trigger.register_signal(signal=signals["trigger"], port_label="trigger") | ||
S.register_signal(signal=signals["trigger"], port_label="trigger") | ||
|
||
PS = CustomPhaseShift("Custom Phase Shift") | ||
PS.set_params(pi/4, 1, 1, 0) | ||
|
||
S.register_signal(signal=signals["qsig1"], port_label="output") | ||
PS.register_signal(signal=signals["qsig1"], port_label="input") | ||
|
||
state = exp.state | ||
print(state.all_fock_probs()) |
Oops, something went wrong.