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§
- QirLabeled
Formatter - Formatter for QIR Output Spec results.
- QirOutput
- A concrete output buffer with a malformed-value count.
Enums§
- Formatted
Value - The result of applying type-specific formatting to a value.
- QShot
ValType - Scalar values in a shot.
- Qsys
Shot Item Value - Invalid inputs are retained so the formatter can skip them.
Type Aliases§
- QirMetadata
- Metadata written into the first shot header.
- Qsys
Shot - All named values in one execution shot.
- Qsys
Shot Item - A named value from one shot, normally using
USER:<TYPE>:<TAG>. - Qsys
Shots - A collection of execution shots.