View source on GitHub |
A SimulationTrialResult
for DensityMatrixSimulator
runs.
Inherits From: SimulationTrialResultBase
, SimulationTrialResult
cirq.DensityMatrixTrialResult(
params: 'cirq.ParamResolver',
measurements: Dict[str, np.ndarray],
final_simulator_state: 'cirq.SimulationStateBase[cirq.DensityMatrixSimulationState]'
) -> None
The density matrix that is stored in this result is returned in the
computational basis with these basis states defined by the qubit_map.
In particular, the value in the qubit_map is the index of the qubit,
and these are translated into binary vectors where the last qubit is
the 1s bit of the index, the second-to-last is the 2s bit of the index,
and so forth (i.e. big endian ordering). The density matrix is a
2 ** num_qubits
square matrix, with rows and columns ordered by
the computational basis as just described.
Methods
get_state_containing_qubit
get_state_containing_qubit(
qubit: 'cirq.Qid'
) -> TSimulationState
Returns the independent state space containing the qubit.
Args | |
---|---|
qubit
|
The qubit whose state space is required. |
Returns | |
---|---|
The state space containing the qubit. |
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool