pub struct ParametricCRX {
pub control: QubitId,
pub target: QubitId,
pub theta: Parameter,
}Expand description
Specialized implementation of controlled parametric rotation around X-axis
Fields§
§control: QubitIdControl qubit
target: QubitIdTarget qubit
theta: ParameterRotation angle parameter
Implementations§
Trait Implementations§
Source§impl Clone for ParametricCRX
impl Clone for ParametricCRX
Source§fn clone(&self) -> ParametricCRX
fn clone(&self) -> ParametricCRX
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParametricCRX
impl Debug for ParametricCRX
Source§impl GateOp for ParametricCRX
impl GateOp for ParametricCRX
Source§fn is_parameterized(&self) -> bool
fn is_parameterized(&self) -> bool
Returns true if this gate is parameterized
Source§fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
Returns the matrix representation of this gate
Source§fn num_qubits(&self) -> usize
fn num_qubits(&self) -> usize
Returns the number of qubits this gate acts on
Source§impl ParametricGate for ParametricCRX
impl ParametricGate for ParametricCRX
Source§fn parameters(&self) -> Vec<Parameter>
fn parameters(&self) -> Vec<Parameter>
Returns the parameters of the gate
Source§fn parameter_names(&self) -> Vec<String>
fn parameter_names(&self) -> Vec<String>
Returns the names of the parameters
Source§fn with_parameters(
&self,
params: &[Parameter],
) -> QuantRS2Result<Box<dyn ParametricGate>>
fn with_parameters( &self, params: &[Parameter], ) -> QuantRS2Result<Box<dyn ParametricGate>>
Returns a new gate with updated parameters
Source§fn with_parameter_at(
&self,
index: usize,
param: Parameter,
) -> QuantRS2Result<Box<dyn ParametricGate>>
fn with_parameter_at( &self, index: usize, param: Parameter, ) -> QuantRS2Result<Box<dyn ParametricGate>>
Returns a new gate with updated parameter at the specified index
Source§fn assign(
&self,
values: &[(String, f64)],
) -> QuantRS2Result<Box<dyn ParametricGate>>
fn assign( &self, values: &[(String, f64)], ) -> QuantRS2Result<Box<dyn ParametricGate>>
Assigns values to symbolic parameters
Source§fn bind(
&self,
values: &[(String, f64)],
) -> QuantRS2Result<Box<dyn ParametricGate>>
fn bind( &self, values: &[(String, f64)], ) -> QuantRS2Result<Box<dyn ParametricGate>>
Returns the gate with all parameters set to the specified values
Auto Trait Implementations§
impl Freeze for ParametricCRX
impl RefUnwindSafe for ParametricCRX
impl Send for ParametricCRX
impl Sync for ParametricCRX
impl Unpin for ParametricCRX
impl UnwindSafe for ParametricCRX
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
Mutably borrows from an owned value. Read more