Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
apchytr committed Dec 19, 2024
1 parent 803c6c7 commit 82286bd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mrmustard/lab_dev/transformations/attenuator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Attenuator(Channel):
>>> channel = Attenuator(modes=[1, 2], transmissivity=0.1)
>>> assert channel.modes == [1, 2]
>>> assert np.allclose(channel.transmissivity.value, [0.1, 0.1])
>>> assert np.allclose(channel.parameters.transmissivity.value, [0.1, 0.1])
Args:
modes: The modes this gate is applied to.
Expand Down
4 changes: 2 additions & 2 deletions mrmustard/lab_dev/transformations/bsgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class BSgate(Unitary):
>>> unitary = BSgate(modes=[1, 2], theta=0.1)
>>> assert unitary.modes == [1, 2]
>>> assert np.allclose(unitary.theta.value, 0.1)
>>> assert np.allclose(unitary.phi.value, 0.0)
>>> assert np.allclose(unitary.parameters.theta.value, 0.1)
>>> assert np.allclose(unitary.parameters.phi.value, 0.0)
Args:
modes: The modes this gate is applied to.
Expand Down
4 changes: 2 additions & 2 deletions mrmustard/lab_dev/transformations/dgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class Dgate(Unitary):
>>> unitary = Dgate(modes=[1, 2], x=0.1, y=[0.2, 0.3])
>>> assert unitary.modes == [1, 2]
>>> assert np.allclose(unitary.x.value, [0.1, 0.1])
>>> assert np.allclose(unitary.y.value, [0.2, 0.3])
>>> assert np.allclose(unitary.parameters.x.value, [0.1, 0.1])
>>> assert np.allclose(unitary.parameters.y.value, [0.2, 0.3])
Args:
modes: The modes this gate is applied to.
Expand Down
2 changes: 1 addition & 1 deletion mrmustard/lab_dev/transformations/fockdamping.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FockDamping(Operation):
>>> input_state = Coherent(modes=[0], x=1, y=0.5)
>>> output_state = input_state >> operator
>>> assert operator.modes == [0]
>>> assert np.allclose(operator.damping.value, [0.1, 0.1])
>>> assert np.allclose(operator.parameters.damping.value, [0.1, 0.1])
>>> assert output_state.L2_norm < 1
Args:
Expand Down
2 changes: 1 addition & 1 deletion mrmustard/lab_dev/transformations/gaussrandnoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GaussRandNoise(Channel):
>>> channel = GaussRandNoise(modes=[1, 2], Y = .2 * np.eye(4))
>>> assert channel.modes == [1, 2]
>>> assert np.allclose(channel.Y.value, .2 * np.eye(4))
>>> assert np.allclose(channel.parameters.Y.value, .2 * np.eye(4))
Args:
modes: The modes the channel is applied to
Expand Down
4 changes: 2 additions & 2 deletions mrmustard/lab_dev/transformations/s2gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class S2gate(Unitary):
>>> unitary = S2gate(modes=[1, 2], r=1)
>>> assert unitary.modes == [1, 2]
>>> assert np.allclose(unitary.r.value, 1)
>>> assert np.allclose(unitary.phi.value, 0.0)
>>> assert np.allclose(unitary.parameters.r.value, 1)
>>> assert np.allclose(unitary.parameters.phi.value, 0.0)
Args:
modes: The modes this gate is applied to.
Expand Down
4 changes: 2 additions & 2 deletions mrmustard/lab_dev/transformations/sgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class Sgate(Unitary):
>>> unitary = Sgate(modes=[1, 2], r=0.1, phi=[0.2, 0.3])
>>> assert unitary.modes == [1, 2]
>>> assert np.allclose(unitary.r.value, [0.1, 0.1])
>>> assert np.allclose(unitary.phi.value, [0.2, 0.3])
>>> assert np.allclose(unitary.parameters.r.value, [0.1, 0.1])
>>> assert np.allclose(unitary.parameters.phi.value, [0.2, 0.3])
Args:
modes: The modes this gate is applied to.
Expand Down

0 comments on commit 82286bd

Please sign in to comment.