clarifications about measurements

This commit is contained in:
Daniel Tsvetkov 2020-02-03 14:57:45 +01:00
parent 71d3e13030
commit 8e4996a101

View File

@ -753,6 +753,12 @@ def test():
# III: Measurement | A quantum measurement is described by an orthonormal basis |e_j>
# for state space. If the initial state of the system is |ψ>
# then we get outcome j with probability pr(j) = |<e_j|ψ>|^2
# Note: The postulates are applicable on closed, isolated systems.
# Systems that are closed and are described by unitary time evolution by a Hamiltonian
# can be measured by projective measurements. Systems are not closed in reality and hence
# are immeasurable using projective measurements.
# POVM (Positive Operator-Valued Measure) is a restriction on the projective measurements,
# such that it encompasses everything except the environment.
assert _0.get_prob(0) == 1 # Probability for |0> in 0 is 1
assert _0.get_prob(1) == 0 # Probability for |0> in 1 is 0
@ -805,7 +811,7 @@ def test():
assert np.isclose(bell.get_prob(0b11), 0.5) # Probability for bell in 11 is 0.5
################################
# TODO: Don't know where outer product fits...
# TODO: Don't know where outer product fits - something about density operator?
assert _0.x(_0) == Matrix([[1, 0],
[0, 0]])
assert _0.x(_1) == Matrix([[0, 1],