autoqasm.simulator.simulation module
- class autoqasm.simulator.simulation.Simulation(qubit_count: int, shots: int, batch_size: int)[source]
Bases:
StateVectorSimulation- Parameters:
qubit_count (int) – The number of qubits being simulated. All the qubits start in the \(\ket{\mathbf{0}}\) computational basis state.
shots (int) – The number of samples to take from the simulation. If set to 0, only results that do not require sampling, such as state vector or expectation, are generated.
batch_size (int) – The size of the partitions to contract; if set to 1, the gates are applied one at a time, without any optimization of contraction order. Must be a positive integer.
- add_qubits(num_qubits: int) None[source]
Adds the given number of qubits to the simulation.
- Parameters:
num_qubits (int) – The number of qubits to add.