qat.pbo.collections.manager_from_target

qat.pbo.collections.manager_from_target(target_entangling_gate)

Build a PatternManager from a target gate name.

It can turn CNOT and CZ/CSIGN into any of the following gates:

  • CNOT (key: 'CNOT') : turn CZ into CNOT

  • CZ (key: 'CSIGN') : turn CNOT into CZ

  • ZZ(pi/2) (key: 'ZZ') : turn CNOT into CZ, then CZ to ZZ

  • XX(pi/2) (key: 'XX') : turn CNOT into CZ, then CZ to ZZ, then ZZ to XX

  • RXX (key: 'RXX') : turn CNOT into CZ, then CZ to ZZ, then ZZ to XX, then XX to RXX

  • PMS (key: 'MS') : turn CNOT into CZ, then CZ to ZZ, then ZZ to XX, then XX to RXX, then RXX to PMS

  • RZZ (key: 'RZZ') : turn CNOT into CZ, then CZ to ZZ, then ZZ to RZZ

  • ECR (key: 'ECR') : turn CZ into CNOT, then CNOT into ECR

Targeting CNOT gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("CNOT")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("CNOT")
Generated patterns
SWAP to CNOT
CSIGN to CNOT
Targeting CSIGN gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("CSIGN")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("CSIGN")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
Targeting ZZ gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("ZZ")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("ZZ")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
CSIGN to ZZ
Targeting XX gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("XX")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("XX")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
CSIGN to ZZ
ZZ to XX
Targeting RXX gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("RXX")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("RXX")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
CSIGN to ZZ
ZZ to XX
XX to RXX
Targeting RZZ gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("RZZ")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("RZZ")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
CSIGN to ZZ
ZZ to RZZ
Targeting ECR gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("ECR")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("ECR")
Generated patterns
SWAP to CNOT
CSIGN to CNOT
CNOT to ECR
Targeting PMS gate
from qat.pbo.collections.standard import collection_from_target
from qat.pbo import PatternManager

collection = collection_from_target("PMS")
plugin = PatternManager(collections=[collection])

or, equivalently:

from qat.pbo.collections.standard import manager_from_target

plugin = manager_from_target("PMS")
Generated patterns
SWAP to CNOT
CNOT to CSIGN
CSIGN to ZZ
ZZ to XX
XX to RXX
RXX to PMS
Parameters:

target_entangling_gate (str) – a key in (‘CNOT’, ‘CSIGN’, ‘ZZ’, ‘XX’, ‘RXX’, ‘RZZ’, ‘ECR’, ‘PMS’)

Returns:

Preconfigured pattern manager.

Return type:

PatternManager