Beware of Quantum Algorithms Dependent on Fine Granularity of Phase

In a nutshell

  • The quantum state of a quantum system has wave-like or cyclical behavior. A two-state quantum system such as a qubit has two waves which are not necessarily in sync. Their degree of synchronization — actually the difference between them — is their relative phase or relative phase angle. That relative phase angle is known as the phase of the two-state quantum system (qubit.)
  • If the 0 and 1 states are the two main components of the state of a qubit, phase is the third component of the state of a qubit.
  • Granted, it’s a vague and ambiguous term, but fine granularity of phase generally means more gradations than an S or T gate (90 or 45-degree gradations.) Say 12 or 16 or more gradations. The open question is whether dozens, hundreds, thousands, or even billions or more gradations of phase are supported by both the theoretical physics of qubits and the technology and engineering of real qubits.
  1. Qubit values have a third component beyond superposition of binary 0 and 1 — phase.
  2. Using phase as a simple binary flag such as for constructive and destructive interference is probably reasonably safe.
  3. Two or three bits of precision of phase (three to eight gradations of phase) are probably reasonably safe as well. Such as the S and T gates (90 and 45-degree rotations.)
  4. But all bets are off beyond a few bits of precision — exactly where the breakpoint occurs is indeterminate at this stage of the technology.
  5. One would hope that 16 gradations of phase would work reasonably well, but even that is a question mark.
  6. Maybe 32 to 64 gradations, or even 128 to 256 gradations of phase might be workable for more advanced qubits.
  7. But one could be skeptical of hundreds or thousands, let alone millions or billions of gradations of phase.
  8. In any case, vendors of quantum computers (and service providers as well) need to fully document any limitations on phase for their qubits.
  9. Vendors of quantum computers should annotate their product roadmaps with number of gradations of phase supported at each stage of the roadmap, as well as the number of bits of precision supported for quantum Fourier transform (QFT) and quantum phase estimation (QPE) at each stage of the roadmap.
  10. Vendors also need to perform validation testing of phase limits to compare reality to theory for documented limitations. Confirm theory and documentation, or note any discrepancies.
  11. Even classical quantum simulators need clear technical documentation of precision and granularity of phase, including the degree to which phase limits can be configured.
  12. It should be easy to configure classical quantum simulators to precisely match the limitations of real quantum computers.
  13. The main characteristics of phase which need careful documentation are the minimum and maximum phases, the minimum increment between phases, and the expected uncertainty for phase.
  14. No, “Just try it and see what happens!” is not a reasonable or professional approach. Trial and error is not a plan.
  15. First things first, get the theory straight. Folklore won’t cut it.
  16. We need more information on implementation of phase angle rotations. Hardware and software — how the theory meets the road.
  17. Portability of algorithms and applications is problematic. Different machines have different capabilities and different limitations when it comes to phase. That said, there may be a least common denominator of capabilities and limitations for a particular collection of machines. General portability is problematic — for fine granularity of phase.
  18. As hardware evolves, the rules may change, sometimes incrementally, and sometimes in quantum leaps.
  19. Sector is too young for most people to run into phase granularity issues. Wait a few years as algorithms and applications become more ambitious.
  20. Do probability amplitudes have the same characteristics, limitations, and issues as phase? Possibly. Maybe. I would expect so. But I just don’t know and haven’t been able to verify one way or the other. Vendors need to supply detailed technical guidance.
  21. Unfortunately, there may be different stories and details on phase granularity depending on whether we’re talking about the present, current offerings, the near future, next year, the medium-term future, and the much longer-term future. Timing is everything. What’s true for today may no longer be true tomorrow, next week, next month, next year, in two years, in five years, in seven years, in ten years, or in twenty years.

