qlasskit.qlassfun.QlassF
- class qlasskit.qlassfun.QlassF(name: str, original_f: Callable, args: List[Arg], returns: Arg, exps: List[Tuple[Symbol, Boolean]])
Class representing a qlassf function
- __init__(name: str, original_f: Callable, args: List[Arg], returns: Arg, exps: List[Tuple[Symbol, Boolean]])
Methods
__init__(name, original_f, args, returns, exps)bind(**kwargs)Returns a new QlassF with defined params
circuit()compile([compiler, uncompute])decode_counts(counts[, discard_lower])Decode data from a circuit counts dict
decode_output(istr)draw()encode_input(*qvals)export([framework])Export the circuit to a supported framework
f()Returns the classical python function
from_function(f[, types, defs, to_compile, ...])Create a QlassF from a function or a string containing a function
gate([framework])Returns the gate for a specific framework
to_bqm([fmt])to_logicfun()truth_table([max])Returns the truth table for the function using the sympy boolean for computing
truth_table_header()Returns the list of string containing the truth table header
Attributes
input_qubitsReturns the list of input qubits
input_sizenum_gatesnum_qubitsoutput_qubitsReturns the list of output qubits
output_sizeReturn the size of the return type (in bits)
qubitsReturns all the qubits of the circuit
nameoriginal_fargsreturnsexpressions