I try to define a bra of a ket using qutip. A bra is a row vector and a ket is a column vector. A bra can be defined as a ket conjugate transpose. However, if I specify a bra directly using this definition in qutip a warning always raised, and the bra vector is failed to be formed.
Here's my code:
import qutip
from math import sqrt
import numpy as np
#probability amplitude of two dice rolled 12 times
probability_amplitudes = np.array(
[[1/6],
[sqrt(2)/6],
[sqrt(3)/6],
[2/6],
[sqrt(5)/6],
[sqrt(6)/6],
[sqrt(5)/6],
[2/6],
[sqrt(3)/6],
[sqrt(2)/6],
[1/6],
])
#ket is column vector
ket_psi = qutip.Qobj(probability_amplitudes)
#bra is conjugate transpose of ket so, it's a row vectorA
row_vector = probability_amplitudes.transpose
bra_psi = qutip.Qobj(row_vector).conj()
print(ket_psi)
print(bra_psi)
My question is, Why this happen? and what is the best practice to specify a bra from a specified ket in qutip?