qiskit-metal icon indicating copy to clipboard operation
qiskit-metal copied to clipboard

Route: add "design precision" to the code that generate points

Open JeremyDrysdale-ibm opened this issue 4 years ago • 1 comments

From @marcolincs

What is the feature being requested?

Current code uses math precision for operation but it does not use design precision to determine the points. Will need to "round" points to the design grid. If there are meanders on the route, the left-over length (if any) should be attached to one of the meanders.

What are use cases for this feature?

Consistent precision

JeremyDrysdale-ibm avatar Nov 17 '20 11:11 JeremyDrysdale-ibm

Documenting: currently the code contains two precision numbers, but it would seem that they both achieve the same thing. We should separate scope of the numbers:

  1. should be used for "mathematic rounding", a private variable that the user can optionally update if they face rounding errors that they want to remove. (this number should be defined in the math files - as it is now, but it is only used in a very small section of the code)
  2. should be used to define the "design grid", which is the resolution to which we should place the shapes vertices. The user must not be allowed to update because this, as this is a hard constraint applied by the design manufacturing requirements. Additionally, this value must equally impact points for every QComponent instance and equally be represented in every renderer. Therefore it should be applied during the make() of the QComponent so that the algorithms can account for that correction into their calculations; for example when trying to match the length of a meander to spec. (this number should be defined in the design class - as it is now, but it is currently applied at rendering)

The first number will normally me a lot smaller than the second number as scaling goes, but it is possible that at this time the two might be comparable. But the main difference is the scope in which they must be used (1. to round algebra/mathematics, and 2. to round vertices of polygons and paths)

marcolincs avatar Dec 15 '20 23:12 marcolincs