Struct roqoqo::operations::Squeezing
source · pub struct Squeezing {
mode: usize,
squeezing: CalculatorFloat,
phase: CalculatorFloat,
}
Expand description
The single-mode squeezing gate with tunable squeezing.
The squeezing gate is a quantum operation that allows for precise manipulation of quantum states, by reducing the uncertainty in one variable and therefore increasing the uncertainty of another. https://arxiv.org/pdf/quant-ph/0106157.pdf
Fields§
§mode: usize
The mode the squeezing gate is applied to.
squeezing: CalculatorFloat
The coefficient of the squeezing operation.
phase: CalculatorFloat
The squeezing phase angle of the squeezing operation.
Implementations§
source§impl Squeezing
impl Squeezing
sourcepub fn squeezing(&self) -> &CalculatorFloat
pub fn squeezing(&self) -> &CalculatorFloat
Returns the value of the field squeezing
.
sourcepub fn phase(&self) -> &CalculatorFloat
pub fn phase(&self) -> &CalculatorFloat
Returns the value of the field phase
.
sourcepub fn new(
mode: usize,
squeezing: CalculatorFloat,
phase: CalculatorFloat
) -> Self
pub fn new( mode: usize, squeezing: CalculatorFloat, phase: CalculatorFloat ) -> Self
Creates a new instance of Squeezing
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Squeezing
impl<'de> Deserialize<'de> for Squeezing
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<Squeezing> for SingleModeGateOperation
impl From<Squeezing> for SingleModeGateOperation
Implements the From trait from this Operation.
source§impl InvolveModes for Squeezing
impl InvolveModes for Squeezing
Implements InvolveModes trait for the bosonic modes involved in this Operation.
source§fn involved_modes(&self) -> InvolvedModes
fn involved_modes(&self) -> InvolvedModes
Returns a list of all involved bosonic modes.
source§impl InvolveQubits for Squeezing
impl InvolveQubits for Squeezing
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Returns all qubits involved in operation.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl OperateSingleMode for Squeezing
impl OperateSingleMode for Squeezing
Implements OperateSingleMode trait for this Operation acting on exactly one bosonic mode.
source§impl PartialEq for Squeezing
impl PartialEq for Squeezing
source§impl Substitute for Squeezing
impl Substitute for Squeezing
Implements Substitute trait allowing to replace symbolic parameters and to perform qubit mappings.
source§fn substitute_parameters(
&self,
calculator: &Calculator
) -> Result<Self, RoqoqoError>
fn substitute_parameters( &self, calculator: &Calculator ) -> Result<Self, RoqoqoError>
Substitutes symbolic parameters in clone of the operation.
source§fn remap_qubits(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_qubits( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps the qubits in clone of the operation.
source§impl SubstituteModes for Squeezing
impl SubstituteModes for Squeezing
Implements SubstituteModes trait allowing to perform bosonic mode mappings.
source§fn remap_modes(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_modes( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps the modes in clone of the operation.
source§impl SupportedVersion for Squeezing
impl SupportedVersion for Squeezing
source§impl TryFrom<ModeGateOperation> for Squeezing
impl TryFrom<ModeGateOperation> for Squeezing
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for Squeezing
impl TryFrom<Operation> for Squeezing
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeGateOperation> for Squeezing
impl TryFrom<SingleModeGateOperation> for Squeezing
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeOperation> for Squeezing
impl TryFrom<SingleModeOperation> for Squeezing
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point6 for Squeezing
impl OperateModeGate for Squeezing
impl OperateSingleModeGate for Squeezing
impl StructuralPartialEq for Squeezing
Auto Trait Implementations§
impl Freeze for Squeezing
impl RefUnwindSafe for Squeezing
impl Send for Squeezing
impl Sync for Squeezing
impl Unpin for Squeezing
impl UnwindSafe for Squeezing
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.