Skip to content

CNOT with interacting qubits

Digital-analog quantum computing focuses on using single qubit digital gates combined with more complex and device-dependent analog interactions to represent quantum programs. This paradigm has been shown to be universal for quantum computation1. However, while this approach may have advantages when adapting quantum programs to real devices, known quantum algorithms are very often expressed in a fully digital paradigm. As such, it is also important to have concrete ways to transform from one paradigm to another.

This tutorial will exemplify the DAQC transformation starting with the representation of a simple digital CNOT using the universality of the Ising Hamiltonian2.

CNOT with CPHASE

Let's look at a single example of how the digital-analog transformation can be used to perform a CNOT on two qubits inside a register of globally interacting qubits.

First, note that the CNOT can be decomposed with two Hadamard and a CPHASE gate with \(\phi=\pi\):

import torch
from qadence import chain, sample, product_state

from qadence.draw import display
from qadence import X, I, Z, H, N, CPHASE, CNOT, HamEvo

n_qubits = 2

# CNOT gate
cnot_gate = CNOT(0, 1)

# CNOT decomposed
phi = torch.pi
cnot_decomp = chain(H(1), CPHASE(0, 1, phi), H(1))

init_state = product_state("10")
sample from CNOT gate and 100 shots = [Counter({'11': 100})]
sample from decomposed CNOT gate and 100 shots = [Counter({'11': 100})]

The CPHASE matrix is diagonal, and can be implemented by exponentiating an Ising-like Hamiltonian, or generator,

\[\text{CPHASE}(i,j,\phi)=\text{exp}\left(-i\phi \mathcal{H}_\text{CP}(i, j)\right)\]
\[\begin{aligned} \mathcal{H}_\text{CP}&=-\frac{1}{4}(I_i-Z_i)(I_j-Z_j)\\ &=-N_iN_j \end{aligned}\]

where the number operator \(N_i = \frac{1}{2}(I_i-Z_i)=\hat{n}_i\) is used, leading to an Ising-like interaction \(\hat{n}_i\hat{n}_j\) realisable in neutral-atom systems. Let's rebuild the CNOT using this evolution.

from qadence import kron, block_to_tensor

# Hamiltonian for the CPHASE gate
h_cphase = (-1.0) * kron(N(0), N(1))

# Exponentiating and time-evolving the Hamiltonian until t=phi.
cphase_evo = HamEvo(h_cphase, phi)

# Check that we have the CPHASE gate:
cphase_matrix = block_to_tensor(CPHASE(0, 1, phi))
cphase_evo_matrix = block_to_tensor(cphase_evo)
cphase_matrix == cphase_evo_matrix: True

Now that the CPHASE generator is checked, it can be applied to the CNOT:

# CNOT with Hamiltonian Evolution
cnot_evo = chain(
    H(1),
    cphase_evo,
    H(1)
)

# Initialize state to check CNOTs sample outcomes.
init_state = product_state("10")
sample cnot_gate = [Counter({'11': 100})]
sample cnot_evo = [Counter({'11': 100})]

Thus, a CNOT gate can be created by combining a few single-qubit gates together with a two-qubit Ising interaction between the control and the target qubit which is the essence of the Ising transform proposed in the seminal DAQC paper2 for \(ZZ\) interactions. In Qadence, both \(ZZ\) and \(NN\) interactions are supported.

CNOT in an interacting system of three qubits

Consider a simple experimental setup with \(n=3\) interacting qubits laid out in a triangular grid. For the sake of simplicity, all qubits interact with each other with an \(NN\)-Ising interaction of constant strength \(g_\text{int}\). The Hamiltonian for the system can be written by summing interaction terms over all pairs:

\[\mathcal{H}_\text{sys}=\sum_{i=0}^{n}\sum_{j=0}^{i-1}g_\text{int}N_iN_j,\]

which in this case leads to only three interaction terms,

\[\mathcal{H}_\text{sys}=g_\text{int}(N_0N_1+N_1N_2+N_0N_2)\]

This generator can be easily built in Qadence:

from qadence import add, kron
n_qubits = 3

# Interaction strength.
g_int = 1.0

# Build a list of interactions.
interaction_list = []
for i in range(n_qubits):
    for j in range(i):
        interaction_list.append(g_int * kron(N(i), N(j)))