Topics covered in this paper

  1. In a nutshell
  2. Caveats
  3. What is phase?
  4. Cycles and waves
  5. Period or wavelength
  6. Four stages or phases of a single cycle of a wave
  7. Circles and sine waves
  8. Phase — quadrants of a cycle vs. fraction of a cycle
  9. Phase angle
  10. Phi for phase angle
  11. Units for phase (phase angle)
  12. Gradations of phase vs. granularity
  13. Theoretical gradations of phase vs. granularity
  14. Phase as a decimal fraction
  15. Why is two pi used everywhere when phase is used?
  16. Euler’s formula
  17. Range of phase
  18. Phase is a continuous value
  19. Is phase an infinitely-valued continuous value?
  20. Is phase a discrete continuous value?
  21. How can phase be discrete if two pi is irrational?
  22. What does a decimal phase fraction between 0.0 and 1.0 mean if two pi is irrational?
  23. Is phase multivalued?
  24. Are phase angles bright lines or fuzzy and uncertain?
  25. Are phase angles black and white or shades of gray?
  26. Is phase digital or analog?
  27. What is the resolution or precision of a phase angle?
  28. Aspects of phase in quantum computing
  29. How close can phase come to 0.0 and pi and not be treated as not having any phase?
  30. Phase granularity may be fine for smaller circuits
  31. Bloch sphere
  32. Rotations of the Bloch sphere
  33. Phase is rotation about the Z axis
  34. Phase is real in the range 0.0 to 1.0
  35. Theta and phi
  36. Phase is relative
  37. S and T gates should be reliable
  38. R-phi gate (or PHASE gate, phase shift) may or may not be reliable
  39. Phase cannot be measured directly
  40. Measuring phase — indirectly
  41. Phase as a binary flag or for constructive and destructive interference
  42. Degree of granularity
  43. Where is the “break” point for phase?
  44. Limitations due to theory, engineering, or portability
  45. Theoretical limitations
  46. Is there a Planck-type unit for phase?
  47. Levels of translation
  48. Precision of entries in unitary matrices
  49. Precision of exponentials in unitary matrices
  50. Precision for exponentials in a quantum Fourier transform (QFT)
  51. Precision of pi and sqrt(2) when used in unitary matrices
  52. Quantum vs. classical hardware issues
  53. Uses of phase in quantum algorithms
  54. Quantum algorithms which rely on granularity of phase
  55. QFT and QPE are not currently viable at-scale anyway
  56. Algorithms which use phase kickback
  57. Extreme granularity of phase for quantum Fourier transform (QFT)
  58. No, banding won’t facilitate precision of phase in quantum Fourier transforms
  59. Extreme granularity of phase for quantum phase estimation (QPE)
  60. When will quantum phase estimation (QPE) be viable?
  61. When will quantum Fourier transform (QFT) be viable?
  62. How does phase granularity scale as an algorithm is scaled?
  63. Shor’s algorithm as worst-case example so far
  64. Is Shor’s really the worst-case limit for quantum algorithms, or just the starting point for serious, heavy-duty quantum algorithms?
  65. Hardware vendors (and service providers) need to fully document any limitations on phase for their qubits
  66. What does current vendor documentation say about granularity of phase?
  67. Product roadmaps should detail the number of gradations of phase supported at each stage of the roadmap
  68. Product roadmaps should detail the number of bits of precision supported for quantum Fourier transform (QFT) and quantum phase estimation (QPE)
  69. Providers of quantum simulators need to fully document the behavior of phase
  70. No, “Just try it and see what happens!” is not a reasonable or professional approach
  71. Trial and error is not a plan
  72. Vendor validation testing of phase limits — compare to theory
  73. Publish reports for validation testing of phase limits
  74. Accumulated error after performing n x PHASE(1/n)
  75. Model categories of algorithm and application phase granularity as tee-shirt sizes — S, M, L, XL, XXL, XXXL
  76. What multiples of phase granularity are supported?
  77. Do probability amplitudes have the same characteristics, limitations, and issues as phase?
  78. Still at laboratory curiosity stage, so all bets are off
  79. Sector is too young for most people to run into phase granularity issues
  80. Need for hardware and architecture advances
  81. As hardware evolves, the rules may change
  82. First things first, get the theory straight
  83. What does the theory say about phase granularity?
  84. What are the actual physics of phase granularity?
  85. Impact of granularity and uncertainty on constructive and destructive interference
  86. How will phase interact with quantum error correction (QEC)?
  87. How stable is physical phase?
  88. We need more information on implementation of phase angle rotations
  89. Are trapped-ion qubits better for high-precision phase?
  90. Timeframe
  91. No specific granularity guidance I can offer — it’s all up in the air
  92. Conclusion

Caveats

  1. This paper won’t delve deep into the all of the actual physics of phase, just deep enough to address the headline issue of precision and granularity of phase.
  2. No graphics, no diagrams, no Greek symbols, no math, no matrices. Just addressing the headline issue in as plain language as possible.
  3. Quantum computing technology is a moving target, constantly evolving, so what might be true today — or at any other time — may not necessarily be true at some arbitrary time in the future.

What is phase?

Cycles and waves

Period or wavelength

Four stages or phases of a single cycle of a wave

  1. Rising from zero to a maximum amplitude peak.
  2. Falling from that maximum amplitude peak back to and through zero.
  3. Falling from zero to a maximum negative amplitude trough.
  4. Rising from that maximum negative amplitude trough back to and through zero.
  5. Rinse and repeat — periodic.

