The suggested way to do measurements in a different axis is to change the orientation of the state vector at the end and measure in the $z$-basis as usual.
To go from one basis to the other you can use $H$ and $S=\sqrt{Z}$ gates that act as unitary transformations of your system. If you apply $H$ to your qubit and then do a measurement, it is the same as measuring in the $x$-axis. $HS^\dagger+$measurement is the same as measuring in the $y$-axis. A visual representation can be found in this answer: https://quantumcomputing.stackexchange.com/a/13611/15775
If you need to do a measurement in any other basis you can use rotation gates $R_y(\theta),R_z(\theta)+$measurement (two rotation gates are enough to do all kind of rotations).
To prepare an arbitrary state, you can use .initialize
. Alternatively, you can also use the rotation gates.
The details of the gate operations and arbitrary initialization in Qiskit can be found here:
https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html