h_sys = add(*interaction_list)
h_sys = AddBlock(0,1,2)
├── [mul: 1.00000000000000] 
   └── KronBlock(0,1)
       ├── N(1)
       └── N(0)
├── [mul: 1.00000000000000] 
   └── KronBlock(0,2)
       ├── N(2)
       └── N(0)
└── [mul: 1.00000000000000] 
    └── KronBlock(1,2)
        ├── N(2)
        └── N(1)

Now let's consider that the experimental system is fixed, and qubits can not be isolated one from another. The options are:

  • Turn on or off the global system Hamiltonian.
  • Perform local single-qubit rotations.

To perform a fully digital CNOT(0,1), the interacting control on qubit 0 and target on qubit 1 must be isolated from the third one to implement the gate directly. While this can be achieved for a three-qubit system, it becomes experimentally untractable when scaling the qubit count.

However, this is not the case within the digital-analog paradigm. In fact, the two qubit Ising interaction required for the CNOT can be represented with a combination of the global system Hamiltonian and a specific set of single-qubit rotations. Full details about this transformation are to be found in the DAQC paper2 but a more succint yet in-depth description takes place in the next section. It is conveniently available in Qadence by calling the daqc_transform function.

In the most general sense, the daqc_transform function will return a circuit that represents the evolution of a target Hamiltonian \(\mathcal{H}_\text{target}\) (here the unitary of the gate) until a specified time \(t_f\) by using only the evolution of a build Hamiltonian \(\mathcal{H}_\text{build}\) (here \(\mathcal{H}_\text{sys}\)) together with local \(X\)-gates. In Qadence, daqc_transform is applicable for \(\mathcal{H}_\text{target}\) and \(\mathcal{H}_\text{build}\) composed only of \(ZZ\)- or \(NN\)-interactions. These generators are parsed by the daqc_transform function and the appropriate type is automatically determined together with the appropriate single-qubit detunings and global phases.

Let's apply it for the CNOT implementation:

from qadence import daqc_transform, Strategy

# Settings for the target CNOT operation
i = 0  # Control qubit
j = 1  # Target qubit
k = 2  # The extra qubit

# Define the target CNOT operation
# by composing with identity on the extra qubit.
cnot_target = kron(CNOT(i, j), I(k))

# The two-qubit NN-Ising interaction term for the CPHASE
h_int = (-1.0) * kron(N(i), N(j))

# Transforming the two-qubit Ising interaction using only our system Hamiltonian
transformed_ising = daqc_transform(
    n_qubits=3,        # Total number of qubits in the transformation
    gen_target=h_int,  # The target Ising generator
    t_f=torch.pi,      # The target evolution time
    gen_build=h_sys,   # The building block Ising generator to be used
    strategy=Strategy.SDAQC,   # Currently only sDAQC is implemented
    ignore_global_phases=False  # Global phases from mapping between Z and N
)

