Consider a simple Hamiltonian coupling two qubits:
The eigenvectors are just the computational basis states
As you will check in a moment, this can be done using the following (non-trivial) circuit involving CNOTs and a
where
Implement the circuit drawn above, allowing for the specification of an initial computational basis state.
Tip. Try using qml.BasisState to prepare the basis state.
To interact with codercises, please switch to a larger screen size.
Learning Objectives: