What should we add?
As a part of the samplex serialization format, samplomatic/executor need to send a list of parameter expressions over the wire. In order to use only the public qpy interface, we do this by creating a single-qubit circuit and placing each parameter expression into an rz gate. With this strategy, because it's common to have tens of thousands of parameters in a circuit, our samplex payloads are often dominated in size by these parameter expressions, rather than the actual DAG of the samplex. For example, in one of our 5k benchmarks, 70% of the samplex serialization is the parameter expression table.
It would be nice if there were a way to serialize and deserialize this more directly.
Here is the object I'd like to serialize: https://github.com/Qiskit/samplomatic/blob/main/samplomatic/samplex/parameter_expression_table.py
Here is how we currently do it: https://github.com/Qiskit/samplomatic/blob/main/samplomatic/serialization/parameter_expression_serializer.py
What should we add?
As a part of the samplex serialization format, samplomatic/executor need to send a list of parameter expressions over the wire. In order to use only the public qpy interface, we do this by creating a single-qubit circuit and placing each parameter expression into an
rzgate. With this strategy, because it's common to have tens of thousands of parameters in a circuit, our samplex payloads are often dominated in size by these parameter expressions, rather than the actual DAG of the samplex. For example, in one of our 5k benchmarks, 70% of the samplex serialization is the parameter expression table.It would be nice if there were a way to serialize and deserialize this more directly.
Here is the object I'd like to serialize: https://github.com/Qiskit/samplomatic/blob/main/samplomatic/samplex/parameter_expression_table.py
Here is how we currently do it: https://github.com/Qiskit/samplomatic/blob/main/samplomatic/serialization/parameter_expression_serializer.py