A simulator for the AQT device.
cirq_aqt.aqt_device.AQTSimulator(
num_qubits: int,
circuit: cirq.Circuit = cirq.Circuit(),
simulate_ideal: bool = False,
noise_dict: Optional[Dict] = None
)
Args |
num_qubits
|
Number of qubits.
|
circuit
|
Optional, circuit to be simulated.
Last moment needs to be a measurement over all qubits with key 'm'
|
simulate_ideal
|
If True, an ideal, noiseless, circuit will be simulated.
|
noise_dict
|
A map from gate to noise to be applied after that gate. If None, uses
a default noise model.
|
Methods
generate_circuit_from_list
View source
generate_circuit_from_list(
json_string: str
)
Generates a list of cirq operations from a json string.
The default behavior is to add a measurement to any qubit at the end
of the circuit as there are no measurements defined in the AQT API.
Args |
json_string
|
json that specifies the sequence.
|
simulate_samples
View source
simulate_samples(
repetitions: int
) -> cirq.Result
Samples the circuit.
Args |
repetitions
|
Number of times the circuit is simulated.
|
Returns |
Result from Cirq.Simulator.
|
Raises |
RuntimeError
|
Simulate called without a circuit.
|