Options and simulation methods¶
Pass options to MaestroBackend, MaestroSampler or MaestroEstimator.
The names follow Aer’s, and Aer’s longer MPS option names work as aliases.
from qiskit_maestro import MaestroEstimator
estimator = MaestroEstimator(
method="matrix_product_state", # or "mps"
max_bond_dimension=64, # Aer: matrix_product_state_max_bond_dimension
truncation_threshold=1e-10, # Aer: matrix_product_state_truncation_threshold
)
Option |
Values |
Default |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
integer |
random |
|
integer, MPS only |
no cap |
|
discarded weight, MPS only |
Maestro’s default |
|
threads for independent circuits and parameter sets; |
|
|
dict of any other |
none |
|
a |
none |
|
a |
none (runs locally) |
Automatic method selection¶
"automatic" takes Aer’s name for its default. Noiseless circuits run on the
statevector, Maestro’s default. A noisy circuit whose measurements all come at
the end runs on the density matrix when the shots outnumber the 2ⁿ amplitudes
of its n active qubits, as on Aer.
Maestro picks the fastest engine for a circuit by itself, so it may run a
Clifford circuit you sent to "statevector" on the stabilizer engine. Results
are unaffected, and each result’s metadata records what actually ran.
The simulation methods example runs one
circuit on three methods.