Skip to main content

Crate _native

Crate _native 

Source
Expand description

QIR labeled formatting, with an optional Python compatibility adapter.

The Rust API accepts typed shot data and returns QIR 2.1 labeled output:

use _native::{
    QShotValType, QirLabeledFormatter, QirMetadata, QsysShotItemValue, QsysShots,
};

let results: QsysShots = vec![vec![(
    "USER:INT:answer".into(),
    QsysShotItemValue::Scalar(QShotValType::Int(42)),
)]];
let output = QirLabeledFormatter::new().qir_labeled_output(&results, &QirMetadata::new());

assert!(output.contains("OUTPUT\tINT\t42\tanswer\n"));

Structs§

QirLabeledFormatter
Formatter for QIR Output Spec results.
QirOutput
A concrete output buffer with a malformed-value count.

Enums§

FormattedValue
The result of applying type-specific formatting to a value.
QShotValType
Scalar values in a shot.
QsysShotItemValue
Invalid inputs are retained so the formatter can skip them.

Type Aliases§

QirMetadata
Metadata written into the first shot header.
QsysShot
All named values in one execution shot.
QsysShotItem
A named value from one shot, normally using USER:<TYPE>:<TAG>.
QsysShots
A collection of execution shots.