mqt.ddsim¶
MQT DDSIM Python Package.
Submodules¶
- mqt.ddsim.deterministic_noise_simulator_backend
- mqt.ddsim.experiment_header
- mqt.ddsim.hybrid_qam_simulator_backend
- mqt.ddsim.hybrid_statevector_simulator_backend
- mqt.ddsim.job
- mqt.ddsim.path_qasm_simulator_backend
- mqt.ddsim.path_statevector_simulator_backend
- mqt.ddsim.primitives
- mqt.ddsim.provider
- mqt.ddsim.pyddsim
- mqt.ddsim.qasm_simulator_backend
- mqt.ddsim.statevector_simulator_backend
- mqt.ddsim.stochastic_noise_simulator_backend
- mqt.ddsim.target
- mqt.ddsim.unitary_simulator_backend
Package Contents¶
- class CircuitSimulator(circ: QuantumComputation, approximation_step_fidelity: float = 1.0, approximation_steps: int = 1, approximation_strategy: str = 'fidelity', seed: int = -1)¶
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- simulate(shots: int) dict[str, int]¶
Simulate the circuit and return the result as a dictionary of counts.
- expectation_value(observable: QuantumComputation) float¶
Compute the expectation value for the given observable.
- class DeterministicNoiseSimulator(circ: QuantumComputation, approximation_step_fidelity: float = 1.0, approximation_steps: int = 1, approximation_strategy: str = 'fidelity', seed: int = -1, noise_effects: str = 'APD', noise_probability: float = 0.01, amp_damping_probability: float | None = 0.02, multi_qubit_gate_factor: float = 2)¶
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- class HybridSimulator(circ: QuantumComputation, approximation_step_fidelity: float = 1.0, approximation_steps: int = 1, approximation_strategy: str = 'fidelity', seed: int = -1, mode: HybridSimulatorMode = ..., nthreads: int = 2)¶
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- simulate(shots: int) dict[str, int]¶
Simulate the circuit and return the result as a dictionary of counts.
- get_mode() HybridSimulatorMode¶
Get the mode of the hybrid simulator.
- class HybridSimulatorMode(*args, **kwds)¶
Bases:
enum.EnumEnumeration of modes for the
HybridSimulator.- DD = 0¶
- amplitude = 1¶
- class PathSimulator(circ: QuantumComputation, config: PathSimulatorConfiguration = ...)¶
- class PathSimulator(circ: QuantumComputation, mode: PathSimulatorMode = ..., bracket_size: int = 2, starting_point: int = 0, gate_cost: Sequence[int] = [], seed: int = 0)
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- class PathSimulatorConfiguration¶
Configuration options for the
PathSimulator.- property mode: PathSimulatorMode¶
The mode used for determining a simulation path.
- class PathSimulatorMode(*args, **kwds)¶
Bases:
enum.EnumEnumeration of modes for the
PathSimulator.- sequential = 0¶
- pairwise_recursive = 1¶
- bracket = 2¶
- alternating = 3¶
- gate_cost = 4¶
- class StochasticNoiseSimulator(circ: QuantumComputation, approximation_step_fidelity: float = 1.0, approximation_steps: int = 1, approximation_strategy: str = 'fidelity', seed: int = -1, noise_effects: str = 'APD', noise_probability: float = 0.01, amp_damping_probability: float | None = 0.02, multi_qubit_gate_factor: float = 2)¶
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- class UnitarySimulator(circ: QuantumComputation, approximation_step_fidelity: float = 1.0, approximation_steps: int = 1, approximation_strategy: str = 'fidelity', seed: int = -1, mode: UnitarySimulatorMode = ...)¶
-
- get_active_vector_node_count() int¶
Get the number of active vector nodes, i.e., the number of vector DD nodes in the unique table with a non-zero reference count.
- get_active_matrix_node_count() int¶
Get the number of active matrix nodes, i.e., the number of matrix DD nodes in the unique table with a non-zero reference count.
- get_mode() UnitarySimulatorMode¶
Get the mode of the unitary simulator.
- class UnitarySimulatorMode(*args, **kwds)¶
Bases:
enum.EnumEnumeration of modes for the
UnitarySimulator.- recursive = 1¶
- sequential = 0¶