Circles and sine waves

  1. Circle. Four quadrants, each comparable to one phase of a sine wave.
  2. Sine wave. The path a point on a circle takes if the circle is rolled.

Phase — quadrants of a cycle vs. fraction of a cycle

  1. The four phases of a single cycle of a wave.
  2. A specific fraction of a single cycle of a wave. A specific point or relative distance along the path of a wave in terms of a fraction of the complete path for a single cycle.

Phase angle

Phi for phase angle

Units for phase (phase angle)

  1. Radians. The language of formal mathematics. Two pi radians in a circle. Each of the four phases of a cycle or the four quadrants of a circle correspond to pi over 2 radians.
  2. Degrees. Common, vernacular unit for measuring angles. Simple, direct numeric conversion factor — two pi radians equals 360 degrees. Pi over two radians corresponds to 90 degrees.
  3. Decimal fraction. Fraction of a full circle. From 0.0 to 1.0. 1.0 corresponds to two pi radians or 360 degrees. 0.5 corresponds to pi radians or 180 degrees. 0.25 corresponds to pi over two radians or 90 degrees.
  1. exp(i phi) — presume phi is an angle in radians.
  2. exp(two pi i phi) — presume phi is an angle as a decimal fraction.
  1. 0.0 radians = 0 degrees = 0.0 decimal fraction.
  2. pi over four radians = 45 degrees = 0.125 decimal fraction.
  3. pi over two radians = 90 degrees = 0.25 decimal fraction.
  4. pi radians = 180 degrees = 0.5 decimal fraction.
  5. Three pi over two radians = 270 degrees = 0.75 decimal fraction.
  6. Two pi radians = 360 degrees = 1.0 decimal fraction.

Gradations of phase vs. granularity

Theoretical gradations of phase vs. granularity

Phase as a decimal fraction

Why is two pi used everywhere when phase is used?

  • exp(two pi i phi) — phi is presumed to be an angle as a decimal fraction.

Euler’s formula

  1. Even multiples of pi, including 0.0. cos(0) + i sin(0) == 1.0.
  2. Odd multiples of pi, including pi. cos(pi) + i sin(pi) == -1.0.
  3. Even multiples of pi plus pi over two. cos(pi over two) + i sin(pi over two) == i.
  4. Odd multiples of pi plus pi over two. cos(pi plus pi over two) + i sin(pi plus pi over two) == -i.

Range of phase

  1. A full circle or single full wave (one cycle). Zero to two pi radians, 0 to 360 degrees, or 0.0 to 1.0 as a decimal fraction.
  2. Half a circle. The other half of the circle merely retraces the first half, back to where it started. Zero to pi and pi to two pi radians, 0 to 180 degrees and then 180 degrees to 360 degrees, and 0.0 to 0.5 and then 0.5 to 1.0 as a decimal fraction.
  3. Two half circles which are mirror images, but with the sign flipped. Zero to pi and zero to minus pi radians, 0 to 180 degrees and 0 to minus 180 degrees, and 0.0 to 0.5 and 0.0 to minus 0.5 as a decimal fraction.
  4. Infinite circles or waves (cycles), but periodic based on the size of one cycle. Four pi radians is the same as two pi radians, 720 degrees is the same as 360 degrees, and 2.0 is the same as 1.0 as a decimal fraction.

Phase is a continuous value

Is phase an infinitely-valued continuous value?

Is phase a discrete continuous value?

How can phase be discrete if two pi is irrational?

What does a decimal phase fraction between 0.0 and 1.0 mean if two pi is irrational?

Is phase multivalued?

Are phase angles bright lines or fuzzy and uncertain?

Are phase angles black and white or shades of gray?

Is phase digital or analog?

What is the resolution or precision of a phase angle?

Aspects of phase in quantum computing

  1. Minimum phase. Greater than zero. Or zero if no phase.
  2. Maximum phase. Less than two pi radians or 1.0 as a decimal fraction.
  3. Smallest increment or delta. Between two adjacent phases.
  4. Error or uncertainty. In the quantum mechanical sense.
  5. Measurement resolution. Can’t directly measure phase, but can use phase estimation techniques — quantum phase estimation (QPE).
  1. Smallest phase greater than zero.
  2. Smallest phase greater than pi radians or 0.5 as a decimal fraction.
  1. Greatest value less that two pi radians or 1.0 as a decimal fraction.
  2. Greatest value less than pi radians or 0.5 as a decimal fraction.

How close can phase come to 0.0 and pi and not be treated as not having any phase?

Phase granularity may be fine for smaller circuits

Bloch sphere

