Revised random ket generators for dims (#1058)
Revised random ket generators for dims (#1058)

* Revised random ket generators for dims

Revised rand_ket, rand_ket_haar to allow specifying the ket dimensions.

Previously _check_ket_dims was broken, and definition of dims in the two functions was conflicting.

Changes here:
- removed _check_ket_dims, using the more general _check_dims instead.
- Changed the input method for the rand_ket functions to receive either int, as before, _or_ a dims specifications, rather than both. 
- If dims is specified, N is inferred from dims.

Since both functions were broken previously if dims was specified, and this is backwards compatible if only N is specified, it should be entirely backwards compatible.

* Update random_objects.py

* Revised rand_ket and rand_ket_haar

Restored functional shape to previous form.

* Update random_objects.py

* Update random_objects.py

* elif without condition

cgranade/qutip,cgranade/qutip,qutip/qutip,qutip/qutip