All criminals sentenced to prison by the authority of the United States or of any state or territory of the United States, may be received by the Director of Corrections and imprisoned in California state prisons in accordance with the sentence of the court by which they were tried. The prisoners so confined shall be subject in all respects to discipline and treatment as though committed under the laws of this State and the Director of Corrections is authorized to enter into contracts with the proper agencies of the United States and of other states and territories of the United States with regard to the per diem rate such agencies shall pay to the State of California for the keep of each prisoner.
Ca. Pen. Code § 2902