# display(transformed_ising)
%3 cluster_0fad7e4e749047649410a9b1280d09bc cluster_b9c69f0a4547461581aa9a1b2ec3e0e3 cluster_388b15b82e55441788cf76acf62fe766 cluster_a8cbdafe105d4ad1ad2f1cf099b6a96e cluster_9928fced755a4baaad2aa887d50d8fc7 cluster_78a2426626fd4fd8ad5b1d15dc9203ac cluster_b7572e6af4fd4f309685bbcfe69e6054 b62baf1114e74fda9151d80ddcda706d 0 e814dc6729de43f69e43972ec8a02aac HamEvo b62baf1114e74fda9151d80ddcda706d--e814dc6729de43f69e43972ec8a02aac 7c9da0003081461fb8fef1addc015419 1 c26e064ff18941129987751b08ec8f95 HamEvo e814dc6729de43f69e43972ec8a02aac--c26e064ff18941129987751b08ec8f95 bee4ae3e8c5644b78cc3d5ea54b7d8d7 HamEvo c26e064ff18941129987751b08ec8f95--bee4ae3e8c5644b78cc3d5ea54b7d8d7 9b1e73dbd0c647a496b4baa96ded79b5 X bee4ae3e8c5644b78cc3d5ea54b7d8d7--9b1e73dbd0c647a496b4baa96ded79b5 b06334572b2c48ee89fca80df2a84e24 HamEvo 9b1e73dbd0c647a496b4baa96ded79b5--b06334572b2c48ee89fca80df2a84e24 d760d9afbd584dcc87a17d757833224b HamEvo b06334572b2c48ee89fca80df2a84e24--d760d9afbd584dcc87a17d757833224b 803450504539466c8a82182f4f876f02 X d760d9afbd584dcc87a17d757833224b--803450504539466c8a82182f4f876f02 83972db4b7dc4b459dc13483623e6a76 803450504539466c8a82182f4f876f02--83972db4b7dc4b459dc13483623e6a76 930ec45016d54a669ea0bf078891c3bf HamEvo 83972db4b7dc4b459dc13483623e6a76--930ec45016d54a669ea0bf078891c3bf 6b3054841367469c99995887ed07ae30 HamEvo 930ec45016d54a669ea0bf078891c3bf--6b3054841367469c99995887ed07ae30 34bcad2e836449ceaf4cc75e4e30fcc7 6b3054841367469c99995887ed07ae30--34bcad2e836449ceaf4cc75e4e30fcc7 5da2af11aec8412ea88ebceb535d3bac 34bcad2e836449ceaf4cc75e4e30fcc7--5da2af11aec8412ea88ebceb535d3bac 9ee2590a071d45f29e0263d65eac92b0 5697d7ebc4754dfe850a7b5875827663 t = -3.142 7c9da0003081461fb8fef1addc015419--5697d7ebc4754dfe850a7b5875827663 c6d84f0c89834762958cccdc06156b06 2 3c9e81c991da4b46a409428b2ae80792 t = 3.142 5697d7ebc4754dfe850a7b5875827663--3c9e81c991da4b46a409428b2ae80792 8c32cbf95a7940f49029da911ebb0be9 t = -3.142 3c9e81c991da4b46a409428b2ae80792--8c32cbf95a7940f49029da911ebb0be9 43d710a7026b48fc85303030837a2557 8c32cbf95a7940f49029da911ebb0be9--43d710a7026b48fc85303030837a2557 e4ff3220e34e489e904f2a4013169c05 t = 1.571 43d710a7026b48fc85303030837a2557--e4ff3220e34e489e904f2a4013169c05 df73be3bd64e40d988e06c0fea613dbb t = 1.571 e4ff3220e34e489e904f2a4013169c05--df73be3bd64e40d988e06c0fea613dbb a62bb14e1efa4eb5b5544eae198a52d1 df73be3bd64e40d988e06c0fea613dbb--a62bb14e1efa4eb5b5544eae198a52d1 1296d36be1b24141820c0ef2f76fb992 X a62bb14e1efa4eb5b5544eae198a52d1--1296d36be1b24141820c0ef2f76fb992 81480682b7d245debc4c482de9400adb t = 1.571 1296d36be1b24141820c0ef2f76fb992--81480682b7d245debc4c482de9400adb 40a338deb1c542d48f6e4c0f6114ea9e t = 1.571 81480682b7d245debc4c482de9400adb--40a338deb1c542d48f6e4c0f6114ea9e a05e06d3800e4133b0a0d25c2b5ca13b X 40a338deb1c542d48f6e4c0f6114ea9e--a05e06d3800e4133b0a0d25c2b5ca13b a05e06d3800e4133b0a0d25c2b5ca13b--9ee2590a071d45f29e0263d65eac92b0 f7721636809f4fb8b4d37555e1b510cb 5c3ada21cdec42c594e58b6e8ca5b305 c6d84f0c89834762958cccdc06156b06--5c3ada21cdec42c594e58b6e8ca5b305 5bf6e99c71d5403f9e189908748a24fb 5c3ada21cdec42c594e58b6e8ca5b305--5bf6e99c71d5403f9e189908748a24fb 9da28ff16cff43f094b1de4dab01c02e 5bf6e99c71d5403f9e189908748a24fb--9da28ff16cff43f094b1de4dab01c02e bfffcdfe980049dba5c115c8926f6cd5 X 9da28ff16cff43f094b1de4dab01c02e--bfffcdfe980049dba5c115c8926f6cd5 041b5bca1c0140debbf63c28d0a4ca27 bfffcdfe980049dba5c115c8926f6cd5--041b5bca1c0140debbf63c28d0a4ca27 4a2870c5766d4e06b087fbf38bae743d 041b5bca1c0140debbf63c28d0a4ca27--4a2870c5766d4e06b087fbf38bae743d e0b75ea6b8ed41289f5bf21aed8b0e77 X 4a2870c5766d4e06b087fbf38bae743d--e0b75ea6b8ed41289f5bf21aed8b0e77 b21b655c8dee48279cbbe518d82985a3 X e0b75ea6b8ed41289f5bf21aed8b0e77--b21b655c8dee48279cbbe518d82985a3 726b0ef8c4e44e24bc45d5547b64d427 b21b655c8dee48279cbbe518d82985a3--726b0ef8c4e44e24bc45d5547b64d427 0b6167285f84465589635ce51d9bee98 726b0ef8c4e44e24bc45d5547b64d427--0b6167285f84465589635ce51d9bee98 a356afd37c0d4651a7925eb50e75ad5f X 0b6167285f84465589635ce51d9bee98--a356afd37c0d4651a7925eb50e75ad5f a356afd37c0d4651a7925eb50e75ad5f--f7721636809f4fb8b4d37555e1b510cb

