qnet.algebra.library.circuit_components module¶
Collection of essential circuit components
Summary¶
Classes:
Beamsplitter |
Infinite bandwidth beamsplitter component. |
CoherentDriveCC |
Coherent displacement of the input field |
PhaseCC |
Coherent phase shift cicuit component |
__all__
: Beamsplitter
, CoherentDriveCC
, PhaseCC
Reference¶
-
class
qnet.algebra.library.circuit_components.
CoherentDriveCC
(*, label=None, **kwargs)[source]¶ Bases:
qnet.algebra.core.circuit_algebra.Component
Coherent displacement of the input field
Typically, the input field is the, displaced by a complex amplitude \(\alpha\). This component serves as the model of an ideal laser source without internal non-classical internal dynamics.
The coherent drive is represented as an inhomogeneous Lindblad operator \(L = \alpha\), with a trivial Hamiltonian and scattering matrix. For a complete circuit with coherent drives, the inhomogeneous Lindblad operators can be transformed to driving terms in the total network Hamiltonian through
move_drive_to_H()
.Parameters: - label – label for the component.
- displacement – the coherent displacement amplitude. Defaults to a complex symbol ‘alpha’
-
CDIM
= 1¶ circuit dimension
-
PORTSIN
= ('in',)¶
-
PORTSOUT
= ('out',)¶
-
ARGNAMES
= ('displacement',)¶
-
DEFAULTS
= {'displacement': alpha}¶
-
IDENTIFIER
= 'W'¶
-
displacement
¶ The displacement argument.
-
class
qnet.algebra.library.circuit_components.
PhaseCC
(*, label=None, **kwargs)[source]¶ Bases:
qnet.algebra.core.circuit_algebra.Component
Coherent phase shift cicuit component
The field passing through obtains a phase factor \(e^{i \phi}\) for a real-valued phase \(\phi\). The component has no dynamics, i.e. a trivial Hamiltonian and Lindblad operators
Parameters: - label – label for the component.
- phase – the phase. Defaults to a real symbol ‘phi’
-
CDIM
= 1¶
-
PORTSIN
= ('in',)¶
-
PORTSOUT
= ('out',)¶
-
ARGNAMES
= ('phase',)¶
-
DEFAULTS
= {'phase': phi}¶
-
IDENTIFIER
= 'Phase'¶
-
phase
¶ The phase argument.
-
class
qnet.algebra.library.circuit_components.
Beamsplitter
(*, label=None, **kwargs)[source]¶ Bases:
qnet.algebra.core.circuit_algebra.Component
Infinite bandwidth beamsplitter component.
It is a pure scattering component, i.e. it’s internal dynamics are not modeled explicitly (trivial Hamiltonian and Lindblad operators). The single real parameter is the mixing_angle for the two signals.
\[\begin{split}S = \begin{pmatrix} \cos{\theta} & -\sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{pmatrix}\end{split}\]The beamsplitter uses the following labeled input/output channels:
│1:vac │ 0:in v 0:tr ────>/────> │ │1:rf v
That is, output channel 0 is the transmission of input channel 0 (“in”), and output channel 1 is the reflection of input channel 0; vice versa for the secondary input channel 1 (“vac”: often connected to a vacuum mode). For \(\theta=0\), the beam splitter results in full transmission, and full reflection for \(\theta=\pi/2\).
Parameters: - label – label for the beamsplitter.
- mixing_angle – the angle that determines the ratio of transmission and reflection defaults to \(\pi/4\), corresponding to a 50-50-beamsplitter. It is recommended to use a sympy expression for the mixing angle.
Note
We use a real-valued, but asymmetric scattering matrix. A common alternative convention for the beamsplitter is the symmetric scattering matrix
\[\begin{split}S = \begin{pmatrix} \cos{\theta} & i\sin{\theta} \\ i \sin{\theta} & \cos{\theta} \end{pmatrix}\end{split}\]To achieve the symmetric beamsplitter (or any general beamsplitter), the
Beamsplitter
component can be combined with one or more appropriatePhaseCC
components.-
CDIM
= 2¶ circuit dimension
-
PORTSIN
= ('in', 'vac')¶
-
PORTSOUT
= ('tr', 'rf')¶
-
ARGNAMES
= ('mixing_angle',)¶
-
DEFAULTS
= {'mixing_angle': pi/4}¶
-
IDENTIFIER
= 'BS'¶
-
mixing_angle
¶ The mixing_angle argument.