CQASMConverter
- class perceval_interop.cqasm.cqasm_converter.CQASMConverter(backend_name='SLOS', noise_model=None)
cQASM quantum circuit to perceval processor converter.
- Parameters:
backend_name (
str
) – backend name used in the converted processor (default SLOS)
- classmethod check_version(source_string)
Extracts the version number string from a cQASM program
- Parameters:
source_string – the cQASM program stored in a string
- Returns:
a tuple (major, minor) with the version number
- convert(ast, use_postselection=True)
Convert a cQASM quantum program into a Processor.
- Parameters:
ast (a Program object, as returned by the cQASM parser) – the AST of a cQASM program
use_postselection (
bool
) – when True, uses a postprocessed CNOT
as the last gate. Otherwise, uses only heralded CNOT
- Return type:
Processor
- Returns:
the converted processor