DuffingOscillator

class DuffingOscillator(subsystem, frequency, anharm, drive_strength, drive_label=None)[source]

Bases: QuantumSystemModel

Duffing oscillator.

A model of a transmon with Hamiltonian: \(H(t) = 2 \pi \nu N + \pi \alpha N(N - I) + s(t) 2 \pi r X\), where \(\nu\) is the frequency, \(\alpha\) the anharmonicity, \(r\) is the drive strength, and \(s(t)\) is the drive signal.

Initialize.

Parameters:
  • subsystem – The subsystem to define the Duffing oscillator on.

  • frequency – The frequency of the oscillator.

  • anharm – The anharmonicity of the oscillator.

  • drive_strength – The drive strength.

  • drive_label – The label for the drive term.

Methods

dressed_basis(ordered_subsystems=None, ordering='default')

Get the DressedBasis object for the system.

Parameters:
  • ordered_subsystems (Optional[List]) – Subsystems in the desired order.

  • ordering (str) – Ordering convention for the eigenvectors.

get_Solver(rotating_frame=None, array_library=None, vectorized=False, validate=False, ordered_subsystems=None)

Build concrete operators and instantiate solver.

Note that the map_signal_dictionary() method can be used to map signals given in a dictionary format {drive_coefficient: s}, where drive_coefficient is a string in drive_hamiltonian_coefficients + drive_dissipator_coefficients and s is a signal, to the required formatting of the signals argument in Solver.solve().

Parameters:
  • rotating_frame (Union[ndarray, AbstractSubsystemOperator, None]) – Rotating frame to define the solver in.

  • array_library (Optional[str]) – array library to use (e.g. “numpy”, “jax”, “jax_sparse”, “scipy_sparse”)

  • vectorized (bool) – If doing lindblad simulation, whether or not to vectorize.

  • validate (bool) – Whether or not to validate the operators.

  • ordered_subsystems (Optional[List[Subsystem]]) – Chosen non-standard ordering for building the solver.

map_signal_dictionary(signals)

Map labelled signal dictionary to the required format for for the signals argument of a Solver generated from the get_Solver() method.

Parameters:

signals (List[Union[ndarray, number, int, float, complex, Tracer, Array, spmatrix, BCOO, list, Signal]]) – Signals in dictionary format {label: s}, for label a string in drive_hamiltonian_coefficients + drive_dissipator_coefficients and s a signal.

Returns:

A container of signals formatted for the signals argument of the Solver method Solver.solve().

solve(signals, t_span, y0, rotating_frame=None, array_library=None, vectorized=False, ordered_subsystems=None, **kwargs)

Solve the model.

This method internally constructs a Solver instance with fully-formed arrays according to the abstract model specified in this instance, and then solves. Note that the signals argument for this method expects a dictionary format mapping the coefficient labels for the drive terms specified at instantiation to the desired coefficient.

Parameters:
  • signals (dict) – Signals in dictionary format {label: s}, where label is a string in drive_hamiltonian_coefficients + drive_dissipator_coefficients, and s is the corresponding singal.

  • t_span (Union[ndarray, number, int, float, complex, Tracer, Array, spmatrix, BCOO, list]) – Time interval to integrate over.

  • y0 (Union[ndarray, number, int, float, complex, Tracer, Array, spmatrix, BCOO, list, QuantumState, BaseOperator]) – Initial state.

  • rotating_frame (Union[ndarray, AbstractSubsystemOperator, None]) – Rotating frame to transform the model into. Rotating frames which are diagonal can be supplied as a 1d array of the diagonal elements, to explicitly indicate that they are diagonal.

  • array_library (Optional[str]) – Array library to use for storing operators of underlying model. See the model evaluation section of the Models API documentation for a more detailed description of this argument.

  • vectorized (Optional[bool]) – If including dissipator terms, whether or not to construct the LindbladModel in vectorized form. See the model evaluation section of the Models API documentation for a more detailed description of this argument.

  • ordered_subsystems (Optional[List[Subsystem]]) – List of Subsystem instances explicitly specifying the ordering of the subsystems desired when building the concrete model.

  • kwargs – Keyword arguments to pass through to Solver.solve.

Attributes

drive_dissipator_coefficients

The drive dissipator coefficients.

drive_dissipators

The model drive dissipators.

drive_hamiltonian_coefficients

The drive Hamiltonian coefficients.

drive_hamiltonians

The model drive Hamiltonians.

static_dissipators

The model static dissipators.

static_hamiltonian

The model static Hamiltonian.

subsystems

The model subsystems.