Struct spynoza::QuantumCircuit
source · pub struct QuantumCircuit { /* private fields */ }
Implementations§
source§impl QuantumCircuit
impl QuantumCircuit
pub fn new(registers: &PyTuple) -> Self
pub fn register_sizes(&self) -> Vec<usize>
pub fn state_vector(&self) -> PyResult<PyState>
pub fn transformations(&self) -> Vec<PyQuantumTransformation>
pub fn inverse(&mut self)
pub fn h(&mut self, target: usize)
pub fn x(&mut self, target: usize)
pub fn y(&mut self, target: usize)
pub fn z(&mut self, target: usize)
pub fn p(&mut self, angle: Float, target: usize)
pub fn rx(&mut self, angle: Float, target: usize)
pub fn ry(&mut self, angle: Float, target: usize)
pub fn rz(&mut self, angle: Float, target: usize)
pub fn u(&mut self, theta: Float, phi: Float, lambda: Float, target: usize)
pub fn ch(&mut self, control: usize, target: usize)
pub fn cx(&mut self, control: usize, target: usize)
pub fn ccx(&mut self, control0: usize, control1: usize, target: usize)
pub fn cy(&mut self, control: usize, target: usize)
pub fn cu( &mut self, theta: Float, phi: Float, lambda: Float, control: usize, target: usize )
pub fn cp(&mut self, angle: Float, control: usize, target: usize)
pub fn crx(&mut self, angle: Float, control: usize, target: usize)
pub fn cry(&mut self, angle: Float, control: usize, target: usize)
pub fn crz(&mut self, angle: Float, control: usize, target: usize)
pub fn measure(&mut self, target: usize)
pub fn swap(&mut self, t0: usize, t1: usize)
pub fn iqft(&mut self, targets: Vec<usize>)
pub fn bit_flip_noise(&mut self, prob: Float, target: usize)
pub fn add(&mut self, q_transformation: QuantumTransformation)
pub fn append( &mut self, circuit: &QuantumCircuit, quantum_register: &QuantumRegister )
pub fn c_append( &mut self, circuit: &QuantumCircuit, c: usize, quantum_register: &QuantumRegister )
pub fn mc_append( &mut self, circuit: &QuantumCircuit, cs: Vec<usize>, quantum_register: &QuantumRegister )
pub fn execute(&mut self)
Trait Implementations§
source§impl IntoPy<Py<PyAny>> for QuantumCircuit
impl IntoPy<Py<PyAny>> for QuantumCircuit
source§impl PyClassImpl for QuantumCircuit
impl PyClassImpl for QuantumCircuit
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = SendablePyClass<QuantumCircuit>
type ThreadChecker = SendablePyClass<QuantumCircuit>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<QuantumCircuit> for PyClassImplCollector<QuantumCircuit>
impl PyClassNewTextSignature<QuantumCircuit> for PyClassImplCollector<QuantumCircuit>
fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a QuantumCircuit
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a QuantumCircuit
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut QuantumCircuit
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut QuantumCircuit
source§impl PyMethods<QuantumCircuit> for PyClassImplCollector<QuantumCircuit>
impl PyMethods<QuantumCircuit> for PyClassImplCollector<QuantumCircuit>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for QuantumCircuit
impl PyTypeInfo for QuantumCircuit
§type AsRefTarget = PyCell<QuantumCircuit>
type AsRefTarget = PyCell<QuantumCircuit>
Utility type to make Py::as_ref work.
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.Auto Trait Implementations§
impl RefUnwindSafe for QuantumCircuit
impl Send for QuantumCircuit
impl Sync for QuantumCircuit
impl Unpin for QuantumCircuit
impl UnwindSafe for QuantumCircuit
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