Skip to main content

Python implementation of the quantum optimal control GOAT-algorithm

Project description

goat_quantumcontrol

goat_quantumcontrol is a Python library for the optimization of quantum gates using the GOAT algorithm.

The algorithm was developed in 2018 by Machnes et. al. and got published in following paper: https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.150401

Installation

Use the package manager pip to install goat_quantumcontrol.

pip install goat_quantumcontrol

Usage

import goat_quantumcontrol as Qgoat

#-----System parameters------
# define the drift Hamiltonian
H0 = sigmax
# define the control Hamiltonian
Hdrive = sigmaz
# define the target gate
Utarget = X_gate

#-----Pulse parameters------
# define the number of time intervals
n_ts = 1000
# define the evolution time
evo_time = 3
# define the number of amps
num_of_amps = 2

#-----Optimization parameters--
# define the number of maximal iterations
max_iter = 200
# define the gtol parameter of the scipy 'BFGS' optimizer
gtol = 1e-10

# create an instance of the Pulse class to be used
fourier_pulse = Qgoat.FourierPulseWithEnvelope(n_ts=n_ts,
                                               evo_time=evo_time,
                                               num_of_amps=num_of_amps,
                                               window=None)

# create initial guess_amps with 
fourier_pulse.create_guess_amps()

# create an instance of the Optimizer class
optimizer = Qgoat.Optimizer(H0=H0, Hdrive=Hdrive,
                            target=Utarget,
                            pulse=fourier_pulse,
                            max_iter=max_iter, gtol=gtol,
                            printProgress=True)

# run the optimization
optimizer.run_optimization()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goat_quantumcontrol-0.0.3.5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goat_quantumcontrol-0.0.3.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file goat_quantumcontrol-0.0.3.5.tar.gz.

File metadata

  • Download URL: goat_quantumcontrol-0.0.3.5.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for goat_quantumcontrol-0.0.3.5.tar.gz
Algorithm Hash digest
SHA256 987679634eb0c4502b062978b76e3ce9521380320751ffdb4211ed3db3ee3c51
MD5 70227b3286d6dc2692a1b46f7e61def5
BLAKE2b-256 007866db0670704bdeb96fd2cc1e0d80b6997e00b6103eb86c0213f3896fc7fd

See more details on using hashes here.

File details

Details for the file goat_quantumcontrol-0.0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for goat_quantumcontrol-0.0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a38db67c3744a0feaf4405db8247b065e2a34f84467bf0a5f57abc47e7440861
MD5 39d56ea5e75fd6e23a0f2a672080532a
BLAKE2b-256 ce3f50b94d3a0a0edb49b992a2192596f8c7ffcdb397291c492d9db74dd789a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page