The output circuit displays three groups of system Hamiltonian evolutions which account for global-phases and single-qubit detunings related to the mapping between the \(Z\) and \(N\) operators. Optionally, global phases can be ignored.

In general, the mapping of a \(n\)-qubit Ising Hamiltonian to another will require at most \(n(n-1)\) evolutions. The transformed circuit performs these evolutions for specific times that are computed from the solution of a linear system of equations involving the set of interactions in the target and build Hamiltonians.

In this case, the mapping is exact when using the step-wise DAQC strategy (Strategy.SDAQC) available in Qadence. In banged DAQC (Strategy.BDAQC) the mapping is approximate, but easier to implement on a physical device with always-on interactions such as neutral-atom systems.

Just as before, the transformed Ising circuit can be checked to exactly recover the CPHASE gate:

# CPHASE on (i, j), Identity on third qubit:
cphase_matrix = block_to_tensor(kron(CPHASE(i, j, phi), I(k)))

# CPHASE using the transformed circuit:
cphase_evo_matrix = block_to_tensor(transformed_ising)

# Check that it implements the CPHASE.
# Will fail if global phases are ignored.
cphase_matrix == cphase_evo_matrix : True

The CNOT gate can now finally be built:

from qadence import equivalent_state, run, sample

cnot_daqc = chain(
    H(j),
    transformed_ising,
    H(j)
)

# And finally apply the CNOT on a specific 3-qubit initial state:
init_state = product_state("101")

# Check we get an equivalent wavefunction
wf_cnot = run(n_qubits, block=cnot_target, state=init_state)
wf_daqc = run(n_qubits, block=cnot_daqc, state=init_state)

# Visualize the CNOT bit-flip in samples.
wf_cnot == wf_dacq : True
sample cnot_target = [Counter({'111': 100})]
sample cnot_dacq = [Counter({'111': 100})]

As one can see, a CNOT operation has been succesfully implemented on the desired target qubits by using only the global system as the building block Hamiltonian and single-qubit rotations. Decomposing a single digital gate into an Ising Hamiltonian serves as a proof of principle for the potential of this technique to represent universal quantum computation.

Technical details on the DAQC transformation

  • The mapping between target generator and final circuit is performed by solving a linear system of size \(n(n-1)\) where \(n\) is the number of qubits, so it can be computed efficiently (i.e., with a polynomial cost in the number of qubits).
  • The linear system to be solved is actually not invertible for \(n=4\) qubits. This is very specific edge case requiring a workaround, that is currently not yet implemented.
  • As mentioned, the final circuit has at most \(n(n-1)\) slices, so there is at most a quadratic overhead in circuit depth.

Finally, and most important to its usage:

  • The target Hamiltonian should be sufficiently represented in the building block Hamiltonian.

To illustrate this point, consider the following target and build Hamiltonians:

# Interaction between qubits 0 and 1
gen_target = 1.0 * (Z(0) @ Z(1))

# Fixed interaction between qubits 1 and 2, and customizable between 0 and 1
def gen_build(g_int):
    return g_int * (Z(0) @ Z(1)) + 1.0 * (Z(1) @ Z(2))

And now we perform the DAQC transform by setting g_int=1.0, exactly matching the target Hamiltonian:

transformed_ising = daqc_transform(
    n_qubits=3,
    gen_target=gen_target,
    t_f=1.0,
    gen_build=gen_build(g_int=1.0),
)

