Pagina's

Showing posts with label quantum. Show all posts
Showing posts with label quantum. Show all posts

Friday, 8 July 2011

A question of measurement


As stated somewhat flippantly in last week's post, the mystery of quantum effects is in my opinion, a question of measurement. Besides uncertainty, there is this problem with the observer, whereby the observation of a quantum system somehow resolves it's probabilities into actualities. This implies that measuring a system determines the state of that same system. If the system-to-be-measured, is not the system-once-measured, what do measurements mean?

It's a topsy-turvy world down there at the quantum level.

But all is not necessarily as it seems at the macro level either. Think of taking the temperature of a volume of liquid using a mercury thermometer – the thermometer generates a reading because there is heat exchange between the liquid being measured and the thermometer. The act of measuring has changed the system, however slightly. For many purposes the thermometer can be regarded as accurate; the change in temperature that the thermometer effects in the liquid is negligible compared to the smallest unit of measurement.

At the quantum scale however particles are so small and travel at such high speeds (close to the speed of light) that even the infinitesimal is not negligible. This makes it basically impossible to take any measurements without significantly altering that being measured.

Complex adaptive systems display the same resistance to objective observation; for instance, it's notoriously difficult to measure the behaviour of human beings without modifying the behaviour under observation – have you ever dear reader suffered a blackout when taking an exam? Another example is the stock market; measuring consumer confidence can lead directly to a dampening or buoying of the market. Otherwise there is the stock indication itself - the very fact that stock is falling is often the reason that it continues to fall (or rise and rise as the case may be).

But doesn't that make an empirical approach to anything inherently problematic? Well, yes, but it's like Churchill reputedly said of democracy; it's the best we've got! There are steps that can be taken to reduce the subjectivity of a given observation or measurement and its impact on the system being measured, experiments can be set up whereby measurements approach objective non-invasive observations. This is an arduous process, which can be deceptively difficult to get right, and it breaks down quickly in the face of complexity.

How should we mere mortals effectively inspect (let alone adapt) then in the wonderfully complex arena that is software development?

We should proceed with care, measure only the bare minimum and always interpret metrics as approximations, avoid false precision. We need to recognise that metrics will drive behaviour, and be on the lookout for how. The measurements we do decide to take, we can make as trustworthy as possible by keeping as many other important variables as stable as possible. Measuring in relative quantities also helps, as does changing only one thing at a time. In short; apply a light weight version of the scientific method, remember Occam's razor and, be humble!

For example; to make velocity measurements meaningful/useful (for planning purposes), we should fix the sprint duration and keep the configuration of the team stable. We should estimate in story points and include only the points for completed stories in our measurements. Even having done all that, we should allow for the imprecision of our measurements by predicting only on the basis of velocity ranges.

Further we should remember that, while measuring team velocity can have the side effect of driving performance, measuring individual 'velocity' will have a detrimental effect on the team's results – especially if it's a manager doing the measuring!

Wednesday, 29 June 2011

A tale of two uncertainty principles


Watts S. Humphrey formulated a Requirements Uncertainty Principle as follows: For a new software system, the requirements will not be completely known until after the users have used it.

When I first came across this idea, it reminded me of another famous uncertainty principle; Heisenberg's. Superficial research revealed that Humphrey was also a physicist (besides being an important thought leader in software engineering) and it occurred to me that he had not christened his principle randomly.

Heisenberg's uncertainty principle, a cornerstone of quantum theory, states that it is impossible to measure both the position and the speed of a quantum particle at the same time, if you measure the speed you cannot accurately determine its position simultaneously and vice versa.

This apparent anomaly, and others like it, have served to make quantum theory, or at least its philosophical interpretation(s), a domain of heated, at times even hostile, debate. Uncertainty makes people, including scientists, uncomfortable. Einstein is famously misquoted as saying “God doesn't play dice” in a discussion of quantum theory. Einstein was a determinist, which means (v. roughly) that he assumed the theoretical possibility of measuring the universe well enough and thoroughly enough to be able to predict future states accurately.

There were others, including Heisenberg himself, who employed the uncertainty principle to confer the quantum scale with almost magical properties; this has become known as the Copenhagen interpretation. This interpretation leads for instance to the many-worlds problem or the more famous problem of Schrödinger’s Cat, whereby a cat exists, dead and alive at the same moment until 'observed'. The act of observing the cat will somehow send information backwards in time, determining the outcome of an event in the past, or, more fantastically, determine which of the up to the moment of observation simultaneously existing cats will sublimate, “collapsing the wave function of the alive-dead cat” to state it correctly.

Personally, I'm with Popper: the 'mystery' of quantum effects is one of measurement. Even if every measurement were theoretically possible, it would remain theoretically impossible to measure everything objectively; the universe is indeterminate. But the alive-dead cat exists only as a mathematical construct, as a statement of probabilities (propensities as Popper called them), not as an actual array of separate physical states waiting to be resolved by some act of observation. (Although there has been some progress made recently in trying to achieve superimposed quantum states with photon pairs.)

Humphrey's requirements uncertainty principle has also generated much debate, some of it heated. How would the scientists above have reacted to Humphrey's insight?

If Einstein were a developer today he might insist that it should be possible to describe a software system fully before it is built, if the requirements gathering were just done properly. He might even be willing to accept the practical (if not theoretical) impossibility of collecting perfect requirements up front but still feel that aspiring to that theoretical goal was the best way to improve.

The Copenhagen developer, maybe Heisenberg himself, would be all for scrum or some kind of agile approach as a reaction to the requirements uncertainty principle; believing that he could then dispense with estimation, planning, meetings, documentation and all those other inconvenient barriers to his creative flow. Success would be random.

Had Popper been a developer he would probably have realised that Humphrey's requirements uncertainty principle could act as his guide in his search for great software. He would work in such a way that the customer would get to see, and use, working software at as early a juncture as possible and at regular intervals thereafter. Developer and customer would together discover the requirements as the system grew. In so doing they would embrace change (uncertainty's first cousin), and maximise learning and value on the way to successful product release.

---o---

Some eighty years after the publication of Heisenberg's uncertainty principle, quantum theory continues to provoke and engage our greatest minds, and it may yet prove to be the greatest theory of them all, capable of modelling physical existence from the quantum to the galactic scales; a so-called Grand Unified Theory.