[−][src]Trait q1tsim::export::CQasm
Trait for gates that can be represented in c-Qasm.
Provided methods
fn c_qasm(&self, _bit_names: &[String], _bits: &[usize]) -> Result<String>
cQasm representation
Return an cQasm instruction string for this gate operating on qubits
bits
. The array bit_names
contains the names of all qubits. The
default implementation returns a NotImplemented error.
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
cQasm representation of conditional gate.
Return the cQasm representation of a gate that is only executed when
the condition condition
on the classical bits of the program state
holds. The default implementation only works for a single gate,
composite gates (like Composite
or Kron
) should overwrite this
default. On success, returns Ok
with the instruction string. On error,
returns Err
with an error message.
Implementors
impl CQasm for CCRX
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CCRY
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CCRZ
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CCX
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CCZ
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CH
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CRX
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CRY
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CRZ
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CS
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CSdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CT
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CTdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CU1
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CU2
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CU3
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CV
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CVdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CX
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CY
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for CZ
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Composite
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for H
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for I
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Loop
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for RX
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for RY
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for RZ
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for S
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Sdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Swap
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for T
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Tdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for U1
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for U2
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for U3
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for V
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Vdg
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for X
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Y
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl CQasm for Z
[src]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl<G0, G1> CQasm for Kron<G0, G1> where
G0: CQasm,
G1: CQasm,
[src]
G0: CQasm,
G1: CQasm,