Struct qcgpu::backends::OpenCL [−][src]
Fields
buffer: Buffer<Complex<f32>>
OpenCL Buffer for the state vector
Methods
impl OpenCL
[src]
impl OpenCL
pub fn new(num_qubits: u8) -> Result<OpenCL, Error>
[src]
pub fn new(num_qubits: u8) -> Result<OpenCL, Error>
Initialize a new OpenCL Backend
Takes an argument of the number of qubits to use in the register, and returns a result with the backend.
Trait Implementations
impl Debug for OpenCL
[src]
impl Debug for OpenCL
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Backend for OpenCL
[src]
impl Backend for OpenCL
fn apply_gate(&mut self, gate: Gate, target: u8) -> Result<(), Error>
[src]
fn apply_gate(&mut self, gate: Gate, target: u8) -> Result<(), Error>
fn apply_controlled_gate(
&mut self,
gate: Gate,
control: u8,
target: u8
) -> Result<(), Error>
[src]
fn apply_controlled_gate(
&mut self,
gate: Gate,
control: u8,
target: u8
) -> Result<(), Error>
fn measure(&mut self) -> Result<u64, Error>
[src]
fn measure(&mut self) -> Result<u64, Error>
Measure the whole register, leaving the register in the measured state
Note: Currently this leaves the register in the unmeasured state.
fn measure_qubit(&mut self, _target: u8) -> Result<u64, Error>
[src]
fn measure_qubit(&mut self, _target: u8) -> Result<u64, Error>
Measure the value of a single qubit, leaving the register in the state where only that qubit (or any entangled qubits) have been collapsed
fn num_qubits(&self) -> u8
[src]
fn num_qubits(&self) -> u8
Get the number of qubits that this backend was initialized for
impl Display for OpenCL
[src]
impl Display for OpenCL