Further exploration / Optional
A different way
to compute.
Choose one idea to investigate after the core lessons.
Both experiments run locally in your browser.
Teach the curve.
Then test its limits.
Train a small machine-learning model on samples from a material law. Then ask it to predict a response it has never seen.
Train up to stretch 1.8. Test at 2.6, then widen the training range and compare the prediction.
Live machine-learning model
Material surrogate
Material lawTraining samplesLearned predictionTraining interval
Train a model to test this prediction.
Choose your training domain and press Train. The pale region shows where the model has seen examples.
How the learning model works
This experiment uses kernel ridge regression. It learns weighted radial-basis functions from samples; it does not receive the material equation. [1]
Training data: P(λ) = μ(λ − λ⁻²), with μ = 0.8 MPa. Uniform deterministic synthetic noise is added to the observations, except at λ = 1. The material law stays outside the learned model.
(K + αI)w = y
P̂(λ) = Σᵢ wᵢ K(λ, λᵢ)
The browser solves the regularized system by Cholesky factorization. Regularization α = 0.003; ℓ is the adjustable kernel width. Training RMSE compares against noisy samples. The unseen in-range RMSE uses noise-free midpoint samples that were never used in training. All errors have units MPa. The curve can violate physical constraints outside its training range; this surrogate has no embedded constitutive law.
There is no claim of a speed advantage for this tiny example: evaluating its original equation is already inexpensive. The lesson is the trade-off between learned prediction and evidence.
A low training error is only the first check. Test unseen cases, track the training domain and return to physics when the evidence runs out.
Turn phase into
a measurable result.
Step through an ideal single-qubit circuit. This classical emulator calculates amplitudes and samples measurement outcomes.
Select Phase and choose 180°. Then select Interfere. Why do the probabilities change only after the final gate?
One qubit / four stages
Turn phase into a probability
Bloch sphere: state direction, not a particle orbit. The vertical axis is the measurement basis.
Each shot repeats preparation and all gates up to the selected stage.
Understand amplitudes, phase and measurement
A qubit has complex probability amplitudes. A phase operation changes their relationship. Interference can turn that relationship into a different measurement distribution. [2]
H|ψ⟩ = [(1 + eⁱᶲ)|0⟩ + (1 − eⁱᶲ)|1⟩] / 2
p(0) = cos²(φ/2), p(1) = sin²(φ/2)
The final formulas apply after the second H gate. Measurement returns one classical outcome, not the complete state vector. Repeating the circuit estimates its distribution; it does not reveal all amplitudes in one shot. [3]
How could this connect to engineering simulation?
You assembled K u = f in the FEM chapter. Quantum algorithms such as HHL investigate particular linear-system problems, preparing a state related to the solution. Their promised advantages depend on matrix access, sparsity, conditioning and the output being requested. [4]
Encoding the data and recovering useful engineering quantities are part of the computation. Reading every nodal displacement into a conventional result file is a different task from estimating an observable of a quantum state.
Sources and further reading
- scikit-learn: Kernel ridge regression: the learning method used in this experiment.
- IBM Quantum: Phase estimation procedure: how phase becomes measurable through interference.
- IBM Quantum: Limitations on quantum information: the distinction between state amplitudes and measurement outcomes.
- Harrow, Hassidim & Lloyd: Quantum algorithm for solving linear systems of equations (2009): assumptions and output of the quantum linear-system problem.
Educational experiments executed locally in your browser. Synthetic data and ideal state-vector calculations.