Tell Me about Spin Reversal Transforms (SRTs)

The End of the Getting Started Guide offers a high level description of the benefits of using SRTs, as well as a number of other ways to maximize performance:

For more information, check out the Problem Solving Handbook:

This could be a good place to start, placing SRTs in the broader context of other manners of performance tuning.


In our Problem Solving Handbook the topic is introduced and the benefits of using SRTs and why they were introduced is discussed:


There are two ways to apply an SRT to your problem data.


Method 1: Server-Side SRT


As mentioned in the Problem Solving Handbook, the num_spin_reversal_transforms parameter can be used to request that SRTs are applied to the sample request data.


This parameter is included in the sample call to the sampler object like this:

sampleset = sampler.sample(bqm, num_spin_reversal_transforms=3, num_reads=3)


The num_spin_reversal_transforms parameter tells the server how many times to do an SRT throughout the process of doing num_reads.

This means, for example, that if you had equal values for both num_spin_reversal_transforms and num_reads, an SRT would be applied to each.


For more information about the num_spin_reversal_transforms parameter and SRTs performed on the server, please read:


There are many advantages to performing the SRTs on the server-side, such as efficiency, and the ability to apply post-processing operations with SRTs in mind, to name a few.

Unfortunately, as the SRT is on the server in this case, it is not possible to see the code used.

That said, the client-side implementation is a comparable implementation.


Method 2: Client-Side SRT


Additionally, SRTs can be performed on the client side by using the SpinReversalTransformComposite class. 


This class will automatically apply SRTs, before sending the problems to the server, and then reverse the SRTs after the results are returned.


Here is a link to the documentation:


Here is a link to the implementation:


If for whatever reason, you need slightly different functionality, or have an optimization that you think would speed things up, it's always possible to write your own implementation and share it with the community as well!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.