from qiskit import *
backend = BasicAer.get_backend('dm_simulator')

qc1 = QuantumCircuit(1)
options1 = {
    'custom_densitymatrix': 'max_mixed'
}
run1  = execute(qc1,backend,**options1)
result1 = run1.result()
print('Density Matrix: \n',result1['results'][0]['data']['densitymatrix'])

qc2 = QuantumCircuit(2)
options2 = {
    'custom_densitymatrix': 'binary_string',
    'initial_densitymatrix': '01'
}
backend = BasicAer.get_backend('dm_simulator')
run2  = execute(qc2,backend,**options2)
result2 = run2.result()
print('Density Matrix: \n',result2['results'][0]['data']['densitymatrix'])