rigetti / qcs-sdk-rust

Rust SDK for Rigetti Quantum Cloud Services (QCS)
https://docs.rs/qcs
13 stars 5 forks source link

Expose error model to both Rust and Python users #491

Open BatmanAoD opened 3 months ago

BatmanAoD commented 3 months ago

There will be new error metadata in the Rigetti gRPC API; once available, this SDK should provide access to that metadata for all clients.

In Rust, distinct errors should be represented as enum variants (though they do not necessarily all need to be part of the same enum). We should additionally keep the existing variants for errors that are not part of the API, such as failure to establish a gRPC connection at all.

In Python, distinct errors should be represented as different Python Exception classes, corresponding 1:1 with the Rust enum variants.

BatmanAoD commented 3 months ago

Note that any new errors defined for this task should also be usable by pyQuil users. If that entails new work in pyquil, a new ticket should be opened there.

MarquessV commented 3 months ago

This relates to #471 in that it is one of the ideas for improving the gRPC experience overall.