Refactor slightly so as to allow for inline QuantumSystem definition.