<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join_densities(*densities: Density) -> Density: """Join two mixed states into a larger qubit state"""

    vectors = [rho.vec for rho in densities]
    vec = reduce(outer_product, vectors)

    memory = dict(ChainMap(*[rho.memory for rho in densities]))  # TESTME
    return Density(vec.tensor, vec.qubits, memory)