-
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.
- Loading branch information
1 parent
938249d
commit f70cf2e
Showing
12 changed files
with
109 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from quasi.simulation import Simulation | ||
from quasi.experiement import Experiement | ||
from quasi.components.gates import Squeezing, Beamsplitter, Phase | ||
from math import pi | ||
import numpy as np | ||
from quasi._math.fock import mean_photon | ||
from quasi._math.fock.ops import fock_state, tensor, vacuumStateMixed, adagger, apply_gate_BLAS, fock_operator | ||
|
||
|
||
squeezing_gate = Squeezing(r=0.1, phi=pi, cutoff=3) | ||
|
||
bs_gate = Beamsplitter(theta=pi/4, phi=pi/2, cutoff=3) | ||
|
||
phase_gate = Phase(phi=pi/4, cutoff=10) | ||
|
||
exp_1 = Experiement(num_modes=3, cutoff=3) | ||
|
||
exp_1.state_init(1, modes=[0]) | ||
|
||
#exp_1.add_operation(bs_gate.get_operator().transpose((0, 2, 1, 3)), [0, 1]) | ||
#exp_1.add_operation(squeezing_gate.get_operator(), [0]) | ||
|
||
exp_1.execute() | ||
|
||
state = exp_1.state | ||
print(state.dm().shape) | ||
|
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
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
Empty file.
Empty file.
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,9 @@ | ||
from qutip import sigmax, sigmay, sigmaz, destroy, create, mesolve | ||
|
||
|
||
class Operators: | ||
raise NotImplementedError | ||
|
||
|
||
class SpinHamiltonian: | ||
raise NotImplementedError |
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,27 @@ | ||
from quasi.simulation import Simulation | ||
from quasi.experiement import Experiement | ||
from quasi.components.gates import Squeezing, Beamsplitter, Phase | ||
from math import pi | ||
import numpy as np | ||
from quasi._math.fock import mean_photon | ||
from quasi._math.fock.ops import fock_state, tensor, vacuumStateMixed, adagger, apply_gate_BLAS, fock_operator | ||
|
||
|
||
squeezing_gate = Squeezing(r=0.1, phi=pi, cutoff=3) | ||
|
||
bs_gate = Beamsplitter(theta=pi/4, phi=pi/2, cutoff=3) | ||
|
||
phase_gate = Phase(phi=pi/4, cutoff=10) | ||
|
||
exp_1 = Experiement(num_modes=3, cutoff=3) | ||
|
||
exp_1.state_init(1, modes=[0]) | ||
|
||
#exp_1.add_operation(bs_gate.get_operator().transpose((0, 2, 1, 3)), [0, 1]) | ||
#exp_1.add_operation(squeezing_gate.get_operator(), [0]) | ||
|
||
exp_1.execute() | ||
|
||
state = exp_1.state | ||
print(state.dm().shape) | ||
|
This file was deleted.
Oops, something went wrong.
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 .experiment_manager import Experiment |
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