You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the QPY file format is designed to be read solely in order where you read one circuit in it's entirety and the next starts immediately after you finish processing it. The representation in the format specification doesn't specify the exact size of the circuit's payload in bytes but gives the details necessary for the parser to know how to read the data and process it. However, in a potential world where we have a parser written in rust (see #13131) and now that we have a path for creating circuits without python (see #14006) there is the possibility of performing deserialization in parallel for QPY payloads with > 1 circuit. However to do this efficiently we need to be able to figure out where each circuit begins in a QPY payload to farm out the deserialization of a circuit to multiple threads. The format isn't really conduicive for this right now because we would have to parse a circuit to know where the next one begins.
To address this a simple solution is to add a small table to the end of the header that contains a list of addresses for each circuit start. The header already contains a circuit count, so we can add immediately follow the header struct with that number of byte offsets in the payload for where each circuit starts. This will require a QPY version bump as it is changing the file format. With that information we will be able to potentially parallelize the deserialization of multiple payloads
The text was updated successfully, but these errors were encountered:
What should we add?
Right now the QPY file format is designed to be read solely in order where you read one circuit in it's entirety and the next starts immediately after you finish processing it. The representation in the format specification doesn't specify the exact size of the circuit's payload in bytes but gives the details necessary for the parser to know how to read the data and process it. However, in a potential world where we have a parser written in rust (see #13131) and now that we have a path for creating circuits without python (see #14006) there is the possibility of performing deserialization in parallel for QPY payloads with > 1 circuit. However to do this efficiently we need to be able to figure out where each circuit begins in a QPY payload to farm out the deserialization of a circuit to multiple threads. The format isn't really conduicive for this right now because we would have to parse a circuit to know where the next one begins.
To address this a simple solution is to add a small table to the end of the header that contains a list of addresses for each circuit start. The header already contains a circuit count, so we can add immediately follow the header struct with that number of byte offsets in the payload for where each circuit starts. This will require a QPY version bump as it is changing the file format. With that information we will be able to potentially parallelize the deserialization of multiple payloads
The text was updated successfully, but these errors were encountered: