Qadence

Latest version: v1.9.0

Safety actively analyzes 683558 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 9

0.0

Semi-local addressing patterns

Semi-local addressing patterns can be created by either specifying fixed values for the weights of the qubits being addressed or defining them as trainable parameters that can be optimized later in some training loop.

python
import torch
from qadence.analog import AddressingPattern

n_qubits = 3

constant weights
w_det = {0: 0.9, 1: 0.5, 2: 1.0}
w_amp = {0: 0.1, 1: 0.4, 2: 0.8}

Page 9 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.