Rotations of the Bloch sphere

Phase is rotation about the Z axis

Phase is real in the range 0.0 to 1.0

Theta and phi

Phase is relative

S and T gates should be reliable

R-phi gate (or PHASE gate, phase shift) may or may not be reliable

Phase cannot be measured directly

Measuring phase — indirectly

Phase as a binary flag or for constructive and destructive interference

Degree of granularity

  1. Binary or flag — two states of phase (actually four — pi over two and minus pi over two radians, plus the two zeroes of the Bloch sphere, 0.0 and pi radians)
  2. Two or three bits (4–8 states)
  3. 8–12
  4. 16
  5. 32
  6. 50–64
  7. 80–100
  8. 128–150
  9. 192–256
  10. 512
  11. 1024
  12. 2K
  13. 4K
  14. Thousands
  15. Millions
  16. Billions
  17. Trillions
  18. Quadrillions
  19. 10²⁰ to 10⁵⁰
  20. Beyond 10⁵⁰

Where is the “break” point for phase?

  1. Anything more than just a binary flag.
  2. Anything more than a handful, such as 3 to 5 gradations.
  3. 8 gradations.
  4. 12
  5. 16
  6. 24
  7. 32
  8. 50
  9. 64
  10. 100
  11. 128
  12. 256
  13. 1024
  14. 4K
  15. 16K
  16. 64K
  17. 256K
  18. 1M
  19. Millions
  20. Billions
  21. 10⁴⁰
  22. 10⁵⁰
  23. 10¹⁰⁰

Limitations due to theory, engineering, or portability

  1. Theory. Raw physics. Physical limitations, regardless of particular implementations.
  2. Engineering of real machines. Not all theory can readily, practically, or economically be turned into a real machine.
  3. Portability. Consistency between machines, vendors, and technologies and architectures.

Theoretical limitations

  1. Limitations of quantum mechanics in general.
  2. Specific physics of particular qubit designs.

Is there a Planck-type unit for phase?

Levels of translation

  1. Abstract phase — e.g., pi as an abstraction vs. approximation of pi to so many digits.
  2. Representation in source programming language — e.g., Python.
  3. High-level API representation.
  4. Network interface representation.
  5. Software driver representation. Where exactly do the entries in unitary matrices get turned into physical hardware control?
  6. FPGA representation.
  7. Digital electronics representation.
  8. Analog electronics representation.
  9. Cryogenic electronics and photonics (e.g., microwaves or lasers) representation.
  10. Physical control of qubits implementation.
  11. Physical effect on qubits. The actual quantum mechanics.

Precision of entries in unitary matrices

  1. Single-precision floating point.
  2. Double-precision.
  3. Quad precision.

Precision of exponentials in unitary matrices

  • exp(two pi i phi) — if phi is a decimal fraction (0.0 to 1.0)
  • exp(i phi) — if phi is in radians (0.0 to two pi)

Precision for exponentials in a quantum Fourier transform (QFT)

Precision of pi and sqrt(2) when used in unitary matrices

Quantum vs. classical hardware issues

  1. Quantum aspects of a qubit.
  2. Classical control of qubit gate operations.
  1. Classical digital electronics.
  2. Classical analog electronics.

Uses of phase in quantum algorithms

  1. Those which rely on phase merely as a binary flag. Such as constructive and destructive interference.
  2. Those which rely on some degree of granularity of phase.

Quantum algorithms which rely on granularity of phase

  1. Quantum Fourier transform (QFT).
  2. Quantum phase estimation (QPE).
  3. Algorithms which use the technique of phase kickback.

QFT and QPE are not currently viable at-scale anyway

Algorithms which use phase kickback

  1. Phase is used merely as a binary flag.
  2. Phase has some degree of granularity, more than a mere two-state flag.

Extreme granularity of phase for quantum Fourier transform (QFT)

  • exp(two pi i j k over 2^n)

No, banding won’t facilitate precision of phase in quantum Fourier transforms

Extreme granularity of phase for quantum phase estimation (QPE)

When will quantum phase estimation (QPE) be viable?

  1. 18 months? Not likely
  2. 2–3 years? Unlikely.
  3. 5 years? Possibly.
  4. 7 years? A distinct possibility.
  5. 10 years? One would hope so.

When will quantum Fourier transform (QFT) be viable?

How does phase granularity scale as an algorithm is scaled?

Shor’s algorithm as worst-case example so far

  • exp (two pi i j k over 2^n)

Is Shor’s really the worst-case limit for quantum algorithms, or just the starting point for serious, heavy-duty quantum algorithms?