# display(transformed_ising)
%3 cluster_dc64b77e4880468190bd0b59c3fcded0 cluster_02a46a92d48140af880163ae3043be1c 69cdc7bf067b4101a4d208b10d7334f0 0 af9ef9ee9fdc4d25944efc453eb1b6bf X 69cdc7bf067b4101a4d208b10d7334f0--af9ef9ee9fdc4d25944efc453eb1b6bf 678d476954bb403991b4db77ce30dc7d 1 a75005ac71f9431285bfb5ed30a87a98 HamEvo af9ef9ee9fdc4d25944efc453eb1b6bf--a75005ac71f9431285bfb5ed30a87a98 eae26e678b5d4e638e71efc8186edcf9 X a75005ac71f9431285bfb5ed30a87a98--eae26e678b5d4e638e71efc8186edcf9 672191db0d0243268325d1b690a907a1 eae26e678b5d4e638e71efc8186edcf9--672191db0d0243268325d1b690a907a1 edc4fea47e264038b79316ba0a239a26 HamEvo 672191db0d0243268325d1b690a907a1--edc4fea47e264038b79316ba0a239a26 9f9f0255d36847d185f69d983d8728eb edc4fea47e264038b79316ba0a239a26--9f9f0255d36847d185f69d983d8728eb 003bda9911014543ab4df9ca16f919da 9f9f0255d36847d185f69d983d8728eb--003bda9911014543ab4df9ca16f919da 90cadb4844704070bd9fdaa4b60290cd 0e82fb846b354c84ad13d76d122d9fb8 678d476954bb403991b4db77ce30dc7d--0e82fb846b354c84ad13d76d122d9fb8 20719f1e6b6c4a6782e06de4f6e60397 2 b7236e36f1fa4119a4a7c07cd44a51e7 t = -0.500 0e82fb846b354c84ad13d76d122d9fb8--b7236e36f1fa4119a4a7c07cd44a51e7 14e8665c99654d9a9d0addbaa47e39dd b7236e36f1fa4119a4a7c07cd44a51e7--14e8665c99654d9a9d0addbaa47e39dd 08b88da5db774512b226c402665bdee9 X 14e8665c99654d9a9d0addbaa47e39dd--08b88da5db774512b226c402665bdee9 8f3efec02ed84c3dbabbda8063b7f14b t = -0.500 08b88da5db774512b226c402665bdee9--8f3efec02ed84c3dbabbda8063b7f14b 0913d5efa8d94e5e935ab0c72aacdec2 X 8f3efec02ed84c3dbabbda8063b7f14b--0913d5efa8d94e5e935ab0c72aacdec2 0913d5efa8d94e5e935ab0c72aacdec2--90cadb4844704070bd9fdaa4b60290cd b7a8844f9e464a8d8d0e02db70147248 2e52c6046dc64ff9811410e2e0ac72f7 X 20719f1e6b6c4a6782e06de4f6e60397--2e52c6046dc64ff9811410e2e0ac72f7 c2ec3c1a53a34dedb7dab3ee9635bd1f 2e52c6046dc64ff9811410e2e0ac72f7--c2ec3c1a53a34dedb7dab3ee9635bd1f cd4e1ac1f9544811a9e21ccff1ddefad X c2ec3c1a53a34dedb7dab3ee9635bd1f--cd4e1ac1f9544811a9e21ccff1ddefad eab047d779bc4d6d9e833b9e2f5e46e2 X cd4e1ac1f9544811a9e21ccff1ddefad--eab047d779bc4d6d9e833b9e2f5e46e2 5698358dd0ca43fca0828fa232b4a74f eab047d779bc4d6d9e833b9e2f5e46e2--5698358dd0ca43fca0828fa232b4a74f 9cecd1e80b424714bdfecd68df746107 X 5698358dd0ca43fca0828fa232b4a74f--9cecd1e80b424714bdfecd68df746107 9cecd1e80b424714bdfecd68df746107--b7a8844f9e464a8d8d0e02db70147248

Now, if the interaction between qubits 0 and 1 is weakened in the build Hamiltonian:

transformed_ising = daqc_transform(
    n_qubits=3,
    gen_target=gen_target,
    t_f=1.0,
    gen_build=gen_build(g_int=0.001),
)

