[][src]Trait q1tsim::export::CQasm

pub trait CQasm: Gate {
    fn c_qasm(&self, _bit_names: &[String], _bits: &[usize]) -> Result<String> { ... }
fn conditional_c_qasm(
        &self,
        condition: &str,
        bit_names: &[String],
        bits: &[usize]
    ) -> Result<String> { ... } }

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>

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.

Loading content...

Implementors

impl CQasm for CCRX[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CCRY[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CCRZ[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CCX[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CCZ[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CH[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CRX[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CRY[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CRZ[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CS[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CSdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CT[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CTdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CU1[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CU2[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CU3[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CV[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CVdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CX[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CY[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for CZ[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Composite[src]

impl CQasm for H[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for I[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Loop[src]

impl CQasm for RX[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for RY[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for RZ[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for S[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Sdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Swap[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for T[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Tdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for U1[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for U2[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for U3[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for V[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Vdg[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for X[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Y[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl CQasm for Z[src]

fn conditional_c_qasm(
    &self,
    condition: &str,
    bit_names: &[String],
    bits: &[usize]
) -> Result<String>
[src]

impl<G0, G1> CQasm for Kron<G0, G1> where
    G0: CQasm,
    G1: CQasm
[src]

Loading content...