Hardware vendors (and service providers) need to fully document any limitations on phase for their qubits

What does current vendor documentation say about granularity of phase?

Product roadmaps should detail the number of gradations of phase supported at each stage of the roadmap

  1. When will even four bits (16 gradations) of precision be supported?
  2. Ditto for five bits (32 gradations)
  3. 6 bits (64 gradations)
  4. 8 bits (256 gradations)
  5. 10 bits (1024 gradations)
  6. 12 bits (4K gradations)
  7. 16 bits (64K gradations)
  8. 20 bits (one million gradations)
  9. 24 bits (24M gradations)
  10. 32 bits (4G gradations)
  11. And beyond.

Product roadmaps should detail the number of bits of precision supported for quantum Fourier transform (QFT) and quantum phase estimation (QPE)

  1. When will even four bits of precision be supported?
  2. Ditto for five bits.
  3. 6 bits.
  4. 8 bits.
  5. 10 bits.
  6. 12 bits.
  7. 16 bits.
  8. 20 bits.
  9. 24 bits.
  10. 32 bits.
  11. And beyond.

Providers of quantum simulators need to fully document the behavior of phase

No, “Just try it and see what happens!” is not a reasonable or professional approach

Trial and error is not a plan

Vendor validation testing of phase limits — compare to theory

Publish reports for validation testing of phase limits

Accumulated error after performing n x PHASE(1/n)

Model categories of algorithm and application phase granularity as tee-shirt sizes — S, M, L, XL, XXL, XXXL

  1. S — Small. Requires no more or little more than S and T gate phase granularity.
  2. M — Medium. Dozens of gradations of phase, such as 24 to 64.
  3. L — Large. Hundreds of gradations of phase, such as 256 to 1024.
  4. XL — Extra Large. Thousands of gradations of phase.
  5. XXL — Extra-extra Large. Millions or billions of gradations of phase.
  6. XXXL — Extra-extra-extra Large. Far beyond billions of gradations of phase.

What multiples of phase granularity are supported?

  1. Powers of 2?
  2. Multiples of 2?
  3. Multiples of 4? Since there are four quadrants in the Bloch sphere.
  4. Multiples of 3 or other odd numbers? 3, 6, 9, 12, 15? 5, 7, 11, 13, 23? What happens if the multiple isn’t divisible by 2 or 4 to get 0 at the midpoint and maximum magnitude at 90 and 270 degrees?

Do probability amplitudes have the same characteristics, limitations, and issues as phase?

Still at laboratory curiosity stage, so all bets are off

Sector is too young for most people to run into phase granularity issues

Need for hardware and architecture advances

As hardware evolves, the rules may change

First things first, get the theory straight

What does the theory say about phase granularity?

What are the actual physics of phase granularity?

Impact of granularity and uncertainty on constructive and destructive interference

How will phase interact with quantum error correction (QEC)?

How stable is physical phase?

We need more information on implementation of phase angle rotations

Are trapped-ion qubits better for high-precision phase?

Timeframe

  1. Now — currently available.
  2. Coming soon — over the next few months.
  3. Coming over the remainder of the year.
  4. Next year.
  5. 1 year — must wait a whole year.
  6. 2 years.
  7. 5 years.
  8. 7 years.
  9. 10 years.
  10. 15 years.
  11. 20 years.
  12. Ultimate, maximum capabilities.

No specific granularity guidance I can offer — it’s all up in the air

  1. They need to get the theory straight.
  2. They need to deeply understand exactly what they are building.
  3. They need to fully characterize what they are building.
  4. They need to fully test and validate what they have built.
  5. They need to fully document what they have built.

Conclusion

  1. We are still at the toy and experimentation stage of quantum computing — these hard issues are beyond current imagination.
  2. There are many unknowns which vendors need to clarify, such as any limitations or issues with phase of qubits.
  3. Algorithm designers should only rely on a few bits of precision for phase, for now.
  4. Algorithms depending on modest granularity of phase (dozens) should tread very carefully.
  5. Depending on fine granularity of phase (hundreds or thousands of gradations) is likely beyond the limits of current technologies over the next few to five years.
  6. Phase granularity in the millions, billions, and beyond should not be considered as practical for the indefinite future.
  7. Whether extremely fine granularity of phase is practical at all even in the long term remains to be seen.
  8. Portability of algorithms and applications is problematic when different quantum computers have different limits on phase.

--

--

--

Freelance Consultant

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jack Krupansky

Jack Krupansky

Freelance Consultant

More from Medium

Which Quantum Modality is Best?

GHZ and W Quantum states

png

An introduction to Quantum Computing

“Train the Trainer” Program