Quantum States: Exercises


2. Normalizing a Quantum State. Quantum state vectors must be normalized, meaning that their magnitude squared should sum to 1.

You can compute a state vector's magnitude in numpy using np.linalg.norm(state_vector).

Normalize the following quantum state vector: [1, 1].


import numpy as np # Define state vector. state_vector = np.array([1, ___]) # Normalize the quantum state vector normalized_state = ___ / np.linalg.___(state_vector) # Define state vector. state_vector = np.array([1, 1]) # Normalize the quantum state vector state_vector = np.array([1, 1]) normalized_state = state_vector / np.linalg.norm(state_vector) test_object("normalized_state") success_msg("You have correctly normalized the quantum state vector.")
To normalize a quantum state vector, divide it by its magnitude.

Previous Exercise Next Exercise