Functions

aquapointer.analog.analog.find_water_positions(density_canvases, executor, processor_configs, num_samples=1000, qubo_cost=<function default_cost>, location_clustering=None)

Finds the locations of water molecules in a protein cavity from 2-D arrays of density values of the cavity.

Return type:

List[List[float]]

Args:

density_canvases: List of density canvas objects containing density and geometry info of the protein cavity. executor: Function that executes a pulse sequence on a quantum backend. processor_configs: List of Processor objects storing settings for running on a quantum backend. num_samples: Number of times to execute the quantum experiment or simulation on the backend. qubo_cost: Cost function to be optimized in the QUBO. location_clustering: Optional function for merging duplicate locations (typically identified in different layers).

Returns:
List of 3-D coordinates of the locations of water molecules in the

protein cavity.

aquapointer.analog.analog.location_clustering_kmeans(water_positions)

Takes a list of 3-D coordinates of the locations of water molecules in the protein cavity and merges each set of duplicate locations into a single location.

Return type:

List[List[float]]

aquapointer.analog.density_mapping.find_index_of_excited_qubits(best_solutions)

Finds the indices of excited qubits corresponding to each QUBO solution.

Return type:

List[int]

aquapointer.analog.density_mapping.find_positions_of_excited_qubits(qubit_indices, rescaled_positions)

Returns a list of coordinates of the excited qubits corresponding to each QUBO solution.

Return type:

List[float]

aquapointer.analog.density_mapping.rescaled_positions_to_3d_map(best_solutions, rescaled_positions)

Finds the locations of water molecules in a protein cavity from 2-D arrays of density values of the cavity.

Return type:

List[int]

Args:

best_solutions: List of QUBO solution bitstrings. rescaled_positions: List of arrays of rescaled register positions.

Returns:
List of 3-D coordinates of the locations of water molecules in the

protein cavity.

aquapointer.analog.density_mapping.visualize_registers(registers, positions, rescaled_positions, densities)

Plot the register layout side-by-side with the density slice.

Return type:

None

aquapointer.analog.qubo_solution.best_solution_from_samples(samples, rescaled_pos, density, brad, var, amp, qubo_cost=<function default_cost>)

Identify sampled bitstring with lowest QUBO cost for the input density slice.

Return type:

str

Args:

samples: Bitstring samples obtained from executing the pulse sequence. rescaled_pos: Array of rescaled register positions. density: Density slices of the protein cavity as a 2-D array of density values. brad: Blockade radius distance (in micrometers). var: Variance of the fitted density distribution. amp: Amplitude of the fitted density distribution. qubo_cost: Cost function to be optimized in the QUBO.

Returns:

Bitstring solving the QUBO for the input density slice.

aquapointer.analog.qubo_solution.calculate_one_body_qubo_coeffs(density, rescaled_pos, variance, pos)

Calculates the one-body coefficients of the QUBO.

Return type:

Tuple[ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]], float]

Args:

density: Density slices of the protein cavity as a 2-D array of density values. rescaled_pos: Array of rescaled register positions. variance: Variance of the distribution fit to the density data. pos: Array of register positions.

Returns:

Tuple of an array of one-body QUBO coefficients and their corresponding scaling.

aquapointer.analog.qubo_solution.default_cost(rescaled_pos, density, variance, bitstring, brad, amp)

calculate QUBO cost of each bitstring in terms of the Ising energy

Return type:

List[Tuple[float]]

aquapointer.analog.qubo_solution.fit_gaussian(density)

Fits density data to a sum of isotropic normal distributions on a 2-D grid and returns the variance, center (in dimenions 0 and in dimension 1), and amplitude of the distribution.

Return type:

Tuple[float]

aquapointer.analog.qubo_solution.generate_pulse_sequences(device, register, dets, max_det, pulse_duration, omega)

Arranges detunings into a pulse sequence generated for a given device.

Return type:

Sequence

aquapointer.analog.qubo_solution.run_qubo(density, executor, proc, variance, amplitude, qubo_cost=<function default_cost>, num_samples=1000)

Obtain bitstring solving the QUBO problem for the input density slice.

Return type:

str

Args:

density: Density slices of the protein cavity as a 2-D array of density values. executor: Function that executes a pulse sequence on a quantum backend. proc: Processor object storing settings for running on a quantum backend.

qubo_cost: Cost function to be optimized in the QUBO. num_samples: Number of times to execute the quantum experiment or simulation on the backend.

Returns:

Bitstring solving the QUBO for the input density slice.

aquapointer.analog.qubo_solution.scale_detunings(density, pos, rescaled_pos, brad, variance, max_det)

Calculates the detunings to be used for the QUBO.

Return type:

ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]

Args:

density: Density slices of the protein cavity as a 2-D array of density values. pos: Array of register positions. rescaled_pos: Array of rescaled register positions. variance: Variance of the distribution fit to the density data. brad: Blockade radius distance (in micrometers). max_det: Maximum detuning allowed by the device.

Returns:

Tuple of an array of one-body QUBO coefficients and their corresponding scaling.

aquapointer.analog.qubo_solution.scale_gaussian(xy_data, var, m_x, m_y, amp)

Calculates the value at each point on a 2-D grid of a sum of isotropic normal distributions centered at m_x, m_y, … with variance var and amplitude amp.

Return type:

float

Args:

xy_data: Array of indices of density array elements. var: Variance of the distribution. m_x: Center of the distribution along dimension 0 of the density array. m_y: Center of the distribution along dimension 1 of the density array. amp: Amplitude of the distribution.

Returns:

The value at each point on a 2-D grid of a sum of isotropic normal distributions.

aquapointer.slicing.density_file_to_grid(filename)

Load density file as a Grid object.

Return type:

Grid

aquapointer.slicing.density_origin(density_grid)

Find the origin of the grid.

Return type:

ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]

aquapointer.slicing.density_point_boundaries(density_grid)

Find the furthest point from origin of the grid.

Return type:

List[ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]]

aquapointer.slicing.density_slices_by_plane_and_offsets(density_grid, points, offsets)

Slice 3D density grid at specified intervals along a specified axis and flatten slices into 2D density arrays positioned at each midplane.

Return type:

List[DensityCanvas]

aquapointer.slicing.density_slices_by_planes(density_grid, slicing_planes)

Slice 3D density grid by planes specified by a list of point and axis pairs and flatten slices into 2D density arrays positioned at each midplane.

Return type:

List[DensityCanvas]

Classes

aquapointer.density_canvas

alias of <module ‘aquapointer.density_canvas’ (namespace) from [‘/home/docs/checkouts/readthedocs.org/user_builds/aquapointer/checkouts/latest/aquapointer/density_canvas’]>

aquapointer.analog_digital.processor

alias of <module ‘aquapointer.analog_digital.processor’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/aquapointer/checkouts/latest/aquapointer/analog_digital/processor.py’>