Maximum and minimum qubit and coupler values
What are the maximum and minimum values qubit and coupler weights can have?
Also, to what decimal precision can these weights be defined?
What are the maximum and minimum values qubit and coupler weights can have?
Also, to what decimal precision can these weights be defined?
Comments
Hello Malcolm,
You can find the bias ranges in the properties for a given sampler. For example:
Thank you. How many decimal places are relevant?
Hello Malcolm,
Unfortunately there is not a simple number for how precise h and J values can be set. From the programming side, these values can be set as double-precision floats. Once translated to the QPU, however, there are a number of physical effects that impact how much error is experienced.
Sources of error include interactions between neighbouring qubits and annealing parameters. These topics are discussed in detail in the Technical Description of the D-Wave QPU.
If you're interested in how to avoid or mitigate some of these errors, there is a great discussion of approaches in the D-Wave Problem Solving Handbook.
Thank you very much
Where can I find h_range and j_range for solver DW_2000Q_5? Apparently, they are not in D-Wave Solver Properties and Parameters Reference dated 4/29/2019.
Hello,
Those values are available from the Qubist Solver API page.
You just need to click on the solver name from there.
I hope this was helpful.
Please let us know if you need further information.
David J's comments pointed me to the answers. Thank you.
when I put auto_scale=False for dwave 2000q_2_1 that has j_range=[-1.0, 1.0] and h_range = [-2.0, 2.0].
I can submit a bqm with values out of these ranges. e.g I did run a problem with the following minimum and maximum values:
min h:3.4, max h:7.6,
min J:-8, max J:0.4,
And the solver did not complain.
Can someone elaborate how the internals are exactly working here why I can set the values of h,j such that they are clearly not in the valid range anymore?
Details:
BQM:
BinaryQuadraticModel({1144: 7.6, 1148: 3.6, 1272: 3.6, 1145: 3.4, 1273: 3.4, 1150: 7.6, 1142: 3.6, 1147: 3.6, 1277: 7.6, 1269: 3.6, 1275: 3.6, 1146: 7.6, 1149: 3.6, 1274: 3.6, 1139: 7.6, 1140: 3.6, 1141: 3.6, 1270: 7.6, 1278: 3.6, 1267: 3.6, 1143: 7.6, 1151: 3.6, 1137: 3.6, 1271: 7.6, 1265: 3.6, 1279: 3.6, 1136: 3.4, 1264: 3.4}, {(1144, 1150): 0.2, (1144, 1149): 0.2, (1144, 1272): -8, (1144, 1148): -8, (1148, 1145): 0.4, (1148, 1147): 0.2, (1148, 1146): 0.2, (1148, 1140): 0.4, (1272, 1277): 0.4, (1272, 1278): 0.4, (1145, 1150): 0.4, (1145, 1149): 0.4, (1145, 1151): 0.4, (1145, 1273): -8, (1273, 1277): 0.4, (1273, 1279): 0.4, (1150, 1142): -8, (1150, 1147): -8, (1142, 1139): 0.4, (1142, 1137): 0.2, (1142, 1136): 0.4, (1147, 1275): 0.4, (1147, 1151): 0.2, (1277, 1269): -8, (1277, 1275): -8, (1269, 1267): 0.2, (1269, 1265): 0.2, (1269, 1264): 0.4, (1275, 1278): 0.2, (1275, 1279): 0.2, (1146, 1151): 0.4, (1146, 1274): -8, (1146, 1149): -8, (1149, 1141): 0.4, (1274, 1278): 0.4, (1274, 1279): 0.4, (1139, 1267): 0.4, (1139, 1143): 0.13333333333333333, (1139, 1140): -8, (1139, 1141): -8, (1140, 1137): 0.13333333333333333, (1140, 1136): 0.2, (1141, 1137): 0.13333333333333333, (1141, 1136): 0.2, (1270, 1265): 0.2, (1270, 1264): 0.4, (1270, 1267): -8, (1270, 1278): -8, (1267, 1271): 0.2, (1143, 1136): 0.4, (1143, 1137): -8, (1143, 1151): -8, (1137, 1265): 0.4, (1271, 1264): 0.4, (1271, 1265): -8, (1271, 1279): -8, (1136, 1264): -8}, 0.0, Vartype.BINARY)Command:
sampler = DWaveSampler(solver={'lower_noise': False, 'qpu': True})raw_result = sampler.sample(bqm_embedded,num_reads=20,annealing_time=1,auto_scale=False)
Hello,
Because you are using a QUBO as input (i.e. Vartype.BINARY), the biases don't exactly line up the same as with the ising biases.
When the problem is translated into the native ising format of the QPU, they end up being within the acceptable range of values.
You can confirm this by creating a BQM and then outputting the ising form like this:
I hope this helps!
This is a small piece of my BQM:
{ (0, 0): -0.122863516666815,
(1, 1): -3.45068963700112,
(2, 2): -0.457505648866156,
(0, 1): 0.011316139267034,
(0, 2): 0.022632278534069,
(1, 2): 1.45264557068137}
In the BQM dictionary, that value is the "largest coupler/qubit bias", right?
For the "chain_strength", should I use: "1.00", "1.45", "2.00" or abs(-3.45) ?
I'm using "math.ceil(abs(bqm_max)), is this OK?
Thank you
Hello,
Yes, abs(-3.45) is the value you would want to use.
This is where we would suggest someone to start, increasing or decreasing as necessary.
It's not guaranteed that this value will be high enough, but it's a good starting point.
I hope this is helpful!
In the QUBO matrix, there are the Linear (i, i) and Quadratic (i, j) coefficients. Their values represent the "Qubit bias" and "Coupling Strenght" respectively.
For the "chain_strength" value (to avoid the "chain_break_fraction") is recommended to be the same value as the Max Abs Value of the "Linear and Quadratic values" or just the "Linear (qubit bias) value"?
Should I check the maximum absolute value for the Entire matrix or only the Diagonals?
Thank you
Hi Thiago,
I'd suggest checking the maximum absolute value for the entire matrix since linear or quadratic biases can cause a chain break. Here's a simple three variable example to demonstrate. Here we set the chain strength to equal the maximum absolute value of the diagonal (or linear) biases.
In one run, the code above prints out:
We can also observe this chain break in the image below, where the logical problem is shown on the left and the embedding is shown on the right. Notice that one qubit in the a chain is +1 (the same value as the qubits that represent b and c). The other qubit in the a chain is -1 though. That happened because the positive quadratic bias between that qubit and the b qubit was stronger than the chain strength. A positive bias means that the qubits want to have different values, while the chain strength tries to force qubits in the chain to have the same value. So we can see that the linear biases aren't the only biases that impact our solution!
I hope this helps. Let me know if I can clarify anything else!
Please sign in to leave a comment.