Skip to content

Commit

Permalink
Fix CI for data provider change and cct draw (#344)
Browse files Browse the repository at this point in the history
* Fix CI for data provider change and cct draw

* Fix reference output indent
  • Loading branch information
woodsp-ibm authored Sep 13, 2024
1 parent 37b904d commit ddc5400
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
21 changes: 7 additions & 14 deletions qiskit_finance/circuit/library/probability_distributions/normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,13 @@ class NormalDistribution(QuantumCircuit):
>>> from qiskit_finance.circuit.library.probability_distributions import NormalDistribution
>>> circuit = NormalDistribution(3, mu=1, sigma=1, bounds=(0, 2))
>>> circuit.decompose().draw()
»
q_0: ───────────────────────────────────────────────────»
┌────────────────────────┐»
q_1: ─────────────────────────┤0 ├»
┌───────────────────────┐│ multiplex2_reverse_dg │»
q_2: ┤ multiplex1_reverse_dg ├┤1 ├»
└───────────────────────┘└────────────────────────┘»
« ┌────────────────────────┐
«q_0: ┤0 ├
« │ │
«q_1: ┤1 multiplex3_reverse_dg ├
« │ │
«q_2: ┤2 ├
« └────────────────────────┘
┌─────────────────┐
q_0: ─────────────────────────────────────┤0 ├
┌─────────────────┐│ │
q_1: ──────────────────┤0 ├┤1 multiplexer_dg ├
┌────────────────┐│ multiplexer_dg ││ │
q_2: ┤ multiplexer_dg ├┤1 ├┤2 ├
└────────────────┘└─────────────────┘└─────────────────┘
>>> mu = [1, 0.9]
>>> sigma = [[1, -0.2], [-0.2, 1]]
Expand Down
4 changes: 2 additions & 2 deletions test/data_providers/test_data_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def test_exchangedata(self):
self.fail(f"Test of ExchangeDataProvider failed: {str(ex)}")

@data(
[["MSFT", "AAPL"], [[1334, 471.0], [471.0, 210.0]], [[1.0, 2.99e-05], [2.99e-05, 1.0]]],
["MSFT", 1334.0, [[1.0]]],
[["MSFT", "AAPL"], [[1329, 470.0], [470.0, 209.0]], [[1.0, 2.99e-05], [2.99e-05, 1.0]]],
["MSFT", 1329.0, [[1.0]]],
)
@unpack
def test_yahoo(self, tickers, covariance, similarity):
Expand Down

0 comments on commit ddc5400

Please sign in to comment.