View source on GitHub |
Options for LinearQubitOperator.
openfermion.linalg.LinearQubitOperatorOptions(
processes=10, pool=None
)
Methods
get_pool
get_pool(
num=None
)
Gets a pool of workers to do some parallel work.
pool will be cached, which implies that one should be very clear how many processes one needs, as it's allocated at most once. Subsequent calls of get_pool() will reuse the cached pool.
Args | |
---|---|
num
|
int
Number of workers one needs. |
Returns | |
---|---|
pool
|
multiprocessing.Pool
A pool of workers. |
get_processes
get_processes(
num
)
Number of real processes to use.