# display(transformed_ising)
%3 cluster_d8305520c5c340e1bc15a083c4087943 cluster_d5a03c46e1774c308088311b14a647d6 5fb32a39f86c4c83b5690dde66e4f173 0 9fe346899d9e4d2498893a634a3b2110 X 5fb32a39f86c4c83b5690dde66e4f173--9fe346899d9e4d2498893a634a3b2110 85ed9d134b8644fdb98d060fbf4e2aa5 1 5e00f1e9765a45b28a38f4a0fd00e06e HamEvo 9fe346899d9e4d2498893a634a3b2110--5e00f1e9765a45b28a38f4a0fd00e06e 56165683a0bf43a1947b16bf47511c86 X 5e00f1e9765a45b28a38f4a0fd00e06e--56165683a0bf43a1947b16bf47511c86 0ba5e85a9cb64d239862c86a0c609f9f 56165683a0bf43a1947b16bf47511c86--0ba5e85a9cb64d239862c86a0c609f9f b25a9f5b8dbf43b086f4a97c482c709e HamEvo 0ba5e85a9cb64d239862c86a0c609f9f--b25a9f5b8dbf43b086f4a97c482c709e 7e317a18f72846d6b971aa56f99c5685 b25a9f5b8dbf43b086f4a97c482c709e--7e317a18f72846d6b971aa56f99c5685 60f45e43fd7c46b08f008ebddeb243dd 7e317a18f72846d6b971aa56f99c5685--60f45e43fd7c46b08f008ebddeb243dd b041fa34730440bba8aceee9e8ee0b74 e25627ca9ad940698c7f161dfdea55d4 85ed9d134b8644fdb98d060fbf4e2aa5--e25627ca9ad940698c7f161dfdea55d4 d2398e0df759440588c36a790ea8811b 2 569c85b64cca4fa2bf43730ff750bb8b t = -500.000000000000 e25627ca9ad940698c7f161dfdea55d4--569c85b64cca4fa2bf43730ff750bb8b 83bb3e3d36ad4e4a84f1f184458abfe5 569c85b64cca4fa2bf43730ff750bb8b--83bb3e3d36ad4e4a84f1f184458abfe5 b450937228ef4956a1a183fc194e4c9d X 83bb3e3d36ad4e4a84f1f184458abfe5--b450937228ef4956a1a183fc194e4c9d 9d710b8e19be4511a83ac2bfd4bac811 t = -500.000000000000 b450937228ef4956a1a183fc194e4c9d--9d710b8e19be4511a83ac2bfd4bac811 7f0926d1afb545daa9bd5f8c9fcdba83 X 9d710b8e19be4511a83ac2bfd4bac811--7f0926d1afb545daa9bd5f8c9fcdba83 7f0926d1afb545daa9bd5f8c9fcdba83--b041fa34730440bba8aceee9e8ee0b74 c7e4036137b7402a93c6b17a9b9c9c2f f4b331bbab984e838ae2344e03d13651 X d2398e0df759440588c36a790ea8811b--f4b331bbab984e838ae2344e03d13651 c5cd2d108b65404eb91c822b4d6fcea7 f4b331bbab984e838ae2344e03d13651--c5cd2d108b65404eb91c822b4d6fcea7 ba3eda62e0ec464f9b7f37b8db2920ac X c5cd2d108b65404eb91c822b4d6fcea7--ba3eda62e0ec464f9b7f37b8db2920ac 60f92040ad3546ecb920a0fcc05e6366 X ba3eda62e0ec464f9b7f37b8db2920ac--60f92040ad3546ecb920a0fcc05e6366 185cb1438c0749dfb50ec6445645bef9 60f92040ad3546ecb920a0fcc05e6366--185cb1438c0749dfb50ec6445645bef9 0c52d4338db0488b9b00a84aec6cb790 X 185cb1438c0749dfb50ec6445645bef9--0c52d4338db0488b9b00a84aec6cb790 0c52d4338db0488b9b00a84aec6cb790--c7e4036137b7402a93c6b17a9b9c9c2f

The times slices using the build Hamiltonian need now to evolve for much longer to represent the same interaction since it is not sufficiently represented in the building block Hamiltonian.

In the limit where that interaction is not present, the transform will not work:

try:
    transformed_ising = daqc_transform(
        n_qubits=3,
        gen_target=gen_target,
        t_f=1.0,
        gen_build=gen_build(g_int = 0.0),
    )
except ValueError as error:
    print("Error:", error)
Error: Incompatible interactions between target and build Hamiltonians.

References