c3.generator.generator

Signal generation stack.

Contrary to most quanutm simulators, C^3 includes a detailed simulation of the control stack. Each component in the stack and its functions are simulated individually and combined here.

Example: A local oscillator and arbitrary waveform generator signal are put through via a mixer device to produce an effective modulated signal.

Module Contents

class c3.generator.generator.Generator(devices: dict = None, chains: dict = None, resolution: float = 0.0, callback: Callable = None)[source]

Generator, creates signal from digital to what arrives to the chip.

Parameters
  • devices (list) – Physical or abstract devices in the signal processing chain.

  • resolution (np.float64) – Resolution at which continuous functions are sampled.

  • callback (Callable) – Function that is called after each device in the signal line.

read_config(filepath: str) None[source]

Load a file and parse it to create a Generator object.

Parameters

filepath (str) – Location of the configuration file

write_config(filepath: str) None[source]

Write dictionary to a HJSON file.

asdict() dict[source]

Return a dictionary compatible with config files.

__str__() str[source]

Return str(self).

generate_signals(instr: c3.signal.gates.Instruction) dict[source]

Perform the signal chain for a specified instruction, including local oscillator, AWG generation and IQ mixing.

Parameters

instr (Instruction) – Operation to be performed, e.g. logical gate.

Returns

Signal to be applied to the physical device.

Return type

dict